Policy Restriction Validations - By Service
Validate all policies of API Management services.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies?api-version=2024-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
service
|
path | True |
string |
The name of the API Management service. Regex pattern: |
subscription
|
path | True |
string uuid |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Policy Restrictions are successfully validated. |
|
202 Accepted |
Accepted Headers location: string |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
ApiManagementListPolicyRestrictions
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/validatePolicies?api-version=2024-05-01
Sample response
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ApiManagement/service/apimService1/validatePolicies?api-version=2023-05-01
{
"id": "6074e652093a9d0dac3d733c",
"type": "Microsoft.ApiManagement/service/tenant/operationResults",
"name": "6074e652093a9d0dac3d733c",
"properties": {
"status": "Succeeded",
"started": "2023-04-13T00:31:14.94Z",
"updated": "2023-04-13T00:31:27.59Z",
"resultInfo": "All the policies were validated",
"actionLog": []
}
}
Definitions
Name | Description |
---|---|
Async |
Status of an async operation. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error Field contract. |
Error |
Error response |
Error |
Error Body contract. |
Operation |
Long Running Git Operation Results. |
Operation |
Log of the entity being created, updated or deleted. |
AsyncOperationStatus
Status of an async operation.
Name | Type | Description |
---|---|---|
Failed |
string |
|
InProgress |
string |
|
Started |
string |
|
Succeeded |
string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorFieldContract
Error Field contract.
Name | Type | Description |
---|---|---|
code |
string |
Property level error code. |
message |
string |
Human-readable representation of property-level error. |
target |
string |
Property name. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ErrorResponseBody
Error Body contract.
Name | Type | Description |
---|---|---|
code |
string |
Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. |
details |
The list of invalid fields send in request, in case of validation error. |
|
message |
string |
Human-readable representation of the error. |
OperationResultContract
Long Running Git Operation Results.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.actionLog |
This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. |
|
properties.error |
Error Body Contract |
|
properties.id |
string |
Operation result identifier. |
properties.resultInfo |
string |
Optional result info. |
properties.started |
string |
Start time of an async operation. The date conforms to the following format: |
properties.status |
Status of an async operation. |
|
properties.updated |
string |
Last update time of an async operation. The date conforms to the following format: |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
OperationResultLogItemContract
Log of the entity being created, updated or deleted.
Name | Type | Description |
---|---|---|
action |
string |
Action like create/update/delete. |
objectKey |
string |
Identifier of the entity being created/updated/deleted. |
objectType |
string |
The type of entity contract. |