{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "REST API for performing policy restrictions on any created/updated policies in an Azure API Management deployment.", "version": "2024-05-01" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions": { "get": { "tags": [ "PolicyRestrictions" ], "operationId": "PolicyRestriction_ListByService", "description": "Gets all policy restrictions of API Management services.", "x-ms-examples": { "ApiManagementListPolicyRestrictions": { "$ref": "./examples/ApiManagementListPolicyRestrictions.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Returns an array of Policy Restrictions.", "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}": { "head": { "tags": [ "PolicyRestriction" ], "operationId": "PolicyRestriction_GetEntityTag", "description": "Gets the entity state (Etag) version of the policy restriction in the Api Management service.", "x-ms-examples": { "ApiManagementHeadPolicyRestriction": { "$ref": "./examples/ApiManagementHeadPolicyRestriction.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/PolicyRestrictionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "The current entity state version is present in the ETag header.", "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "PolicyRestriction" ], "operationId": "PolicyRestriction_Get", "description": "Get the policy restriction of the Api Management service.", "x-ms-examples": { "ApiManagementGetPolicyRestriction": { "$ref": "./examples/ApiManagementGetPolicyRestriction.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/PolicyRestrictionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Get the policy restriction of the Api Management service.", "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionContract" }, "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "PolicyRestriction" ], "operationId": "PolicyRestriction_CreateOrUpdate", "description": "Creates or updates the policy restriction configuration of the Api Management service.", "x-ms-examples": { "ApiManagementCreatePolicyRestriction": { "$ref": "./examples/ApiManagementCreatePolicyRestriction.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/PolicyRestrictionIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionContract" }, "description": "The policy restriction to apply." }, { "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "201": { "description": "Policy restriction configuration was successfully created.", "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionContract" }, "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "200": { "description": "Policy restriction configuration of the Api Management service was successfully updated.", "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionContract" }, "headers": { "ETag": { "description": "Current entity state version", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "PolicyRestriction" ], "operationId": "PolicyRestriction_Update", "description": "Updates the policy restriction configuration of the Api Management service.", "x-ms-examples": { "ApiManagementUpdatePolicyRestriction": { "$ref": "./examples/ApiManagementUpdatePolicyRestriction.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/PolicyRestrictionIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionUpdateContract" }, "description": "The policy restriction to apply." }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Policy restriction configuration of the Api Management service was successfully updated.", "schema": { "$ref": "./definitions.json#/definitions/PolicyRestrictionContract" }, "headers": { "ETag": { "description": "Current entity state version", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "PolicyRestriction" ], "operationId": "PolicyRestriction_Delete", "description": "Deletes the policy restriction configuration of the Api Management Service.", "x-ms-examples": { "ApiManagementDeletePolicyRestriction": { "$ref": "./examples/ApiManagementDeletePolicyRestriction.json" } }, "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/PolicyRestrictionIdParameter" }, { "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Policy restriction was successfully removed." }, "204": { "description": "Policy restriction was successfully removed by previous request or does not exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } } } }, "definitions": {}, "parameters": {} }