Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.DocumentDB to add versio…
Browse files Browse the repository at this point in the history
…n preview/2021-03-01-preview (Azure#13267)

* init

* fix format

* sync

* read only

* fix sample

* fix

Co-authored-by: Teng Pan <tepa@microsoft.com>
  • Loading branch information
tengpanpt and Teng Pan authored Apr 7, 2021
1 parent 8c3c899 commit 9fbd9c6
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5112,6 +5112,78 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations": {
"get": {
"operationId": "LocationList",
"x-ms-examples": {
"CosmosDBLocationList": {
"$ref": "./examples/CosmosDBLocationList.json"
}
},
"description": "List Cosmos DB locations and their properties",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The operation completed successfully.",
"schema": {
"$ref": "#/definitions/LocationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}": {
"get": {
"operationId": "LocationGet",
"x-ms-examples": {
"CosmosDBLocationGet": {
"$ref": "./examples/CosmosDBLocationGet.json"
}
},
"description": "Get the properties of an existing Cosmos DB location",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/locationParameter"
}
],
"responses": {
"200": {
"description": "The Cosmos DB location properties were retrieved successfully.",
"schema": {
"$ref": "#/definitions/LocationGetResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}": {
"get": {
"operationId": "RestorableDatabaseAccounts_GetByLocation",
Expand Down Expand Up @@ -8720,6 +8792,64 @@
}
}
},
"LocationListResult": {
"properties": {
"value": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/LocationGetResult"
},
"description": "List of Cosmos DB locations and their properties."
}
},
"description": "The List operation response, that contains Cosmos DB locations and their properties."
},
"LocationGetResult": {
"description": "Cosmos DB location get result",
"type": "object",
"properties": {
"properties": {
"type": "object",
"description": "Cosmos DB location metadata",
"$ref": "#/definitions/LocationProperties"
}
},
"allOf": [
{
"$ref": "#/definitions/ARMProxyResource"
}
]
},
"LocationProperties": {
"description": "Cosmos DB location metadata",
"type": "object",
"properties": {
"status": {
"type": "string",
"readOnly": true,
"description": "The current status of location in Azure."
},
"supportsAvailabilityZone": {
"type": "boolean",
"readOnly": true,
"description": "Flag indicating whether the location supports availability zones or not."
},
"isResidencyRestricted": {
"type": "boolean",
"readOnly": true,
"description": "Flag indicating whether the location is residency sensitive."
},
"backupStorageRedundancies": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/BackupStorageRedundancy"
},
"description": "The properties of available backup storage redundancies."
}
}
},
"ApiType": {
"description": "Enum to indicate the API type of the restorable database account.",
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"api-version": "2021-03-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"location": "westus"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus",
"type": "Microsoft.DocumentDB/locations",
"name": "westus",
"properties": {
"status": "ProductionSLA",
"supportsAvailabilityZone": true,
"isResidencyRestricted": true,
"backupStorageRedundancies": [
"Local",
"Geo"
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"api-version": "2021-03-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus",
"type": "Microsoft.DocumentDB/locations",
"name": "westus",
"properties": {
"status": "ProductionSLA",
"supportsAvailabilityZone": false,
"isResidencyRestricted": false,
"backupStorageRedundancies": [
"Local",
"Geo"
]
}
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus",
"type": "Microsoft.DocumentDB/locations",
"name": "centralus",
"properties": {
"status": "ProductionSLA",
"supportsAvailabilityZone": true,
"isResidencyRestricted": false,
"backupStorageRedundancies": [
"Zone",
"Geo"
]
}
}
]
}
}
}
}

0 comments on commit 9fbd9c6

Please sign in to comment.