Skip to content
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

[Hub Generated] Review request for Microsoft.DocumentDB to add version preview/2021-10-15-preview #16211

Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b022773
Adds base for updating Microsoft.DocumentDB from version preview/2021…
niteshvijay1995 Sep 29, 2021
3207664
Updates readme
niteshvijay1995 Sep 29, 2021
1db5652
Updates API version in new specs and examples
niteshvijay1995 Sep 29, 2021
60844c7
Antoshni cosmos db 2021 10 15 preview cek management (#1)
niteshvijay1995 Sep 29, 2021
8392017
mongo rbac cherry-pick (#5)
abhijitkaranjkar89 Oct 5, 2021
ad69995
Revert "mongo rbac cherry-pick (#5)" (#7)
niteshvijay1995 Oct 8, 2021
f2491e1
preview swagger for managed cassandra (#8)
vivek-microsoft Oct 12, 2021
880e31e
fix validation, remove connectivity (#11)
vivek-microsoft Oct 14, 2021
53e213e
Add data transfer job api (#2)
niteshvijay1995 Oct 19, 2021
c6bf669
MaterializedViewsBuilder (#12)
ajparule Oct 19, 2021
23e0c72
Adding LatestRestorableTimestamp support for MongoDB collections. (#9)
amisi01 Oct 19, 2021
287e49f
Mongo RBAC Swagger Changes (#10)
abhijitkaranjkar89 Oct 19, 2021
0e69bc6
TotalThroughput limit 10-15 preview API changes (#6)
pjohari-ms Oct 19, 2021
90934e4
add backupStorageCustomerKeyUri and fix response status code (#13)
vivek-microsoft Oct 22, 2021
78ccf43
Merge branch 'main' of github.com:Azure/azure-rest-api-specs into HEAD
niteshvijay1995 Oct 26, 2021
e112c4b
Prettier fix
niteshvijay1995 Oct 26, 2021
9d6dc8a
Fix Avocado check
niteshvijay1995 Oct 26, 2021
6c7d61a
Fix operationId
niteshvijay1995 Oct 26, 2021
5c52c9c
Fix operationId
niteshvijay1995 Oct 26, 2021
76e8fca
Fix breaking change
niteshvijay1995 Oct 26, 2021
97f14ed
Fix breaking change (managedCassandra invokeCommand)
niteshvijay1995 Oct 26, 2021
ba8da86
Fix breaking change
niteshvijay1995 Oct 26, 2021
5f8274e
Fix status code in example
niteshvijay1995 Oct 27, 2021
5c95253
Fix review comment
niteshvijay1995 Nov 2, 2021
b402c75
Use v3 version for resource-management
niteshvijay1995 Nov 10, 2021
25b9827
Fix client encryption review comments
niteshvijay1995 Nov 10, 2021
56a87a1
update location header in example (#15)
vivek-microsoft Nov 11, 2021
fd3af21
Prettier fix
niteshvijay1995 Nov 12, 2021
f9ec011
update header in response
vivek67 Nov 12, 2021
192f8e9
Merge pull request #16 from niteshvijay1995/users/visunda/examplefix
vivek-microsoft Nov 12, 2021
b3054c1
formating json
vivek67 Nov 13, 2021
06a4af2
Merge pull request #17 from niteshvijay1995/users/visunda/examplefix
vivek-microsoft Nov 13, 2021
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,350 @@
{
"swagger": "2.0",
"info": {
"title": "Cosmos DB",
"description": "Azure Cosmos DB Database Data Transfer Service Resource Provider REST API",
"version": "2021-10-15-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": {
niteshvijay1995 marked this conversation as resolved.
Show resolved Hide resolved
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}": {
"put": {
"operationId": "DataTransferJobs_Create",
"description": "Creates a Data Transfer Job.",
"x-ms-examples": {
"CosmosDBDataTransferJobCreate": {
"$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobCreate.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
niteshvijay1995 marked this conversation as resolved.
Show resolved Hide resolved
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/JobNameParameter"
},
{
"name": "jobCreateParameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateJobRequest"
}
}
],
"responses": {
"201": {
Copy link
Contributor

Choose a reason for hiding this comment

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

    "201": { [](http://example.com/codeflow?start=1&length=17)

If this is not a long running operation, you can just return 200 instead of 201.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will require a fix on management service. I have pushed the fix in the pipeline, but deployment might take some time. As an exception can we merge this in the preview version and later fix it in GA.

Copy link
Member

Choose a reason for hiding this comment

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

Success response is 200. 201 is optional to indicate first time creation.

"description": "Successful CreateJob response",
"schema": {
"$ref": "#/definitions/DataTransferJobGetResults"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "cosmos-db.json#/definitions/CloudError"
}
}
}
},
"get": {
"operationId": "DataTransferJobs_Get",
"description": "Get a Data Transfer Job.",
"x-ms-examples": {
"CosmosDBDataTransferJobGet": {
"$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobGet.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/JobNameParameter"
}
],
"responses": {
"200": {
"description": "The Data Transfer Job Properties retrieved successfully",
"schema": {
"$ref": "#/definitions/DataTransferJobGetResults"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "cosmos-db.json#/definitions/CloudError"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs": {
"get": {
"operationId": "DataTransferJobs_ListByDatabaseAccount",
"description": "Get a list of Data Transfer jobs.",
"x-ms-examples": {
"CosmosDBDataTransferJobFeed": {
"$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobFeed.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "All Data Transfer Jobs retrieved successfully",
"schema": {
"$ref": "#/definitions/DataTransferJobFeedResults"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "cosmos-db.json#/definitions/CloudError"
}
}
}
}
}
},
"definitions": {
"DataTransferDataSourceSink": {
"type": "object",
"description": "Base class for all DataTransfer source/sink",
"properties": {
"component": {
"type": "string",
"enum": [
"CosmosDBCassandra",
"AzureStorage"
],
"x-ms-enum": {
"name": "DataTransferComponent",
"modelAsString": true
},
"default": "CosmosDBCassandra"
}
},
"discriminator": "component",
"required": [
"component"
]
},
"CosmosCassandraDataTransferDataSourceSink": {
"type": "object",
"description": "A CosmosDB Cassandra API data source/sink",
"properties": {
"keyspaceName": {
"type": "string"
},
"tableName": {
"type": "string"
}
},
"allOf": [
{
"$ref": "#/definitions/DataTransferDataSourceSink"
}
],
"required": [
"keyspaceName",
"tableName"
],
"x-ms-discriminator-value": "CosmosDBCassandra"
},
"AzureBlobDataTransferDataSourceSink": {
"type": "object",
"description": "An Azure Blob Storage data source/sink",
"allOf": [
{
"$ref": "#/definitions/DataTransferDataSourceSink"
}
],
"properties": {
"containerName": {
"type": "string"
},
"endpointUrl": {
"type": "string"
}
},
"required": [
"containerName"
],
"x-ms-discriminator-value": "AzureBlobStorage"
},
"DataTransferJobProperties": {
"description": "The properties of a DataTransfer Job",
"type": "object",
"properties": {
"jobName": {
"readOnly": true,
"type": "string",
"description": "Job Name"
},
"source": {
"$ref": "#/definitions/DataTransferDataSourceSink",
"description": "Source DataStore details"
},
"destination": {
"$ref": "#/definitions/DataTransferDataSourceSink",
"description": "Destination DataStore details"
},
"status": {
"readOnly": true,
"type": "string",
"description": "Job Status"
},
"percentageComplete": {
"readOnly": true,
"type": "number",
"description": "Percentage of completion."
},
"lastUpdatedUtcTime": {
"readOnly": true,
"type": "string",
"format": "date-time",
"description": "Last Updated Time (ISO-8601 format)."
},
"workerCount": {
"description": "Worker count",
"type": "integer",
"minimum": 0,
"format": "int32"
},
"error": {
"readOnly": true,
"$ref": "./cosmos-db.json#/definitions/ErrorResponse",
"description": "Error response for Faulted job"
}
niteshvijay1995 marked this conversation as resolved.
Show resolved Hide resolved
},
"required": [
"source",
"destination"
]
},
"CreateJobRequest": {
niteshvijay1995 marked this conversation as resolved.
Show resolved Hide resolved
"description": "Parameters to create Data Transfer Job",
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/DataTransferJobProperties",
"description": "Data Transfer Create Job Properties"
}
},
"required": [
"properties"
],
"allOf": [
{
"$ref": "./cosmos-db.json#/definitions/ARMProxyResource"
}
]
},
"DataTransferJobGetResults": {
"description": "A Cosmos DB Data Transfer Job",
"type": "object",
"properties": {
"properties": {
"x-ms-client-flatten": true,
"type": "object",
"$ref": "#/definitions/DataTransferJobProperties"
}
},
"allOf": [
{
"$ref": "./cosmos-db.json#/definitions/ARMProxyResource"
}
]
},
"DataTransferJobFeedResults": {
"description": "The List operation response, that contains the Data Transfer jobs and their properties.",
"type": "object",
"properties": {
"value": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/DataTransferJobGetResults"
},
"description": "List of Data Transfer jobs and their properties."
},
"nextLink": {
niteshvijay1995 marked this conversation as resolved.
Show resolved Hide resolved
"readOnly": true,
"type": "string",
"description": "URL to get the next set of Data Transfer job list results if there are any."
}
}
}
},
"parameters": {
"JobNameParameter": {
"name": "jobName",
"in": "path",
"required": true,
"type": "string",
"x-ms-parameter-location": "method",
"description": "Name of the Data Transfer Job"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2021-10-15-preview",
"subscriptionId": "subid",
"keyspaceName": "keyspaceName",
"createUpdateCassandraKeyspaceParameters": {
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "keyspaceName"
},
"options": {}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/cassandraKeyspaces/keyspaceName",
"name": "keyspaceName",
"type": "Microsoft.DocumentDB/databaseAccounts/cassandraKeyspaces",
"location": "West US",
"tags": {},
"properties": {
"resource": {
"id": "keyspaceName"
}
}
}
},
"202": {}
}
}
Loading