Policy interface

Interface representing a Policy.

Methods

createOrUpdate(string, string, string, PolicyContract, PolicyCreateOrUpdateOptionalParams)

Creates or updates the global policy configuration of the Api Management service.

delete(string, string, string, string, PolicyDeleteOptionalParams)

Deletes the global policy configuration of the Api Management Service.

get(string, string, string, PolicyGetOptionalParams)

Get the Global policy definition of the Api Management service.

getEntityTag(string, string, string, PolicyGetEntityTagOptionalParams)

Gets the entity state (Etag) version of the Global policy definition in the Api Management service.

listByService(string, string, PolicyListByServiceOptionalParams)

Lists all the Global Policy definitions of the Api Management service.

Method Details

createOrUpdate(string, string, string, PolicyContract, PolicyCreateOrUpdateOptionalParams)

Creates or updates the global policy configuration of the Api Management service.

function createOrUpdate(resourceGroupName: string, serviceName: string, policyId: string, parameters: PolicyContract, options?: PolicyCreateOrUpdateOptionalParams): Promise<PolicyCreateOrUpdateResponse>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

policyId

string

The identifier of the Policy.

parameters
PolicyContract

The policy contents to apply.

options
PolicyCreateOrUpdateOptionalParams

The options parameters.

Returns

delete(string, string, string, string, PolicyDeleteOptionalParams)

Deletes the global policy configuration of the Api Management Service.

function delete(resourceGroupName: string, serviceName: string, policyId: string, ifMatch: string, options?: PolicyDeleteOptionalParams): 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.

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
PolicyDeleteOptionalParams

The options parameters.

Returns

Promise<void>

get(string, string, string, PolicyGetOptionalParams)

Get the Global policy definition of the Api Management service.

function get(resourceGroupName: string, serviceName: string, policyId: string, options?: PolicyGetOptionalParams): Promise<PolicyGetResponse>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

policyId

string

The identifier of the Policy.

options
PolicyGetOptionalParams

The options parameters.

Returns

getEntityTag(string, string, string, PolicyGetEntityTagOptionalParams)

Gets the entity state (Etag) version of the Global policy definition in the Api Management service.

function getEntityTag(resourceGroupName: string, serviceName: string, policyId: string, options?: PolicyGetEntityTagOptionalParams): Promise<PolicyGetEntityTagHeaders>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

policyId

string

The identifier of the Policy.

options
PolicyGetEntityTagOptionalParams

The options parameters.

Returns

listByService(string, string, PolicyListByServiceOptionalParams)

Lists all the Global Policy definitions of the Api Management service.

function listByService(resourceGroupName: string, serviceName: string, options?: PolicyListByServiceOptionalParams): 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.

options
PolicyListByServiceOptionalParams

The options parameters.

Returns

Promise<PolicyCollection>