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

Add Pause Resume API #18803

Merged
Show file tree
Hide file tree
Changes from all 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 @@ -69,7 +69,7 @@
}
],
"responses": {
"201": {
"200": {
"description": "Successful CreateJob response",
"schema": {
"$ref": "#/definitions/DataTransferJobGetResults"
Expand Down Expand Up @@ -124,6 +124,132 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause": {
"post": {
"operationId": "DataTransferJobs_Pause",
"description": "Pause a Data Transfer Job.",
"x-ms-examples": {
"CosmosDBDataTransferJobPause": {
"$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobPause.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/JobNameParameter"
}
],
"responses": {
"200": {
"description": "Successful Pause Job response",
"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/{jobName}/resume": {
"post": {
"operationId": "DataTransferJobs_Resume",
"description": "Resumes a Data Transfer Job.",
"x-ms-examples": {
"CosmosDBDataTransferJobCreate": {
"$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobResume.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/JobNameParameter"
}
],
"responses": {
"200": {
"description": "Successful Resume Job response",
"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/{jobName}/cancel": {
"post": {
"operationId": "DataTransferJobs_Cancel",
"description": "Cancels a Data Transfer Job.",
"x-ms-examples": {
"CosmosDBDataTransferJobCreate": {
"$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobCancel.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./cosmos-db.json#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/JobNameParameter"
}
],
"responses": {
"200": {
"description": "Successful Cancel Job response",
"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",
Expand Down Expand Up @@ -278,10 +404,15 @@
"type": "string",
"description": "Job Status"
},
"percentageComplete": {
"processedCount": {
"readOnly": true,
"type": "number",
"description": "Processed Count."
},
"totalCount": {
"readOnly": true,
"type": "number",
"description": "Percentage of completion."
"description": "Total Count."
},
"lastUpdatedUtcTime": {
"readOnly": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2022-02-15-preview",
"subscriptionId": "subid",
"jobName": "j1"
},
"responses": {
"200": {
"body": {
"id": "ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16",
"type": "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs",
"properties": {
"jobName": "j1",
"source": {
"tableName": "table",
"keyspaceName": "keyspace",
"component": "CosmosDBCassandra"
},
"destination": {
"component": "AzureBlobStorage",
"containerName": "blob_container",
"endpointUrl": "https://blob.windows.net"
},
"status": "Cancelled",
"processedCount": 20,
"totalCount": 100,
"lastUpdatedUtcTime": "2021-06-12T11:10:55.2780000Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2020-10-15-preview",
"api-version": "2022-02-15-preview",
"subscriptionId": "subid",
"jobName": "j1",
"jobCreateParameters": {
Expand All @@ -21,7 +21,7 @@
}
},
"responses": {
"201": {
"200": {
"body": {
"id": "ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16",
"type": "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs",
Expand All @@ -38,7 +38,8 @@
"endpointUrl": "https://blob.windows.net"
},
"status": "Running",
"percentageComplete": 20,
"processedCount": 0,
"totalCount": 0,
"lastUpdatedUtcTime": "2021-06-12T11:10:55.2780000Z"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2020-10-15-preview",
"api-version": "2022-02-15-preview",
"subscriptionId": "subid"
},
"responses": {
Expand All @@ -25,7 +25,8 @@
"containerName": "blob_container"
},
"status": "Completed",
"percentageComplete": 100,
"processedCount": 100,
"totalCount": 100,
"lastUpdatedUtcTime": "2021-06-12T12:04:23.1530000Z"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2020-10-15-preview",
"api-version": "2022-02-15-preview",
"subscriptionId": "subid",
"jobName": "j1"
},
Expand All @@ -24,7 +24,8 @@
"containerName": "blob_container"
},
"status": "Completed",
"percentageComplete": 100,
"processedCount": 50,
"totalCount": 50,
"lastUpdatedUtcTime": "2021-06-12T12:04:23.1530000Z"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2022-02-15-preview",
"subscriptionId": "subid",
"jobName": "j1"
},
"responses": {
"200": {
"body": {
"id": "ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16",
"type": "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs",
"properties": {
"jobName": "j1",
"source": {
"tableName": "table",
"keyspaceName": "keyspace",
"component": "CosmosDBCassandra"
},
"destination": {
"component": "AzureBlobStorage",
"containerName": "blob_container",
"endpointUrl": "https://blob.windows.net"
},
"status": "Paused",
"processedCount": 20,
"totalCount": 100,
"lastUpdatedUtcTime": "2021-06-12T11:10:55.2780000Z"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"accountName": "ddb1",
"resourceGroupName": "rg1",
"api-version": "2022-04-15-preview",
"subscriptionId": "subid",
"jobName": "j1"
},
"responses": {
"200": {
"body": {
"id": "ab1b6f34-b33c-46b1-98c7-3a0a63fd0d16",
"type": "Microsoft.DocumentDB/databaseAccounts/dataTransferJobs",
"properties": {
"jobName": "j1",
"source": {
"tableName": "table",
"keyspaceName": "keyspace",
"component": "CosmosDBCassandra"
},
"destination": {
"component": "AzureBlobStorage",
"containerName": "blob_container",
"endpointUrl": "https://blob.windows.net"
},
"status": "Pending",
"processedCount": 20,
"totalCount": 100,
"lastUpdatedUtcTime": "2021-06-12T11:10:55.2780000Z"
}
}
}
}
}