Skip to content

Commit 9fbd9c6

Browse files
tengpanptTeng Pan
andauthored
[Hub Generated] Review request for Microsoft.DocumentDB to add version preview/2021-03-01-preview (Azure#13267)
* init * fix format * sync * read only * fix sample * fix Co-authored-by: Teng Pan <[email protected]>
1 parent 8c3c899 commit 9fbd9c6

File tree

3 files changed

+197
-0
lines changed

3 files changed

+197
-0
lines changed

specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2021-03-01-preview/cosmos-db.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5112,6 +5112,78 @@
51125112
}
51135113
}
51145114
},
5115+
"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations": {
5116+
"get": {
5117+
"operationId": "LocationList",
5118+
"x-ms-examples": {
5119+
"CosmosDBLocationList": {
5120+
"$ref": "./examples/CosmosDBLocationList.json"
5121+
}
5122+
},
5123+
"description": "List Cosmos DB locations and their properties",
5124+
"parameters": [
5125+
{
5126+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
5127+
},
5128+
{
5129+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
5130+
}
5131+
],
5132+
"responses": {
5133+
"200": {
5134+
"description": "The operation completed successfully.",
5135+
"schema": {
5136+
"$ref": "#/definitions/LocationListResult"
5137+
}
5138+
},
5139+
"default": {
5140+
"description": "Error response describing why the operation failed.",
5141+
"schema": {
5142+
"$ref": "#/definitions/CloudError"
5143+
}
5144+
}
5145+
},
5146+
"x-ms-pageable": {
5147+
"nextLinkName": null
5148+
}
5149+
}
5150+
},
5151+
"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}": {
5152+
"get": {
5153+
"operationId": "LocationGet",
5154+
"x-ms-examples": {
5155+
"CosmosDBLocationGet": {
5156+
"$ref": "./examples/CosmosDBLocationGet.json"
5157+
}
5158+
},
5159+
"description": "Get the properties of an existing Cosmos DB location",
5160+
"parameters": [
5161+
{
5162+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
5163+
},
5164+
{
5165+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
5166+
},
5167+
{
5168+
"$ref": "#/parameters/locationParameter"
5169+
}
5170+
],
5171+
"responses": {
5172+
"200": {
5173+
"description": "The Cosmos DB location properties were retrieved successfully.",
5174+
"schema": {
5175+
"$ref": "#/definitions/LocationGetResult"
5176+
}
5177+
},
5178+
"default": {
5179+
"description": "Error response describing why the operation failed.",
5180+
"schema": {
5181+
"$ref": "#/definitions/CloudError"
5182+
}
5183+
}
5184+
}
5185+
}
5186+
},
51155187
"/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}": {
51165188
"get": {
51175189
"operationId": "RestorableDatabaseAccounts_GetByLocation",
@@ -8720,6 +8792,64 @@
87208792
}
87218793
}
87228794
},
8795+
"LocationListResult": {
8796+
"properties": {
8797+
"value": {
8798+
"readOnly": true,
8799+
"type": "array",
8800+
"items": {
8801+
"$ref": "#/definitions/LocationGetResult"
8802+
},
8803+
"description": "List of Cosmos DB locations and their properties."
8804+
}
8805+
},
8806+
"description": "The List operation response, that contains Cosmos DB locations and their properties."
8807+
},
8808+
"LocationGetResult": {
8809+
"description": "Cosmos DB location get result",
8810+
"type": "object",
8811+
"properties": {
8812+
"properties": {
8813+
"type": "object",
8814+
"description": "Cosmos DB location metadata",
8815+
"$ref": "#/definitions/LocationProperties"
8816+
}
8817+
},
8818+
"allOf": [
8819+
{
8820+
"$ref": "#/definitions/ARMProxyResource"
8821+
}
8822+
]
8823+
},
8824+
"LocationProperties": {
8825+
"description": "Cosmos DB location metadata",
8826+
"type": "object",
8827+
"properties": {
8828+
"status": {
8829+
"type": "string",
8830+
"readOnly": true,
8831+
"description": "The current status of location in Azure."
8832+
},
8833+
"supportsAvailabilityZone": {
8834+
"type": "boolean",
8835+
"readOnly": true,
8836+
"description": "Flag indicating whether the location supports availability zones or not."
8837+
},
8838+
"isResidencyRestricted": {
8839+
"type": "boolean",
8840+
"readOnly": true,
8841+
"description": "Flag indicating whether the location is residency sensitive."
8842+
},
8843+
"backupStorageRedundancies": {
8844+
"readOnly": true,
8845+
"type": "array",
8846+
"items": {
8847+
"$ref": "#/definitions/BackupStorageRedundancy"
8848+
},
8849+
"description": "The properties of available backup storage redundancies."
8850+
}
8851+
}
8852+
},
87238853
"ApiType": {
87248854
"description": "Enum to indicate the API type of the restorable database account.",
87258855
"type": "string",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-03-01-preview",
4+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
5+
"location": "westus"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus",
11+
"type": "Microsoft.DocumentDB/locations",
12+
"name": "westus",
13+
"properties": {
14+
"status": "ProductionSLA",
15+
"supportsAvailabilityZone": true,
16+
"isResidencyRestricted": true,
17+
"backupStorageRedundancies": [
18+
"Local",
19+
"Geo"
20+
]
21+
}
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-03-01-preview",
4+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus",
12+
"type": "Microsoft.DocumentDB/locations",
13+
"name": "westus",
14+
"properties": {
15+
"status": "ProductionSLA",
16+
"supportsAvailabilityZone": false,
17+
"isResidencyRestricted": false,
18+
"backupStorageRedundancies": [
19+
"Local",
20+
"Geo"
21+
]
22+
}
23+
},
24+
{
25+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/centralus",
26+
"type": "Microsoft.DocumentDB/locations",
27+
"name": "centralus",
28+
"properties": {
29+
"status": "ProductionSLA",
30+
"supportsAvailabilityZone": true,
31+
"isResidencyRestricted": false,
32+
"backupStorageRedundancies": [
33+
"Zone",
34+
"Geo"
35+
]
36+
}
37+
}
38+
]
39+
}
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)