|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "Cosmos DB", |
| 5 | + "description": "Azure Cosmos DB Database Data Transfer Service Resource Provider REST API", |
| 6 | + "version": "2022-02-15-preview" |
| 7 | + }, |
| 8 | + "host": "management.azure.com", |
| 9 | + "schemes": [ |
| 10 | + "https" |
| 11 | + ], |
| 12 | + "consumes": [ |
| 13 | + "application/json" |
| 14 | + ], |
| 15 | + "produces": [ |
| 16 | + "application/json" |
| 17 | + ], |
| 18 | + "security": [ |
| 19 | + { |
| 20 | + "azure_auth": [ |
| 21 | + "user_impersonation" |
| 22 | + ] |
| 23 | + } |
| 24 | + ], |
| 25 | + "securityDefinitions": { |
| 26 | + "azure_auth": { |
| 27 | + "type": "oauth2", |
| 28 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 29 | + "flow": "implicit", |
| 30 | + "description": "Azure Active Directory OAuth2 Flow", |
| 31 | + "scopes": { |
| 32 | + "user_impersonation": "Impersonate your user account" |
| 33 | + } |
| 34 | + } |
| 35 | + }, |
| 36 | + "paths": { |
| 37 | + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}": { |
| 38 | + "put": { |
| 39 | + "operationId": "DataTransferJobs_Create", |
| 40 | + "description": "Creates a Data Transfer Job.", |
| 41 | + "x-ms-examples": { |
| 42 | + "CosmosDBDataTransferJobCreate": { |
| 43 | + "$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobCreate.json" |
| 44 | + } |
| 45 | + }, |
| 46 | + "parameters": [ |
| 47 | + { |
| 48 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" |
| 49 | + }, |
| 50 | + { |
| 51 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" |
| 52 | + }, |
| 53 | + { |
| 54 | + "$ref": "./cosmos-db.json#/parameters/accountNameParameter" |
| 55 | + }, |
| 56 | + { |
| 57 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" |
| 58 | + }, |
| 59 | + { |
| 60 | + "$ref": "#/parameters/JobNameParameter" |
| 61 | + }, |
| 62 | + { |
| 63 | + "name": "jobCreateParameters", |
| 64 | + "in": "body", |
| 65 | + "required": true, |
| 66 | + "schema": { |
| 67 | + "$ref": "#/definitions/CreateJobRequest" |
| 68 | + } |
| 69 | + } |
| 70 | + ], |
| 71 | + "responses": { |
| 72 | + "201": { |
| 73 | + "description": "Successful CreateJob response", |
| 74 | + "schema": { |
| 75 | + "$ref": "#/definitions/DataTransferJobGetResults" |
| 76 | + } |
| 77 | + }, |
| 78 | + "default": { |
| 79 | + "description": "Error response describing why the operation failed.", |
| 80 | + "schema": { |
| 81 | + "$ref": "cosmos-db.json#/definitions/CloudError" |
| 82 | + } |
| 83 | + } |
| 84 | + } |
| 85 | + }, |
| 86 | + "get": { |
| 87 | + "operationId": "DataTransferJobs_Get", |
| 88 | + "description": "Get a Data Transfer Job.", |
| 89 | + "x-ms-examples": { |
| 90 | + "CosmosDBDataTransferJobGet": { |
| 91 | + "$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobGet.json" |
| 92 | + } |
| 93 | + }, |
| 94 | + "parameters": [ |
| 95 | + { |
| 96 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" |
| 97 | + }, |
| 98 | + { |
| 99 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" |
| 100 | + }, |
| 101 | + { |
| 102 | + "$ref": "./cosmos-db.json#/parameters/accountNameParameter" |
| 103 | + }, |
| 104 | + { |
| 105 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" |
| 106 | + }, |
| 107 | + { |
| 108 | + "$ref": "#/parameters/JobNameParameter" |
| 109 | + } |
| 110 | + ], |
| 111 | + "responses": { |
| 112 | + "200": { |
| 113 | + "description": "The Data Transfer Job Properties retrieved successfully", |
| 114 | + "schema": { |
| 115 | + "$ref": "#/definitions/DataTransferJobGetResults" |
| 116 | + } |
| 117 | + }, |
| 118 | + "default": { |
| 119 | + "description": "Error response describing why the operation failed.", |
| 120 | + "schema": { |
| 121 | + "$ref": "cosmos-db.json#/definitions/CloudError" |
| 122 | + } |
| 123 | + } |
| 124 | + } |
| 125 | + } |
| 126 | + }, |
| 127 | + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs": { |
| 128 | + "get": { |
| 129 | + "operationId": "DataTransferJobs_ListByDatabaseAccount", |
| 130 | + "description": "Get a list of Data Transfer jobs.", |
| 131 | + "x-ms-examples": { |
| 132 | + "CosmosDBDataTransferJobFeed": { |
| 133 | + "$ref": "./examples/data-transfer-service/CosmosDBDataTransferJobFeed.json" |
| 134 | + } |
| 135 | + }, |
| 136 | + "x-ms-pageable": { |
| 137 | + "nextLinkName": "nextLink" |
| 138 | + }, |
| 139 | + "parameters": [ |
| 140 | + { |
| 141 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" |
| 142 | + }, |
| 143 | + { |
| 144 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" |
| 145 | + }, |
| 146 | + { |
| 147 | + "$ref": "./cosmos-db.json#/parameters/accountNameParameter" |
| 148 | + }, |
| 149 | + { |
| 150 | + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" |
| 151 | + } |
| 152 | + ], |
| 153 | + "responses": { |
| 154 | + "200": { |
| 155 | + "description": "All Data Transfer Jobs retrieved successfully", |
| 156 | + "schema": { |
| 157 | + "$ref": "#/definitions/DataTransferJobFeedResults" |
| 158 | + } |
| 159 | + }, |
| 160 | + "default": { |
| 161 | + "description": "Error response describing why the operation failed.", |
| 162 | + "schema": { |
| 163 | + "$ref": "cosmos-db.json#/definitions/CloudError" |
| 164 | + } |
| 165 | + } |
| 166 | + } |
| 167 | + } |
| 168 | + } |
| 169 | + }, |
| 170 | + "definitions": { |
| 171 | + "DataTransferDataSourceSink": { |
| 172 | + "type": "object", |
| 173 | + "description": "Base class for all DataTransfer source/sink", |
| 174 | + "properties": { |
| 175 | + "component": { |
| 176 | + "type": "string", |
| 177 | + "enum": [ |
| 178 | + "CosmosDBCassandra", |
| 179 | + "CosmosDBSql", |
| 180 | + "AzureBlobStorage" |
| 181 | + ], |
| 182 | + "x-ms-enum": { |
| 183 | + "name": "DataTransferComponent", |
| 184 | + "modelAsString": true |
| 185 | + }, |
| 186 | + "default": "CosmosDBCassandra" |
| 187 | + } |
| 188 | + }, |
| 189 | + "discriminator": "component", |
| 190 | + "required": [ |
| 191 | + "component" |
| 192 | + ] |
| 193 | + }, |
| 194 | + "CosmosCassandraDataTransferDataSourceSink": { |
| 195 | + "type": "object", |
| 196 | + "description": "A CosmosDB Cassandra API data source/sink", |
| 197 | + "properties": { |
| 198 | + "keyspaceName": { |
| 199 | + "type": "string" |
| 200 | + }, |
| 201 | + "tableName": { |
| 202 | + "type": "string" |
| 203 | + } |
| 204 | + }, |
| 205 | + "allOf": [ |
| 206 | + { |
| 207 | + "$ref": "#/definitions/DataTransferDataSourceSink" |
| 208 | + } |
| 209 | + ], |
| 210 | + "required": [ |
| 211 | + "keyspaceName", |
| 212 | + "tableName" |
| 213 | + ], |
| 214 | + "x-ms-discriminator-value": "CosmosDBCassandra" |
| 215 | + }, |
| 216 | + "CosmosSqlDataTransferDataSourceSink": { |
| 217 | + "type": "object", |
| 218 | + "description": "A CosmosDB Cassandra API data source/sink", |
| 219 | + "properties": { |
| 220 | + "databaseName": { |
| 221 | + "type": "string" |
| 222 | + }, |
| 223 | + "containerName": { |
| 224 | + "type": "string" |
| 225 | + } |
| 226 | + }, |
| 227 | + "allOf": [ |
| 228 | + { |
| 229 | + "$ref": "#/definitions/DataTransferDataSourceSink" |
| 230 | + } |
| 231 | + ], |
| 232 | + "required": [ |
| 233 | + "databaseName", |
| 234 | + "containerName" |
| 235 | + ], |
| 236 | + "x-ms-discriminator-value": "CosmosDBSql" |
| 237 | + }, |
| 238 | + "AzureBlobDataTransferDataSourceSink": { |
| 239 | + "type": "object", |
| 240 | + "description": "An Azure Blob Storage data source/sink", |
| 241 | + "allOf": [ |
| 242 | + { |
| 243 | + "$ref": "#/definitions/DataTransferDataSourceSink" |
| 244 | + } |
| 245 | + ], |
| 246 | + "properties": { |
| 247 | + "containerName": { |
| 248 | + "type": "string" |
| 249 | + }, |
| 250 | + "endpointUrl": { |
| 251 | + "type": "string" |
| 252 | + } |
| 253 | + }, |
| 254 | + "required": [ |
| 255 | + "containerName" |
| 256 | + ], |
| 257 | + "x-ms-discriminator-value": "AzureBlobStorage" |
| 258 | + }, |
| 259 | + "DataTransferJobProperties": { |
| 260 | + "description": "The properties of a DataTransfer Job", |
| 261 | + "type": "object", |
| 262 | + "properties": { |
| 263 | + "jobName": { |
| 264 | + "readOnly": true, |
| 265 | + "type": "string", |
| 266 | + "description": "Job Name" |
| 267 | + }, |
| 268 | + "source": { |
| 269 | + "$ref": "#/definitions/DataTransferDataSourceSink", |
| 270 | + "description": "Source DataStore details" |
| 271 | + }, |
| 272 | + "destination": { |
| 273 | + "$ref": "#/definitions/DataTransferDataSourceSink", |
| 274 | + "description": "Destination DataStore details" |
| 275 | + }, |
| 276 | + "status": { |
| 277 | + "readOnly": true, |
| 278 | + "type": "string", |
| 279 | + "description": "Job Status" |
| 280 | + }, |
| 281 | + "percentageComplete": { |
| 282 | + "readOnly": true, |
| 283 | + "type": "number", |
| 284 | + "description": "Percentage of completion." |
| 285 | + }, |
| 286 | + "lastUpdatedUtcTime": { |
| 287 | + "readOnly": true, |
| 288 | + "type": "string", |
| 289 | + "format": "date-time", |
| 290 | + "description": "Last Updated Time (ISO-8601 format)." |
| 291 | + }, |
| 292 | + "workerCount": { |
| 293 | + "description": "Worker count", |
| 294 | + "type": "integer", |
| 295 | + "minimum": 0, |
| 296 | + "format": "int32" |
| 297 | + }, |
| 298 | + "error": { |
| 299 | + "readOnly": true, |
| 300 | + "$ref": "./cosmos-db.json#/definitions/ErrorResponse", |
| 301 | + "description": "Error response for Faulted job" |
| 302 | + } |
| 303 | + }, |
| 304 | + "required": [ |
| 305 | + "source", |
| 306 | + "destination" |
| 307 | + ] |
| 308 | + }, |
| 309 | + "CreateJobRequest": { |
| 310 | + "description": "Parameters to create Data Transfer Job", |
| 311 | + "type": "object", |
| 312 | + "properties": { |
| 313 | + "properties": { |
| 314 | + "$ref": "#/definitions/DataTransferJobProperties", |
| 315 | + "description": "Data Transfer Create Job Properties" |
| 316 | + } |
| 317 | + }, |
| 318 | + "required": [ |
| 319 | + "properties" |
| 320 | + ], |
| 321 | + "allOf": [ |
| 322 | + { |
| 323 | + "$ref": "./cosmos-db.json#/definitions/ARMProxyResource" |
| 324 | + } |
| 325 | + ] |
| 326 | + }, |
| 327 | + "DataTransferJobGetResults": { |
| 328 | + "description": "A Cosmos DB Data Transfer Job", |
| 329 | + "type": "object", |
| 330 | + "properties": { |
| 331 | + "properties": { |
| 332 | + "x-ms-client-flatten": true, |
| 333 | + "type": "object", |
| 334 | + "$ref": "#/definitions/DataTransferJobProperties" |
| 335 | + } |
| 336 | + }, |
| 337 | + "allOf": [ |
| 338 | + { |
| 339 | + "$ref": "./cosmos-db.json#/definitions/ARMProxyResource" |
| 340 | + } |
| 341 | + ] |
| 342 | + }, |
| 343 | + "DataTransferJobFeedResults": { |
| 344 | + "description": "The List operation response, that contains the Data Transfer jobs and their properties.", |
| 345 | + "type": "object", |
| 346 | + "properties": { |
| 347 | + "value": { |
| 348 | + "readOnly": true, |
| 349 | + "type": "array", |
| 350 | + "items": { |
| 351 | + "$ref": "#/definitions/DataTransferJobGetResults" |
| 352 | + }, |
| 353 | + "description": "List of Data Transfer jobs and their properties." |
| 354 | + }, |
| 355 | + "nextLink": { |
| 356 | + "readOnly": true, |
| 357 | + "type": "string", |
| 358 | + "description": "URL to get the next set of Data Transfer job list results if there are any." |
| 359 | + } |
| 360 | + } |
| 361 | + } |
| 362 | + }, |
| 363 | + "parameters": { |
| 364 | + "JobNameParameter": { |
| 365 | + "name": "jobName", |
| 366 | + "in": "path", |
| 367 | + "required": true, |
| 368 | + "type": "string", |
| 369 | + "x-ms-parameter-location": "method", |
| 370 | + "description": "Name of the Data Transfer Job" |
| 371 | + } |
| 372 | + } |
| 373 | +} |
0 commit comments