-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API Management Service Deleted Services Resource (#10607)
* API Management Service Deleted Services Resource * Path fix * Lint + custom-words fixes * Location URI parameter for deletedservices Resource * GET for deletedservices by service name * Remove resourceGroupName from resource path * fixes * schema for purge operation * perttier applied * 204 response code added Co-authored-by: REDMOND\glfeokti <glfeokti@microsoft.com>
- Loading branch information
Showing
9 changed files
with
441 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
175 changes: 175 additions & 0 deletions
175
...ource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimdeletedservices.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "ApiManagementClient", | ||
"description": "Use these REST APIs for performing operations in Azure API Management deployment.", | ||
"version": "2020-06-01-preview" | ||
}, | ||
"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}/providers/Microsoft.ApiManagement/deletedservices": { | ||
"get": { | ||
"tags": [ | ||
"DeletedService" | ||
], | ||
"operationId": "DeletedServices_ListBySubscription", | ||
"description": "Lists all soft-deleted services available for undelete for the given subscription.", | ||
"x-ms-examples": { | ||
"ApiManagementListRegions": { | ||
"$ref": "./examples/ApiManagementDeletedServicesListBySubscription.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "List of all soft-deleted services available for undelete for the given subscription.", | ||
"schema": { | ||
"$ref": "./definitions.json#/definitions/DeletedServicesCollection" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "./apimanagement.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}": { | ||
"get": { | ||
"tags": [ | ||
"DeletedService" | ||
], | ||
"operationId": "DeletedServices_GetByName", | ||
"description": "Get soft-deleted Api Management Service by name.", | ||
"x-ms-examples": { | ||
"ApiManagementListRegions": { | ||
"$ref": "./examples/ApiManagementGetDeletedServiceByName.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter" | ||
}, | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"name": "location", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The location of the deleted API Management service." | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Soft-deleted Api Management Service.", | ||
"schema": { | ||
"$ref": "./definitions.json#/definitions/DeletedServiceContract" | ||
} | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "./apimanagement.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"DeletedService" | ||
], | ||
"operationId": "DeletedServices_Purge", | ||
"description": "Purges Api Management Service (deletes it with no option to undelete).", | ||
"x-ms-examples": { | ||
"ApiManagementListRegions": { | ||
"$ref": "./examples/ApiManagementDeletedServicesPurge.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter" | ||
}, | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"name": "location", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The location of the deleted API Management service." | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Api Service was successfully purged." | ||
}, | ||
"202": { | ||
"description": "Api Service purge started.", | ||
"schema": { | ||
"$ref": "./definitions.json#/definitions/DeletedServiceContract" | ||
} | ||
}, | ||
"204": { | ||
"description": "The service does not exist." | ||
}, | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "./apimanagement.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": {}, | ||
"parameters": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...t/preview/2020-06-01-preview/examples/ApiManagementDeletedServicesListBySubscription.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-06-01-preview", | ||
"subscriptionId": "subid" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", | ||
"name": "apimService3", | ||
"type": "Microsoft.ApiManagement/deletedservices", | ||
"location": "West US", | ||
"properties": { | ||
"serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3", | ||
"scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", | ||
"deletionDate": "2017-05-27T15:33:55.5426123Z" | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus2/deletedservices/apimService", | ||
"name": "apimService", | ||
"type": "Microsoft.ApiManagement/deletedservices", | ||
"location": "West US 2", | ||
"properties": { | ||
"serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService", | ||
"scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", | ||
"deletionDate": "2017-05-27T15:33:55.5426123Z" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
....ApiManagement/preview/2020-06-01-preview/examples/ApiManagementDeletedServicesPurge.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"parameters": { | ||
"serviceName": "apimService3", | ||
"api-version": "2020-06-01-preview", | ||
"subscriptionId": "subid", | ||
"location": "westus" | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2020-06-01-preview" | ||
}, | ||
"body": { | ||
"id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", | ||
"name": "apimService3", | ||
"type": "Microsoft.ApiManagement/deletedservices", | ||
"location": "West US", | ||
"properties": { | ||
"serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3", | ||
"scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", | ||
"deletionDate": "2017-05-27T15:33:55.5426123Z" | ||
} | ||
} | ||
}, | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...iManagement/preview/2020-06-01-preview/examples/ApiManagementGetDeletedServiceByName.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"parameters": { | ||
"serviceName": "apimService3", | ||
"api-version": "2020-06-01-preview", | ||
"subscriptionId": "subid", | ||
"location": "westus" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", | ||
"name": "apimService3", | ||
"type": "Microsoft.ApiManagement/deletedservices", | ||
"location": "West US", | ||
"properties": { | ||
"serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3", | ||
"scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", | ||
"deletionDate": "2017-05-27T15:33:55.5426123Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.