-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Swagger changes to introduce REST APIs for offline and online region for the Cosmos DB account #2962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger changes to introduce REST APIs for offline and online region for the Cosmos DB account #2962
Changes from 4 commits
fc2e0c2
754d78c
f874740
fa9bc30
8a4a624
42bc198
ab30108
05246bc
f2366fb
9057135
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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": { | ||
| "200": { | ||
| "description": "The offline region operation is completed successfully." | ||
| }, | ||
| "202": { | ||
| "description": "Accepted. The offline region operation will complete asynchronously." | ||
| } | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems this is a long running operation, if so please add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
|
@@ -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", | ||
|
|
||
| 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": { } | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.