ApiPolicy interface

Interface representing a ApiPolicy.

Methods

createOrUpdate(string, string, string, string, PolicyContract, ApiPolicyCreateOrUpdateOptionalParams)

Creates or updates policy configuration for the API.

delete(string, string, string, string, string, ApiPolicyDeleteOptionalParams)

Deletes the policy configuration at the Api.

get(string, string, string, string, ApiPolicyGetOptionalParams)

Get the policy configuration at the API level.

getEntityTag(string, string, string, string, ApiPolicyGetEntityTagOptionalParams)

Gets the entity state (Etag) version of the API policy specified by its identifier.

listByApi(string, string, string, ApiPolicyListByApiOptionalParams)

Get the policy configuration at the API level.

Method Details

createOrUpdate(string, string, string, string, PolicyContract, ApiPolicyCreateOrUpdateOptionalParams)

Creates or updates policy configuration for the API.

function createOrUpdate(resourceGroupName: string, serviceName: string, apiId: string, policyId: string, parameters: PolicyContract, options?: ApiPolicyCreateOrUpdateOptionalParams): Promise<ApiPolicyCreateOrUpdateResponse>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

apiId

string

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

policyId

string

The identifier of the Policy.

parameters
PolicyContract

The policy contents to apply.

options
ApiPolicyCreateOrUpdateOptionalParams

The options parameters.

Returns

delete(string, string, string, string, string, ApiPolicyDeleteOptionalParams)

Deletes the policy configuration at the Api.

function delete(resourceGroupName: string, serviceName: string, apiId: string, policyId: string, ifMatch: string, options?: ApiPolicyDeleteOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

apiId

string

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

policyId

string

The identifier of the Policy.

ifMatch

string

ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.

options
ApiPolicyDeleteOptionalParams

The options parameters.

Returns

Promise<void>

get(string, string, string, string, ApiPolicyGetOptionalParams)

Get the policy configuration at the API level.

function get(resourceGroupName: string, serviceName: string, apiId: string, policyId: string, options?: ApiPolicyGetOptionalParams): Promise<ApiPolicyGetResponse>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

apiId

string

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

policyId

string

The identifier of the Policy.

options
ApiPolicyGetOptionalParams

The options parameters.

Returns

getEntityTag(string, string, string, string, ApiPolicyGetEntityTagOptionalParams)

Gets the entity state (Etag) version of the API policy specified by its identifier.

function getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, policyId: string, options?: ApiPolicyGetEntityTagOptionalParams): Promise<ApiPolicyGetEntityTagHeaders>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

apiId

string

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

policyId

string

The identifier of the Policy.

options
ApiPolicyGetEntityTagOptionalParams

The options parameters.

Returns

listByApi(string, string, string, ApiPolicyListByApiOptionalParams)

Get the policy configuration at the API level.

function listByApi(resourceGroupName: string, serviceName: string, apiId: string, options?: ApiPolicyListByApiOptionalParams): Promise<PolicyCollection>

Parameters

resourceGroupName

string

The name of the resource group. The name is case insensitive.

serviceName

string

The name of the API Management service.

apiId

string

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

options
ApiPolicyListByApiOptionalParams

The options parameters.

Returns

Promise<PolicyCollection>