Share via


WorkspacePolicyFragment interface

Interface representing a WorkspacePolicyFragment.

Methods

beginCreateOrUpdate(string, string, string, string, PolicyFragmentContract, WorkspacePolicyFragmentCreateOrUpdateOptionalParams)

Creates or updates a policy fragment.

beginCreateOrUpdateAndWait(string, string, string, string, PolicyFragmentContract, WorkspacePolicyFragmentCreateOrUpdateOptionalParams)

Creates or updates a policy fragment.

delete(string, string, string, string, string, WorkspacePolicyFragmentDeleteOptionalParams)

Deletes a policy fragment.

get(string, string, string, string, WorkspacePolicyFragmentGetOptionalParams)

Gets a policy fragment.

getEntityTag(string, string, string, string, WorkspacePolicyFragmentGetEntityTagOptionalParams)

Gets the entity state (Etag) version of a policy fragment.

listByService(string, string, string, WorkspacePolicyFragmentListByServiceOptionalParams)

Gets all policy fragments defined within a workspace.

listReferences(string, string, string, string, WorkspacePolicyFragmentListReferencesOptionalParams)

Lists policy resources that reference the policy fragment.

Method Details

beginCreateOrUpdate(string, string, string, string, PolicyFragmentContract, WorkspacePolicyFragmentCreateOrUpdateOptionalParams)

Creates or updates a policy fragment.

function beginCreateOrUpdate(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<WorkspacePolicyFragmentCreateOrUpdateResponse>, WorkspacePolicyFragmentCreateOrUpdateResponse>>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

id

string

A resource identifier.

parameters
PolicyFragmentContract

The policy fragment contents to apply.

options
WorkspacePolicyFragmentCreateOrUpdateOptionalParams

The options parameters.

Returns

beginCreateOrUpdateAndWait(string, string, string, string, PolicyFragmentContract, WorkspacePolicyFragmentCreateOrUpdateOptionalParams)

Creates or updates a policy fragment.

function beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, parameters: PolicyFragmentContract, options?: WorkspacePolicyFragmentCreateOrUpdateOptionalParams): Promise<WorkspacePolicyFragmentCreateOrUpdateResponse>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

id

string

A resource identifier.

parameters
PolicyFragmentContract

The policy fragment contents to apply.

options
WorkspacePolicyFragmentCreateOrUpdateOptionalParams

The options parameters.

Returns

delete(string, string, string, string, string, WorkspacePolicyFragmentDeleteOptionalParams)

Deletes a policy fragment.

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

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

id

string

A resource identifier.

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
WorkspacePolicyFragmentDeleteOptionalParams

The options parameters.

Returns

Promise<void>

get(string, string, string, string, WorkspacePolicyFragmentGetOptionalParams)

Gets a policy fragment.

function get(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentGetOptionalParams): Promise<WorkspacePolicyFragmentGetResponse>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

id

string

A resource identifier.

options
WorkspacePolicyFragmentGetOptionalParams

The options parameters.

Returns

getEntityTag(string, string, string, string, WorkspacePolicyFragmentGetEntityTagOptionalParams)

Gets the entity state (Etag) version of a policy fragment.

function getEntityTag(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentGetEntityTagOptionalParams): Promise<WorkspacePolicyFragmentGetEntityTagHeaders>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

id

string

A resource identifier.

options
WorkspacePolicyFragmentGetEntityTagOptionalParams

The options parameters.

Returns

listByService(string, string, string, WorkspacePolicyFragmentListByServiceOptionalParams)

Gets all policy fragments defined within a workspace.

function listByService(resourceGroupName: string, serviceName: string, workspaceId: string, options?: WorkspacePolicyFragmentListByServiceOptionalParams): PagedAsyncIterableIterator<PolicyFragmentContract, PolicyFragmentContract[], PageSettings>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

options
WorkspacePolicyFragmentListByServiceOptionalParams

The options parameters.

Returns

listReferences(string, string, string, string, WorkspacePolicyFragmentListReferencesOptionalParams)

Lists policy resources that reference the policy fragment.

function listReferences(resourceGroupName: string, serviceName: string, workspaceId: string, id: string, options?: WorkspacePolicyFragmentListReferencesOptionalParams): Promise<ResourceCollection>

Parameters

resourceGroupName

string

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

serviceName

string

The name of the API Management service.

workspaceId

string

Workspace identifier. Must be unique in the current API Management service instance.

id

string

A resource identifier.

options
WorkspacePolicyFragmentListReferencesOptionalParams

The options parameters.

Returns