Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,76 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion": {
"post": {
"operationId": "DatabaseAccounts_OfflineRegion",
"x-ms-examples": {
"CosmosDBDatabaseAccountOfflineRegion": { "$ref": "./examples/CosmosDBDatabaseAccountOfflineRegion.json" }
},
"description": "Offline the specified region for the specified Azure Cosmos DB database account.",
"x-ms-long-running-operation": true,
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/regionParameterForOnlineOffline"
}
],
"responses": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a "default" response to capture all the error responses. The schema complies with ARM RPC error contract. Example can be found Batch RP swagger spec.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravbhatnagar I have added a default error response. Can you please review.

"200": {
"description": "The offline region operation is completed successfully."
},
"202": {
"description": "Accepted. The offline region operation will complete asynchronously."
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems this is a long running operation, if so please add "x-ms-long-running-operation": true attribute for both operations

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anuchandy I have fixed based on your comment. Can you please review.

}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion": {
"post": {
"operationId": "DatabaseAccounts_OnlineRegion",
"x-ms-examples": {
"CosmosDBDatabaseAccountOnlineRegion": { "$ref": "./examples/CosmosDBDatabaseAccountOnlineRegion.json" }
},
"description": "Online the specified region for the specified Azure Cosmos DB database account.",
"x-ms-long-running-operation": true,
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/regionParameterForOnlineOffline"
}
],
"responses": {
"200": {
"description": "The online region operation is completed successfully."
},
"202": {
"description": "Accepted. The online region operation will complete asynchronously."
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys": {
"get": {
"operationId": "DatabaseAccounts_ListReadOnlyKeys",
Expand Down Expand Up @@ -2271,6 +2341,14 @@
"x-ms-parameter-location": "method",
"description": "Cosmos DB region, with spaces between words and each word capitalized."
},
"regionParameterForOnlineOffline": {
"name": "region",
"in": "query",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"description": "Cosmos DB region, with spaces between words and each word capitalized."
},
"sourceRegionParameter": {
"name": "sourceRegion",
"in": "path",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2015-04-08",
"subscriptionId": "subid",
"region":"North Europe"
},
"responses": {
"200": { },
"202": { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2015-04-08",
"subscriptionId": "subid",
"region":"North Europe"
},
"responses": {
"200": { },
"202": { }
}
}