From 3ab01d9ca6311a5f2005cb4e56dce0f5ca91c548 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 27 Oct 2020 23:44:18 -0700 Subject: [PATCH 01/24] adding new restorable apis --- .../preview/2020-06-01-preview/cosmos-db.json | 438 ++++++++++++++++++ .../CosmosDBRestorableContainerGet.json | 79 ++++ .../CosmosDBRestorableContainerList.json | 150 ++++++ .../CosmosDBRestorableDatabaseGet.json | 35 ++ .../CosmosDBRestorableDatabaseList.json | 83 ++++ .../CosmosDBRestorableResourceList.json | 35 ++ 6 files changed, 820 insertions(+) create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseGet.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index 918f269d90aa..e8cc025c4c1e 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4298,6 +4298,228 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases": { + "get": { + "operationId": "RestorableSqlDatabases_List", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableDatabaseList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB SQL databases available under the restorable account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlDatabasesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{databaseSnapshotId}": { + "get": { + "operationId": "RestorableSqlDatabase_Get", + "x-ms-examples": { + "CosmosDBDatabaseAccountGet": { + "$ref": "./examples/CosmosDBRestorableDatabaseGet.json" + } + }, + "description": "Get the properties of a restorable SQL database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/databaseSnapshotIdParameter" + } + ], + "responses": { + "200": { + "description": "The restorable SQL databases properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlDatabaseGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers": { + "get": { + "operationId": "RestorableSqlContainers_List", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableContainerList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB SQL databases available for a specific database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableSqlDatabaseRidParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlContainersListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{containerSnapshotId}": { + "get": { + "operationId": "RestorableSqlContainer_Get", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableContainerGet.json" + } + }, + "description": "Get the properties of a restorable SQL container.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/containerSnapshotIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlContainerGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources": { + "get": { + "operationId": "RestorableSqlContainers_List", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableContainerList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB SQL databases available for a specific database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restoreLocationParameter" + }, + { + "$ref": "#/parameters/restoreTimestampInUtcParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlResourcesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } } }, "definitions": { @@ -7839,6 +8061,181 @@ "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." } } + }, + "RestorableSqlDatabasesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableSqlDatabaseGetResult" + }, + "description": "List of restorable SQL databases and their properties." + } + }, + "description": "The List operation response, that contains the restorable SQL databases and their properties." + }, + "RestorableSqlDatabaseGetResult": { + "description": "An Azure Cosmos DB restorable SQL database", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable SQL database.", + "$ref": "#/definitions/RestorableSqlDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableSqlDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB restorable SQL database", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "description": "A system generated property. A unique identifier.", + "readOnly": true + }, + "operationType": { + "type": "string", + "description": "The operation type of this database event." + }, + "eventTimestamp": { + "type": "string", + "description": "The timestamp of this database event." + }, + "ownerId": { + "type": "string", + "description": "The name of type of this restorable sql database." + }, + "ownerResourceId": { + "type": "string", + "description": "The resource Id of type of this restorable sql database." + }, + "database": { + "properties": { + "_colls": { + "type": "string", + "description": "A system generated property that specified the addressable path of the collections resource." + }, + "_users": { + "type": "string", + "description": "A system generated property that specifies the addressable path of the users resource." + }, + "_self": { + "type": "string", + "description": "A system generated property that specifies the addressable path of the database resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/SqlDatabaseResource" + }, + { + "$ref": "#/definitions/ExtendedResourceProperties" + } + ] + } + } + } + } + }, + "RestorableSqlContainersListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableSqlContainerGetResult" + }, + "description": "List of restorable SQL containers and their properties." + } + }, + "description": "The List operation response, that contains the restorable SQL containers and their properties." + }, + "RestorableSqlContainerGetResult": { + "description": "An Azure Cosmos DB restorable SQL container", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable SQL container.", + "$ref": "#/definitions/RestorableSqlContainerProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableSqlContainerProperties": { + "description": "The properties of an Azure Cosmos DB restorable SQL container", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "description": "A system generated property. A unique identifier.", + "readOnly": true + }, + "operationType": { + "type": "string", + "description": "The operation type of this container event." + }, + "eventTimestamp": { + "type": "string", + "description": "The timestamp of this container event." + }, + "ownerId": { + "type": "string", + "description": "The name of type of this restorable sql container." + }, + "ownerResourceId": { + "type": "string", + "description": "The resource Id of type of this restorable sql container." + }, + "documentCollection": { + "properties": { + "_self": { + "type": "string", + "description": "A system generated property that specifies the addressable path of the container resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/SqlContainerResource" + }, + { + "$ref": "#/definitions/ExtendedResourceProperties" + } + ] + } + } + } + } + }, + "RestorableSqlResourcesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseRestoreResource" + }, + "description": "List of restorable SQL resources, including the database and collection names." + } + }, + "description": "The List operation response, that contains the restorable SQL resources." } }, "parameters": { @@ -8015,6 +8412,47 @@ "type": "string", "x-ms-parameter-location": "method", "description": "The instanceId GUID of a restorable database account." + }, + "databaseSnapshotIdParameter": { + "name": "databaseSnapshotId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The snapshot GUID of the restorable SQL database." + }, + "containerSnapshotIdParameter": { + "name": "containerSnapshotId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The snapshot GUID of the restorable SQL container." + }, + + "restorableSqlDatabaseRidParameter": { + "name": "restorableSqlDatabaseRid", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The resource id of the restorable SQL database." + }, + "restoreLocationParameter": { + "name": "restoreLocation", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The location where the resources are located." + }, + "restoreTimestampInUtcParameter": { + "name": "restoreTimestampInUtc", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The timestamp when the resource exists." } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json new file mode 100644 index 000000000000..f5e59079419d --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", + "containerSnapshotId": "79609a98-3394-41f8-911f-cfab0c075c86" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/79609a98-3394-41f8-911f-cfab0c075c86", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", + "name": "79609a98-3394-41f8-911f-cfab0c075c86", + "properties": { + "resource": { + "_rid": "zAyAPQAAAA==", + "eventTimestamp": "2020-10-13T04:56:42Z", + "ownerId": "Container1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Create", + "documentCollection": { + "id": "Container1", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "supportSpatialLegacyCoordinates": false, + "usePolygonsSmallerThanAHemisphere": false, + "includedPaths": [ + { + "path": "/*" + }, + { + "path": "/\"_ts\"/?" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "internalIndexingProperties": { + "enableIndexingFullFidelity": true, + "logicalIndexVersion": 2, + "indexEncodingOptions": 65551 + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "backupPolicy": { + "type": 1 + }, + "allowMaterializedViews": false, + "geospatialConfig": { + "type": "Geography" + }, + "typeSystemPolicy": { + "typeSystem": "CosmosCore" + }, + "uniqueIndexNameEncodingMode": 1, + "_idxpolicyver": 2, + "_rid": "V18LoLrv-qA=", + "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", + "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"", + "_docs": "docs/", + "_sprocs": "sprocs/", + "_triggers": "triggers/", + "_udfs": "udfs/", + "_conflicts": "conflicts/" + } + } + } + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json new file mode 100644 index 000000000000..babd632be396 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "location": "WestUS", + "instanceId": "98a570f2-63db-4117-91f0-366327b7b353", + "restorableSqlDatabaseRid": "3fu-hg==" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/79609a98-3394-41f8-911f-cfab0c075c86", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", + "name": "79609a98-3394-41f8-911f-cfab0c075c86", + "properties": { + "resource": { + "_rid": "zAyAPQAAAA==", + "eventTimestamp": "2020-10-13T04:56:42Z", + "ownerId": "Container1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Create", + "documentCollection": { + "id": "Container1", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "supportSpatialLegacyCoordinates": false, + "usePolygonsSmallerThanAHemisphere": false, + "includedPaths": [ + { + "path": "/*" + }, + { + "path": "/\"_ts\"/?" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "internalIndexingProperties": { + "enableIndexingFullFidelity": true, + "logicalIndexVersion": 2, + "indexEncodingOptions": 65551 + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "backupPolicy": { + "type": 1 + }, + "allowMaterializedViews": false, + "geospatialConfig": { + "type": "Geography" + }, + "typeSystemPolicy": { + "typeSystem": "CosmosCore" + }, + "uniqueIndexNameEncodingMode": 1, + "_idxpolicyver": 2, + "_rid": "V18LoLrv-qA=", + "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", + "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"", + "_docs": "docs/", + "_sprocs": "sprocs/", + "_triggers": "triggers/", + "_udfs": "udfs/", + "_conflicts": "conflicts/" + } + } + } + }, + { + "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/e85298a1-c631-4726-825e-a7ca092e9098", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", + "name": "e85298a1-c631-4726-825e-a7ca092e9098", + "properties": { + "resource": { + "_rid": "PrArcgAAAA==", + "eventTimestamp": "2020-10-13T05:03:27Z", + "ownerId": "Container1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Replace", + "documentCollection": { + "id": "Container1", + "indexingPolicy": { + "indexingMode": "consistent", + "automatic": true, + "supportSpatialLegacyCoordinates": false, + "usePolygonsSmallerThanAHemisphere": false, + "includedPaths": [ + { + "path": "/*" + }, + { + "path": "/\"_ts\"/?" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "defaultTtl": 12345, + "internalIndexingProperties": { + "enableIndexingFullFidelity": true, + "logicalIndexVersion": 2, + "indexEncodingOptions": 65551 + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "backupPolicy": { + "type": 1 + }, + "allowMaterializedViews": false, + "geospatialConfig": { + "type": "Geography" + }, + "typeSystemPolicy": { + "typeSystem": "CosmosCore" + }, + "uniqueIndexNameEncodingMode": 1, + "_idxpolicyver": 2, + "_rid": "V18LoLrv-qA=", + "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", + "_etag": "\"00004400-0000-0700-0000-5f85351f0000\"", + "_docs": "docs/", + "_sprocs": "sprocs/", + "_triggers": "triggers/", + "_udfs": "udfs/", + "_conflicts": "conflicts/" + } + } + } + } + ] + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseGet.json new file mode 100644 index 000000000000..4bba28fefc49 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseGet.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", + "databaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableSqlDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", + "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", + "properties": { + "resource": { + "_rid": "DLB14gAAAA==", + "eventTimestamp": "2020-09-02T19:45:03Z", + "ownerId": "Database1", + "ownerResourceId": "3fu-hg==", + "operationType": "Create", + "database": { + "id": "Database1", + "_rid": "3fu-hg==", + "_self": "dbs/3fu-hg==/", + "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", + "_colls": "colls/", + "_users": "users/" + } + } + } + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json new file mode 100644 index 000000000000..e4e3e1ba13f9 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableSqlDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", + "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", + "properties": { + "resource": { + "_rid": "DLB14gAAAA==", + "eventTimestamp": "2020-09-02T19:45:03Z", + "ownerId": "Database1", + "ownerResourceId": "3fu-hg==", + "operationType": "Create", + "database": { + "id": "Database1", + "_rid": "3fu-hg==", + "_self": "dbs/3fu-hg==/", + "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", + "_colls": "colls/", + "_users": "users/" + } + } + } + }, + { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableSqlDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", + "name": "8456cb17-cdb0-4c6a-8db8-d0ff3f886257", + "properties": { + "resource": { + "_rid": "ESXNLAAAAA==", + "eventTimestamp": "2020-09-02T19:53:42Z", + "ownerId": "Database1", + "ownerResourceId": "3fu-hg==", + "database": { + "id": "Database1", + "_rid": "3fu-hg==", + "_self": "dbs/3fu-hg==/", + "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", + "_colls": "colls/", + "_users": "users/", + "_ts": 1599075903 + }, + "operationType": "Delete" + } + } + }, + { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableSqlDatabases/2c07991b-9c7c-4e85-be68-b18c1f2ff326", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", + "name": "2c07991b-9c7c-4e85-be68-b18c1f2ff326", + "properties": { + "resource": { + "_rid": "aXFqUQAAAA==", + "eventTimestamp": "2020-09-02T19:53:15Z", + "ownerId": "Database2", + "ownerResourceId": "0SziSg==", + "database": { + "id": "Database2", + "_rid": "0SziSg==", + "_self": "dbs/0SziSg==/", + "_etag": "\"0000ca0a-0000-0700-0000-5f4ff82b0000\"", + "_colls": "colls/", + "_users": "users/" + }, + "operationType": "Create" + } + } + } + ] + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json new file mode 100644 index 000000000000..9805487fed6a --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", + "restoreLocation": "WestUS", + "restoreTimestampInUtc": "10/13/2020 4:56" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "databaseName": "Database1", + "collectionNames": [ + "Container1" + ] + }, + { + "databaseName": "Database2", + "collectionNames": [ + "Container1", + "Container2" + ] + }, + { + "databaseName": "Database3", + "collectionNames": [] + } + ] + } + } + } +} From dea7e44266f205d876564f24f16401e30d0a2d54 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 28 Oct 2020 10:14:55 -0700 Subject: [PATCH 02/24] fix some typos --- .../preview/2020-06-01-preview/cosmos-db.json | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index e8cc025c4c1e..ba4c8e0d73de 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4303,7 +4303,7 @@ "get": { "operationId": "RestorableSqlDatabases_List", "x-ms-examples": { - "CosmosDBDatabaseAccountList": { + "CosmosDBRestorableDatabaseList": { "$ref": "./examples/CosmosDBRestorableDatabaseList.json" } }, @@ -4345,7 +4345,7 @@ "get": { "operationId": "RestorableSqlDatabase_Get", "x-ms-examples": { - "CosmosDBDatabaseAccountGet": { + "CosmosDBRestorableDatabaseGet": { "$ref": "./examples/CosmosDBRestorableDatabaseGet.json" } }, @@ -4387,11 +4387,11 @@ "get": { "operationId": "RestorableSqlContainers_List", "x-ms-examples": { - "CosmosDBDatabaseAccountList": { + "CosmosDBRestorableContainerList": { "$ref": "./examples/CosmosDBRestorableContainerList.json" } }, - "description": "Lists all the restorable Azure Cosmos DB SQL databases available for a specific database.", + "description": "Lists all the restorable Azure Cosmos DB SQL containers available for a specific database.", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" @@ -4432,7 +4432,7 @@ "get": { "operationId": "RestorableSqlContainer_Get", "x-ms-examples": { - "CosmosDBDatabaseAccountList": { + "CosmosDBRestorableContainerGet": { "$ref": "./examples/CosmosDBRestorableContainerGet.json" } }, @@ -4477,11 +4477,11 @@ "get": { "operationId": "RestorableSqlContainers_List", "x-ms-examples": { - "CosmosDBDatabaseAccountList": { - "$ref": "./examples/CosmosDBRestorableContainerList.json" + "CosmosDBRestorableResourceList": { + "$ref": "./examples/CosmosDBRestorableResourceList.json" } }, - "description": "Lists all the restorable Azure Cosmos DB SQL databases available for a specific database.", + "description": "Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time.", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" @@ -8113,11 +8113,11 @@ }, "ownerId": { "type": "string", - "description": "The name of type of this restorable sql database." + "description": "The name of type of this restorable SQL database." }, "ownerResourceId": { "type": "string", - "description": "The resource Id of type of this restorable sql database." + "description": "The resource Id of type of this restorable SQL database." }, "database": { "properties": { @@ -8198,11 +8198,11 @@ }, "ownerId": { "type": "string", - "description": "The name of type of this restorable sql container." + "description": "The name of type of this restorable SQL container." }, "ownerResourceId": { "type": "string", - "description": "The resource Id of type of this restorable sql container." + "description": "The resource Id of type of this restorable SQL container." }, "documentCollection": { "properties": { @@ -8429,7 +8429,6 @@ "x-ms-parameter-location": "method", "description": "The snapshot GUID of the restorable SQL container." }, - "restorableSqlDatabaseRidParameter": { "name": "restorableSqlDatabaseRid", "in": "query", @@ -8452,7 +8451,7 @@ "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The timestamp when the resource exists." + "description": "The timestamp when the resources exist." } } } From ec60ddc195dec039dc56cfb17b428afa9e499a3d Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 28 Oct 2020 10:28:51 -0700 Subject: [PATCH 03/24] fix validations --- .../preview/2020-06-01-preview/cosmos-db.json | 2 +- .../CosmosDBRestorableContainerGet.json | 22 ++----------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index ba4c8e0d73de..dc7f2c0cd365 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4475,7 +4475,7 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources": { "get": { - "operationId": "RestorableSqlContainers_List", + "operationId": "RestorableSqlResources_List", "x-ms-examples": { "CosmosDBRestorableResourceList": { "$ref": "./examples/CosmosDBRestorableResourceList.json" diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json index f5e59079419d..6c88dd97f08a 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json @@ -22,10 +22,8 @@ "documentCollection": { "id": "Container1", "indexingPolicy": { - "indexingMode": "consistent", + "indexingMode": "Consistent", "automatic": true, - "supportSpatialLegacyCoordinates": false, - "usePolygonsSmallerThanAHemisphere": false, "includedPaths": [ { "path": "/*" @@ -50,26 +48,10 @@ "conflictResolutionPath": "/_ts", "conflictResolutionProcedure": "" }, - "backupPolicy": { - "type": 1 - }, - "allowMaterializedViews": false, - "geospatialConfig": { - "type": "Geography" - }, - "typeSystemPolicy": { - "typeSystem": "CosmosCore" - }, - "uniqueIndexNameEncodingMode": 1, - "_idxpolicyver": 2, "_rid": "V18LoLrv-qA=", "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" + "_docs": "docs/" } } } From a0dc570e00b210f4ce3d236b59bb235b2f063af9 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 28 Oct 2020 10:35:03 -0700 Subject: [PATCH 04/24] fix more validations --- .../CosmosDBRestorableContainerGet.json | 8 +-- .../CosmosDBRestorableContainerList.json | 56 ++----------------- 2 files changed, 5 insertions(+), 59 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json index 6c88dd97f08a..c6e659553dd1 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json @@ -38,11 +38,6 @@ } ] }, - "internalIndexingProperties": { - "enableIndexingFullFidelity": true, - "logicalIndexVersion": 2, - "indexEncodingOptions": 65551 - }, "conflictResolutionPolicy": { "mode": "LastWriterWins", "conflictResolutionPath": "/_ts", @@ -50,8 +45,7 @@ }, "_rid": "V18LoLrv-qA=", "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"", - "_docs": "docs/" + "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json index babd632be396..fb8992aa0d12 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json @@ -24,10 +24,8 @@ "documentCollection": { "id": "Container1", "indexingPolicy": { - "indexingMode": "consistent", + "indexingMode": "Consistent", "automatic": true, - "supportSpatialLegacyCoordinates": false, - "usePolygonsSmallerThanAHemisphere": false, "includedPaths": [ { "path": "/*" @@ -42,36 +40,14 @@ } ] }, - "internalIndexingProperties": { - "enableIndexingFullFidelity": true, - "logicalIndexVersion": 2, - "indexEncodingOptions": 65551 - }, "conflictResolutionPolicy": { "mode": "LastWriterWins", "conflictResolutionPath": "/_ts", "conflictResolutionProcedure": "" }, - "backupPolicy": { - "type": 1 - }, - "allowMaterializedViews": false, - "geospatialConfig": { - "type": "Geography" - }, - "typeSystemPolicy": { - "typeSystem": "CosmosCore" - }, - "uniqueIndexNameEncodingMode": 1, - "_idxpolicyver": 2, "_rid": "V18LoLrv-qA=", "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" + "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" } } } @@ -90,10 +66,8 @@ "documentCollection": { "id": "Container1", "indexingPolicy": { - "indexingMode": "consistent", + "indexingMode": "Consistent", "automatic": true, - "supportSpatialLegacyCoordinates": false, - "usePolygonsSmallerThanAHemisphere": false, "includedPaths": [ { "path": "/*" @@ -109,36 +83,14 @@ ] }, "defaultTtl": 12345, - "internalIndexingProperties": { - "enableIndexingFullFidelity": true, - "logicalIndexVersion": 2, - "indexEncodingOptions": 65551 - }, "conflictResolutionPolicy": { "mode": "LastWriterWins", "conflictResolutionPath": "/_ts", "conflictResolutionProcedure": "" }, - "backupPolicy": { - "type": 1 - }, - "allowMaterializedViews": false, - "geospatialConfig": { - "type": "Geography" - }, - "typeSystemPolicy": { - "typeSystem": "CosmosCore" - }, - "uniqueIndexNameEncodingMode": 1, - "_idxpolicyver": 2, "_rid": "V18LoLrv-qA=", "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00004400-0000-0700-0000-5f85351f0000\"", - "_docs": "docs/", - "_sprocs": "sprocs/", - "_triggers": "triggers/", - "_udfs": "udfs/", - "_conflicts": "conflicts/" + "_etag": "\"00004400-0000-0700-0000-5f85351f0000\"" } } } From b2e1a82845345649f64c3bc63038be66a8abc6dd Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 28 Oct 2020 16:55:23 -0700 Subject: [PATCH 05/24] prettier --- .../preview/2020-06-01-preview/cosmos-db.json | 2 +- .../CosmosDBRestorableContainerGet.json | 64 ++++---- .../CosmosDBRestorableContainerList.json | 146 +++++++++--------- .../CosmosDBRestorableDatabaseList.json | 12 +- .../CosmosDBRestorableResourceList.json | 22 +-- 5 files changed, 123 insertions(+), 123 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index dc7f2c0cd365..ce6065a9f9ec 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -8444,7 +8444,7 @@ "type": "string", "x-ms-parameter-location": "method", "description": "The location where the resources are located." - }, + }, "restoreTimestampInUtcParameter": { "name": "restoreTimestampInUtc", "in": "query", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json index c6e659553dd1..13989c8f5324 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json @@ -14,38 +14,38 @@ "name": "79609a98-3394-41f8-911f-cfab0c075c86", "properties": { "resource": { - "_rid": "zAyAPQAAAA==", - "eventTimestamp": "2020-10-13T04:56:42Z", - "ownerId": "Container1", - "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Create", - "documentCollection": { - "id": "Container1", - "indexingPolicy": { - "indexingMode": "Consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*" - }, - { - "path": "/\"_ts\"/?" - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "conflictResolutionPolicy": { - "mode": "LastWriterWins", - "conflictResolutionPath": "/_ts", - "conflictResolutionProcedure": "" - }, - "_rid": "V18LoLrv-qA=", - "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" + "_rid": "zAyAPQAAAA==", + "eventTimestamp": "2020-10-13T04:56:42Z", + "ownerId": "Container1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Create", + "documentCollection": { + "id": "Container1", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*" + }, + { + "path": "/\"_ts\"/?" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "_rid": "V18LoLrv-qA=", + "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", + "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json index fb8992aa0d12..fcd634f50399 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json @@ -15,85 +15,85 @@ "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", "name": "79609a98-3394-41f8-911f-cfab0c075c86", "properties": { - "resource": { - "_rid": "zAyAPQAAAA==", - "eventTimestamp": "2020-10-13T04:56:42Z", - "ownerId": "Container1", - "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Create", - "documentCollection": { - "id": "Container1", - "indexingPolicy": { - "indexingMode": "Consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*" - }, - { - "path": "/\"_ts\"/?" - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "conflictResolutionPolicy": { - "mode": "LastWriterWins", - "conflictResolutionPath": "/_ts", - "conflictResolutionProcedure": "" - }, - "_rid": "V18LoLrv-qA=", - "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" - } + "resource": { + "_rid": "zAyAPQAAAA==", + "eventTimestamp": "2020-10-13T04:56:42Z", + "ownerId": "Container1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Create", + "documentCollection": { + "id": "Container1", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*" + }, + { + "path": "/\"_ts\"/?" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" + } + ] + }, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "_rid": "V18LoLrv-qA=", + "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", + "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" } + } } }, { - "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/e85298a1-c631-4726-825e-a7ca092e9098", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", - "name": "e85298a1-c631-4726-825e-a7ca092e9098", - "properties": { - "resource": { - "_rid": "PrArcgAAAA==", - "eventTimestamp": "2020-10-13T05:03:27Z", - "ownerId": "Container1", - "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Replace", - "documentCollection": { - "id": "Container1", - "indexingPolicy": { - "indexingMode": "Consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*" - }, - { - "path": "/\"_ts\"/?" - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "defaultTtl": 12345, - "conflictResolutionPolicy": { - "mode": "LastWriterWins", - "conflictResolutionPath": "/_ts", - "conflictResolutionProcedure": "" - }, - "_rid": "V18LoLrv-qA=", - "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00004400-0000-0700-0000-5f85351f0000\"" + "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/e85298a1-c631-4726-825e-a7ca092e9098", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", + "name": "e85298a1-c631-4726-825e-a7ca092e9098", + "properties": { + "resource": { + "_rid": "PrArcgAAAA==", + "eventTimestamp": "2020-10-13T05:03:27Z", + "ownerId": "Container1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Replace", + "documentCollection": { + "id": "Container1", + "indexingPolicy": { + "indexingMode": "Consistent", + "automatic": true, + "includedPaths": [ + { + "path": "/*" + }, + { + "path": "/\"_ts\"/?" + } + ], + "excludedPaths": [ + { + "path": "/\"_etag\"/?" } - } + ] + }, + "defaultTtl": 12345, + "conflictResolutionPolicy": { + "mode": "LastWriterWins", + "conflictResolutionPath": "/_ts", + "conflictResolutionProcedure": "" + }, + "_rid": "V18LoLrv-qA=", + "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", + "_etag": "\"00004400-0000-0700-0000-5f85351f0000\"" + } } + } } ] } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json index e4e3e1ba13f9..9c22669e1c8c 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json @@ -21,12 +21,12 @@ "ownerResourceId": "3fu-hg==", "operationType": "Create", "database": { - "id": "Database1", - "_rid": "3fu-hg==", - "_self": "dbs/3fu-hg==/", - "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", - "_colls": "colls/", - "_users": "users/" + "id": "Database1", + "_rid": "3fu-hg==", + "_self": "dbs/3fu-hg==/", + "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", + "_colls": "colls/", + "_users": "users/" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json index 9805487fed6a..48c753e9f968 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json @@ -12,21 +12,21 @@ "body": { "value": [ { - "databaseName": "Database1", - "collectionNames": [ - "Container1" - ] + "databaseName": "Database1", + "collectionNames": [ + "Container1" + ] }, { - "databaseName": "Database2", - "collectionNames": [ - "Container1", - "Container2" - ] + "databaseName": "Database2", + "collectionNames": [ + "Container1", + "Container2" + ] }, { - "databaseName": "Database3", - "collectionNames": [] + "databaseName": "Database3", + "collectionNames": [] } ] } From 9f32da4f53d6b9dc9d96192af37e30e108c736ab Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Thu, 29 Oct 2020 11:43:27 -0700 Subject: [PATCH 06/24] fix name and add apitype --- .../preview/2020-06-01-preview/cosmos-db.json | 28 +++++++++++++++++-- .../CosmosDBRestorableDatabaseAccountGet.json | 3 +- ...CosmosDBRestorableDatabaseAccountList.json | 6 ++-- ...storableDatabaseAccountNoLocationList.json | 6 ++-- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index ce6065a9f9ec..fc3411fa69a7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4343,7 +4343,7 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{databaseSnapshotId}": { "get": { - "operationId": "RestorableSqlDatabase_Get", + "operationId": "RestorableSqlDatabases_Get", "x-ms-examples": { "CosmosDBRestorableDatabaseGet": { "$ref": "./examples/CosmosDBRestorableDatabaseGet.json" @@ -4430,7 +4430,7 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{containerSnapshotId}": { "get": { - "operationId": "RestorableSqlContainer_Get", + "operationId": "RestorableSqlContainers_Get", "x-ms-examples": { "CosmosDBRestorableContainerGet": { "$ref": "./examples/CosmosDBRestorableContainerGet.json" @@ -8059,6 +8059,12 @@ "type": "string", "format": "date-time", "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." + }, + "apiType": { + "description": "Enum to indicate the API type of the restorable database account.", + "type": "string", + "default": "Default", + "$ref": "#/definitions/ApiType" } } }, @@ -8236,6 +8242,24 @@ } }, "description": "The List operation response, that contains the restorable SQL resources." + }, + "ApiType": { + "description": "Enum to indicate the API type of the restorable database account.", + "type": "string", + "enum": [ + "None", + "MongoDB", + "Gremlin", + "Cassandra", + "Table", + "Sql", + "Etcd", + "GremlinV2" + ], + "x-ms-enum": { + "name": "ApiType", + "modelAsString": true + } } }, "parameters": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json index d5edee780392..2ffcf2b00ee7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json @@ -15,7 +15,8 @@ "properties": { "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", - "deletionTime": "2020-06-12T22:05:09Z" + "deletionTime": "2020-06-12T22:05:09Z", + "apiType": "sql" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json index aae7cbb69c37..e1b37335b3e7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json @@ -16,7 +16,8 @@ "properties": { "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", - "deletionTime": "2020-06-12T22:05:09Z" + "deletionTime": "2020-06-12T22:05:09Z", + "apiType": "sql" } }, { @@ -26,7 +27,8 @@ "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts", "properties": { "accountName": "ddb2", - "creationTime": "2020-05-01T08:05:18Z" + "creationTime": "2020-05-01T08:05:18Z", + "apiType": "sql" } } ] diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json index 5b983987c671..a60f595cdf42 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json @@ -15,7 +15,8 @@ "properties": { "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", - "deletionTime": "2020-06-12T22:05:09Z" + "deletionTime": "2020-06-12T22:05:09Z", + "apiType": "sql" } }, { @@ -25,7 +26,8 @@ "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts", "properties": { "accountName": "ddb2", - "creationTime": "2020-05-01T08:05:18Z" + "creationTime": "2020-05-01T08:05:18Z", + "apiType": "sql" } } ] From 9ad2675c2f0d6a0efa7e84e92b4482942417b30d Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Thu, 29 Oct 2020 11:47:08 -0700 Subject: [PATCH 07/24] fix casing --- .../examples/CosmosDBRestorableDatabaseAccountGet.json | 2 +- .../examples/CosmosDBRestorableDatabaseAccountList.json | 4 ++-- .../CosmosDBRestorableDatabaseAccountNoLocationList.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json index 2ffcf2b00ee7..885f95c4e361 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json @@ -16,7 +16,7 @@ "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", "deletionTime": "2020-06-12T22:05:09Z", - "apiType": "sql" + "apiType": "Sql" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json index e1b37335b3e7..a091d3130d8d 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json @@ -17,7 +17,7 @@ "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", "deletionTime": "2020-06-12T22:05:09Z", - "apiType": "sql" + "apiType": "Sql" } }, { @@ -28,7 +28,7 @@ "properties": { "accountName": "ddb2", "creationTime": "2020-05-01T08:05:18Z", - "apiType": "sql" + "apiType": "Sql" } } ] diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json index a60f595cdf42..90e2e187edbf 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json @@ -16,7 +16,7 @@ "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", "deletionTime": "2020-06-12T22:05:09Z", - "apiType": "sql" + "apiType": "Sql" } }, { @@ -27,7 +27,7 @@ "properties": { "accountName": "ddb2", "creationTime": "2020-05-01T08:05:18Z", - "apiType": "sql" + "apiType": "Sql" } } ] From 1d9738e835556e8b9e804af206a5ee039d078458 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Thu, 29 Oct 2020 11:51:23 -0700 Subject: [PATCH 08/24] add custom word etcd --- custom-words.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-words.txt b/custom-words.txt index ae42b648994a..792fc8915f92 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -554,6 +554,7 @@ Español estaba Etag etags +Etcd Ethereum evalue evaluateautoscale From 32a825afa7569559217bd026b9dac09b56dddef2 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Mon, 2 Nov 2020 11:21:04 -0800 Subject: [PATCH 09/24] add mongodb --- .../preview/2020-06-01-preview/cosmos-db.json | 514 ++++++++++++++++-- .../CosmosDBRestorableDatabaseAccountGet.json | 15 +- ...CosmosDBRestorableDatabaseAccountList.json | 30 +- ...storableDatabaseAccountNoLocationList.json | 30 +- ...osmosDBRestorableMongodbCollectionGet.json | 50 ++ ...smosDBRestorableMongodbCollectionList.json | 54 ++ .../CosmosDBRestorableMongodbDatabaseGet.json | 31 ++ ...CosmosDBRestorableMongodbDatabaseList.json | 77 +++ ...osmosDBRestorableMongodbResourceList.json} | 0 ...=> CosmosDBRestorableSqlContainerGet.json} | 2 +- ...> CosmosDBRestorableSqlContainerList.json} | 0 ... => CosmosDBRestorableSqlDatabaseGet.json} | 0 ...=> CosmosDBRestorableSqlDatabaseList.json} | 0 .../CosmosDBRestorableSqlResourceList.json | 35 ++ 14 files changed, 796 insertions(+), 42 deletions(-) create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json rename specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/{CosmosDBRestorableResourceList.json => CosmosDBRestorableMongodbResourceList.json} (100%) rename specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/{CosmosDBRestorableContainerGet.json => CosmosDBRestorableSqlContainerGet.json} (96%) rename specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/{CosmosDBRestorableContainerList.json => CosmosDBRestorableSqlContainerList.json} (100%) rename specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/{CosmosDBRestorableDatabaseGet.json => CosmosDBRestorableSqlDatabaseGet.json} (100%) rename specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/{CosmosDBRestorableDatabaseList.json => CosmosDBRestorableSqlDatabaseList.json} (100%) create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlResourceList.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index fc3411fa69a7..ac725574422d 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4303,8 +4303,8 @@ "get": { "operationId": "RestorableSqlDatabases_List", "x-ms-examples": { - "CosmosDBRestorableDatabaseList": { - "$ref": "./examples/CosmosDBRestorableDatabaseList.json" + "CosmosDBRestorableSqlDatabaseList": { + "$ref": "./examples/CosmosDBRestorableSqlDatabaseList.json" } }, "description": "Lists all the restorable Azure Cosmos DB SQL databases available under the restorable account.", @@ -4341,12 +4341,12 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{databaseSnapshotId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{sqlDatabaseSnapshotId}": { "get": { "operationId": "RestorableSqlDatabases_Get", "x-ms-examples": { - "CosmosDBRestorableDatabaseGet": { - "$ref": "./examples/CosmosDBRestorableDatabaseGet.json" + "CosmosDBRestorableSqlDatabaseGet": { + "$ref": "./examples/CosmosDBRestorableSqlDatabaseGet.json" } }, "description": "Get the properties of a restorable SQL database.", @@ -4364,7 +4364,7 @@ "$ref": "#/parameters/instanceIdParameter" }, { - "$ref": "#/parameters/databaseSnapshotIdParameter" + "$ref": "#/parameters/sqlDatabaseSnapshotIdParameter" } ], "responses": { @@ -4387,8 +4387,8 @@ "get": { "operationId": "RestorableSqlContainers_List", "x-ms-examples": { - "CosmosDBRestorableContainerList": { - "$ref": "./examples/CosmosDBRestorableContainerList.json" + "CosmosDBRestorableSqlContainerList": { + "$ref": "./examples/CosmosDBRestorableSqlContainerList.json" } }, "description": "Lists all the restorable Azure Cosmos DB SQL containers available for a specific database.", @@ -4428,12 +4428,12 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{containerSnapshotId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{sqlContainerSnapshotId}": { "get": { "operationId": "RestorableSqlContainers_Get", "x-ms-examples": { - "CosmosDBRestorableContainerGet": { - "$ref": "./examples/CosmosDBRestorableContainerGet.json" + "CosmosDBRestorableSqlContainerGet": { + "$ref": "./examples/CosmosDBRestorableSqlContainerGet.json" } }, "description": "Get the properties of a restorable SQL container.", @@ -4451,7 +4451,7 @@ "$ref": "#/parameters/instanceIdParameter" }, { - "$ref": "#/parameters/containerSnapshotIdParameter" + "$ref": "#/parameters/sqlContainerSnapshotIdParameter" } ], "responses": { @@ -4477,8 +4477,8 @@ "get": { "operationId": "RestorableSqlResources_List", "x-ms-examples": { - "CosmosDBRestorableResourceList": { - "$ref": "./examples/CosmosDBRestorableResourceList.json" + "CosmosDBRestorableSqlResourceList": { + "$ref": "./examples/CosmosDBRestorableSqlResourceList.json" } }, "description": "Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time.", @@ -4520,6 +4520,228 @@ "nextLinkName": null } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases": { + "get": { + "operationId": "RestorableMongodbDatabases_List", + "x-ms-examples": { + "CosmosDBRestorableMongodbDatabaseList": { + "$ref": "./examples/CosmosDBRestorableMongodbDatabaseList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB MongoDB databases available under the restorable account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbDatabasesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases/{mongodbDatabaseSnapshotId}": { + "get": { + "operationId": "RestorableMongodbDatabases_Get", + "x-ms-examples": { + "CosmosDBRestorableMongodbDatabaseGet": { + "$ref": "./examples/CosmosDBRestorableMongodbDatabaseGet.json" + } + }, + "description": "Get the properties of a restorable MongoDB database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/mongodbDatabaseSnapshotIdParameter" + } + ], + "responses": { + "200": { + "description": "The restorable MongoDB databases properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections": { + "get": { + "operationId": "RestorableMongodbCollections_List", + "x-ms-examples": { + "CosmosDBRestorableMongodbCollectionList": { + "$ref": "./examples/CosmosDBRestorableMongodbCollectionList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB MongoDB collection available for a specific database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableMongodbDatabaseRidParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbCollectionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{mongodbCollectionSnapshotIdParameter}": { + "get": { + "operationId": "RestorableMongodbCollection_Get", + "x-ms-examples": { + "CosmosDBRestorableMongodbCollectionGet": { + "$ref": "./examples/CosmosDBRestorableMongodbCollectionGet.json" + } + }, + "description": "Get the properties of a restorable MongoDB Collection.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/mongodbCollectionSnapshotIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbCollectionGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources": { + "get": { + "operationId": "RestorableMongodbResources_List", + "x-ms-examples": { + "CosmosDBRestorableMongodbResourceList": { + "$ref": "./examples/CosmosDBRestorableMongodbResourceList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB MongoDB resources available for a specific database account at a given time.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restoreLocationParameter" + }, + { + "$ref": "#/parameters/restoreTimestampInUtcParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbResourcesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } } }, "definitions": { @@ -8063,8 +8285,55 @@ "apiType": { "description": "Enum to indicate the API type of the restorable database account.", "type": "string", - "default": "Default", "$ref": "#/definitions/ApiType" + }, + "restorableLocations": { + "description": "List of regions where the of the database account can be restored from.", + "type": "array", + "default": "Default", + "$ref": "#/definitions/RestorableLocationResource" + } + } + }, + "ApiType": { + "description": "Enum to indicate the API type of the restorable database account.", + "type": "string", + "enum": [ + "None", + "MongoDB", + "Gremlin", + "Cassandra", + "Table", + "Sql", + "Etcd", + "GremlinV2" + ], + "x-ms-enum": { + "name": "ApiType", + "modelAsString": true + } + }, + "RestorableLocationResource": { + "type": "object", + "description": "Specific Databases to restore.", + "properties": { + "locationName": { + "type": "string", + "description": "The location of the regional restorable account." + }, + "regionalDatabaseAccountInstanceId": { + "type": "string", + "description": "The instance id of the regional restorable account." + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "The creation time of the regional restorable database account (ISO-8601 format)." + }, + "deletionTime": { + "type": "string", + "format": "date-time", + "description": "The time at which the regional restorable database account has been deleted (ISO-8601 format)." } } }, @@ -8243,24 +8512,173 @@ }, "description": "The List operation response, that contains the restorable SQL resources." }, - "ApiType": { - "description": "Enum to indicate the API type of the restorable database account.", - "type": "string", - "enum": [ - "None", - "MongoDB", - "Gremlin", - "Cassandra", - "Table", - "Sql", - "Etcd", - "GremlinV2" - ], - "x-ms-enum": { - "name": "ApiType", - "modelAsString": true + "RestorableMongodbDatabasesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" + }, + "description": "List of restorable MongoDB databases and their properties." + } + }, + "description": "The List operation response, that contains the restorable MongoDB databases and their properties." + }, + "RestorableMongodbDatabaseGetResult": { + "description": "An Azure Cosmos DB restorable MongoDB database", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable MongoDB database.", + "$ref": "#/definitions/RestorableMongodbDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableMongodbDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB restorable MongoDB database", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "description": "A system generated property. A unique identifier.", + "readOnly": true + }, + "operationType": { + "type": "string", + "description": "The operation type of this database event." + }, + "eventTimestamp": { + "type": "string", + "description": "The timestamp of this database event." + }, + "ownerId": { + "type": "string", + "description": "The name of type of this restorable MongoDB database." + }, + "ownerResourceId": { + "type": "string", + "description": "The resource Id of type of this restorable MongoDB database." + }, + "database": { + "properties": { + "_self": { + "type": "string", + "description": "A system generated property that specifies the addressable path of the database resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDBDatabaseResource" + }, + { + "$ref": "#/definitions/ExtendedResourceProperties" + } + ] + } + } + } } - } + }, + "RestorableMongodbCollectionsListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableMongodbCollectionGetResult" + }, + "description": "List of restorable MongoDB collections and their properties." + } + }, + "description": "The List operation response, that contains the restorable MongoDB collections and their properties." + }, + "RestorableMongodbCollectionGetResult": { + "description": "An Azure Cosmos DB restorable MongoDB collection", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable MongoDB collection.", + "$ref": "#/definitions/RestorableMongodbCollectionProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableMongodbCollectionProperties": { + "description": "The properties of an Azure Cosmos DB restorable MongoDB collection", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "description": "A system generated property. A unique identifier.", + "readOnly": true + }, + "operationType": { + "type": "string", + "description": "The operation type of this collection event." + }, + "eventTimestamp": { + "type": "string", + "description": "The timestamp of this collection event." + }, + "ownerId": { + "type": "string", + "description": "The name of type of this restorable MongoDB collection." + }, + "ownerResourceId": { + "type": "string", + "description": "The resource Id of type of this restorable MongoDB collection." + }, + "documentCollection": { + "properties": { + "_self": { + "type": "string", + "description": "A system generated property that specifies the addressable path of the collection resource." + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDBCollectionResource" + }, + { + "$ref": "#/definitions/ExtendedResourceProperties" + } + ] + } + } + } + } + }, + "RestorableMongodbResourcesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseRestoreResource" + }, + "description": "List of restorable MongoDB resources, including the database and collection names." + } + }, + "description": "The List operation response, that contains the restorable MongoDB resources." + } }, "parameters": { "resourceGroupNameParameter": { @@ -8437,22 +8855,38 @@ "x-ms-parameter-location": "method", "description": "The instanceId GUID of a restorable database account." }, - "databaseSnapshotIdParameter": { - "name": "databaseSnapshotId", + "sqlDatabaseSnapshotIdParameter": { + "name": "sqlDatabaseSnapshotId", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", "description": "The snapshot GUID of the restorable SQL database." }, - "containerSnapshotIdParameter": { - "name": "containerSnapshotId", + "mongodbDatabaseSnapshotIdParameter": { + "name": "mongodbDatabaseSnapshotId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The snapshot GUID of the restorable MongoDB database." + }, + "sqlContainerSnapshotIdParameter": { + "name": "sqlContainerSnapshotId", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", "description": "The snapshot GUID of the restorable SQL container." }, + "mongodbCollectionSnapshotIdParameter": { + "name": "mongodbCollectionSnapshotId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The snapshot GUID of the restorable MongoDB collection." + }, "restorableSqlDatabaseRidParameter": { "name": "restorableSqlDatabaseRid", "in": "query", @@ -8461,6 +8895,14 @@ "x-ms-parameter-location": "method", "description": "The resource id of the restorable SQL database." }, + "restorableMongodbDatabaseRidParameter": { + "name": "restorableMongoDatabaseRid", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The resource id of the restorable Mongo database." + }, "restoreLocationParameter": { "name": "restoreLocation", "in": "query", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json index 885f95c4e361..be54c7a508d7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountGet.json @@ -16,7 +16,20 @@ "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", "deletionTime": "2020-06-12T22:05:09Z", - "apiType": "Sql" + "apiType": "Sql", + "restorableLocations": [ + { + "locationName": "South Central US", + "regionalDatabaseAccountInstanceId": "d7a01f78-606f-45c6-9dac-0df32f433bb5", + "creationTime": "2020-10-30T21:13:10.7486417Z", + "deletionTime": "2020-10-30T21:13:35.4466333Z" + }, + { + "locationName": "West US", + "regionalDatabaseAccountInstanceId": "fdb43d84-1572-4697-b6e7-2bcda0c51b2c", + "creationTime": "2020-10-30T21:13:10.7486417Z" + } + ] } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json index a091d3130d8d..6c2184f2f63e 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountList.json @@ -17,7 +17,20 @@ "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", "deletionTime": "2020-06-12T22:05:09Z", - "apiType": "Sql" + "apiType": "Sql", + "restorableLocations": [ + { + "locationName": "South Central US", + "regionalDatabaseAccountInstanceId": "d7a01f78-606f-45c6-9dac-0df32f433bb5", + "creationTime": "2020-10-30T21:13:10.7486417Z", + "deletionTime": "2020-10-30T21:13:35.4466333Z" + }, + { + "locationName": "West US", + "regionalDatabaseAccountInstanceId": "fdb43d84-1572-4697-b6e7-2bcda0c51b2c", + "creationTime": "2020-10-30T21:13:10.7486417Z" + } + ] } }, { @@ -28,7 +41,20 @@ "properties": { "accountName": "ddb2", "creationTime": "2020-05-01T08:05:18Z", - "apiType": "Sql" + "apiType": "Sql", + "restorableLocations": [ + { + "locationName": "South Central US", + "regionalDatabaseAccountInstanceId": "d7a01f78-606f-45c6-9dac-0df32f433bb5", + "creationTime": "2020-10-30T21:13:10.7486417Z", + "deletionTime": "2020-10-30T21:13:35.4466333Z" + }, + { + "locationName": "West US", + "regionalDatabaseAccountInstanceId": "fdb43d84-1572-4697-b6e7-2bcda0c51b2c", + "creationTime": "2020-10-30T21:13:10.7486417Z" + } + ] } } ] diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json index 90e2e187edbf..0c71af847561 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseAccountNoLocationList.json @@ -16,7 +16,20 @@ "accountName": "ddb1", "creationTime": "2020-04-11T21:56:15Z", "deletionTime": "2020-06-12T22:05:09Z", - "apiType": "Sql" + "apiType": "Sql", + "restorableLocations": [ + { + "locationName": "South Central US", + "regionalDatabaseAccountInstanceId": "d7a01f78-606f-45c6-9dac-0df32f433bb5", + "creationTime": "2020-10-30T21:13:10.7486417Z", + "deletionTime": "2020-10-30T21:13:35.4466333Z" + }, + { + "locationName": "West US", + "regionalDatabaseAccountInstanceId": "fdb43d84-1572-4697-b6e7-2bcda0c51b2c", + "creationTime": "2020-10-30T21:13:10.7486417Z" + } + ] } }, { @@ -27,7 +40,20 @@ "properties": { "accountName": "ddb2", "creationTime": "2020-05-01T08:05:18Z", - "apiType": "Sql" + "apiType": "Sql", + "restorableLocations": [ + { + "locationName": "South Central US", + "regionalDatabaseAccountInstanceId": "d7a01f78-606f-45c6-9dac-0df32f433bb5", + "creationTime": "2020-10-30T21:13:10.7486417Z", + "deletionTime": "2020-10-30T21:13:35.4466333Z" + }, + { + "locationName": "West US", + "regionalDatabaseAccountInstanceId": "fdb43d84-1572-4697-b6e7-2bcda0c51b2c", + "creationTime": "2020-10-30T21:13:10.7486417Z" + } + ] } } ] diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json new file mode 100644 index 000000000000..27bc1224acc1 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", + "mongodbCollectionSnapshotId": "79609a98-3394-41f8-911f-cfab0c075c86" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableMongodbCollections/79609a98-3394-41f8-911f-cfab0c075c86", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbCollections", + "name": "79609a98-3394-41f8-911f-cfab0c075c86", + "properties": { + "resource": { + "_rid": "zAyAPQAAAA==", + "eventTimestamp": "2020-10-13T04:56:42Z", + "ownerId": "Collection1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Create", + "documentCollection": { + "id": "Collection1", + "indexes": [ + { + "key": { + "keys": [ + "testKey" + ] + }, + "options": { + "expireAfterSeconds": 100, + "unique": true + } + } + ], + "shardKey": { + "testKey": "Hash" + }, + "analyticalStorageTtl": 500, + "_rid": "PD5DALigDgw=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + } + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json new file mode 100644 index 000000000000..e84adb5094fa --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "location": "WestUS", + "instanceId": "98a570f2-63db-4117-91f0-366327b7b353", + "restorableMongodbDatabaseRid": "PD5DALigDgw=" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableMongodbCollections/79609a98-3394-41f8-911f-cfab0c075c86", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbCollections", + "name": "79609a98-3394-41f8-911f-cfab0c075c86", + "properties": { + "resource": { + "_rid": "zAyAPQAAAA==", + "eventTimestamp": "2020-10-13T04:56:42Z", + "ownerId": "Collection1", + "ownerResourceId": "V18LoLrv-qA=", + "operationType": "Create", + "documentCollection": { + "id": "Collection1", + "indexes": [ + { + "key": { + "keys": [ + "testKey" + ] + }, + "options": { + "expireAfterSeconds": 100, + "unique": true + } + } + ], + "shardKey": { + "testKey": "Hash" + }, + "analyticalStorageTtl": 500, + "_rid": "V18LoLrv-qA=", + "_ts": 1459200611, + "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" + } + } + } + } + ] + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json new file mode 100644 index 000000000000..f6f152dd9ef4 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", + "databaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableSqlDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", + "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", + "properties": { + "resource": { + "_rid": "DLB14gAAAA==", + "eventTimestamp": "2020-09-02T19:45:03Z", + "ownerId": "Database1", + "ownerResourceId": "PD5DALigDgw=", + "operationType": "Create", + "database": { + "id": "Database1", + "_rid": "PD5DALigDgw=" + } + } + } + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json new file mode 100644 index 000000000000..8190d79f964d --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", + "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", + "properties": { + "resource": { + "_rid": "DLB14gAAAA==", + "eventTimestamp": "2020-09-02T19:45:03Z", + "ownerId": "Database1", + "ownerResourceId": "3fu-hg==", + "operationType": "Create", + "database": { + "id": "Database1", + "_rid": "3fu-hg==", + "_self": "dbs/3fu-hg==/", + "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"" + } + } + } + }, + { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/8456cb17-cdb0-4c6a-8db8-d0ff3f886257", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", + "name": "8456cb17-cdb0-4c6a-8db8-d0ff3f886257", + "properties": { + "resource": { + "_rid": "ESXNLAAAAA==", + "eventTimestamp": "2020-09-02T19:53:42Z", + "ownerId": "Database1", + "ownerResourceId": "3fu-hg==", + "operationType": "Delete", + "database": { + "id": "Database1", + "_rid": "3fu-hg==", + "_self": "dbs/3fu-hg==/", + "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", + "_ts": 1599075903 + } + } + } + }, + { + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/2c07991b-9c7c-4e85-be68-b18c1f2ff326", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", + "name": "2c07991b-9c7c-4e85-be68-b18c1f2ff326", + "properties": { + "resource": { + "_rid": "aXFqUQAAAA==", + "eventTimestamp": "2020-09-02T19:53:15Z", + "ownerId": "Database2", + "ownerResourceId": "0SziSg==", + "operationType": "Create", + "database": { + "id": "Database2", + "_rid": "0SziSg==", + "_self": "dbs/0SziSg==/", + "_etag": "\"0000ca0a-0000-0700-0000-5f4ff82b0000\"" + } + } + } + } + ] + } + } + } +} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbResourceList.json similarity index 100% rename from specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableResourceList.json rename to specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbResourceList.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json similarity index 96% rename from specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json rename to specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json index 13989c8f5324..6696b3e6fea5 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json @@ -4,7 +4,7 @@ "subscriptionId": "subid", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "containerSnapshotId": "79609a98-3394-41f8-911f-cfab0c075c86" + "sqlContainerSnapshotId": "79609a98-3394-41f8-911f-cfab0c075c86" }, "responses": { "200": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json similarity index 100% rename from specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableContainerList.json rename to specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json similarity index 100% rename from specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseGet.json rename to specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json similarity index 100% rename from specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableDatabaseList.json rename to specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseList.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlResourceList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlResourceList.json new file mode 100644 index 000000000000..48c753e9f968 --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlResourceList.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", + "location": "WestUS", + "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", + "restoreLocation": "WestUS", + "restoreTimestampInUtc": "10/13/2020 4:56" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "databaseName": "Database1", + "collectionNames": [ + "Container1" + ] + }, + { + "databaseName": "Database2", + "collectionNames": [ + "Container1", + "Container2" + ] + }, + { + "databaseName": "Database3", + "collectionNames": [] + } + ] + } + } + } +} From dd8ddcd329afb8815f23d8c9c11d34b590320bee Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Mon, 2 Nov 2020 12:11:56 -0800 Subject: [PATCH 10/24] fix prameter name --- .../preview/2020-06-01-preview/cosmos-db.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index ac725574422d..fac46053b0b9 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4650,7 +4650,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{mongodbCollectionSnapshotIdParameter}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{mongodbCollectionSnapshotId}": { "get": { "operationId": "RestorableMongodbCollection_Get", "x-ms-examples": { @@ -8315,7 +8315,7 @@ }, "RestorableLocationResource": { "type": "object", - "description": "Specific Databases to restore.", + "description": "Properties of the regional restorable account.", "properties": { "locationName": { "type": "string", From 85e3723a215188546ebf35a0f7c119762a2ce115 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Mon, 2 Nov 2020 14:05:10 -0800 Subject: [PATCH 11/24] fix validations --- .../preview/2020-06-01-preview/cosmos-db.json | 13 ++++---- .../CosmosDBRestorableMongodbDatabaseGet.json | 6 ++-- ...CosmosDBRestorableMongodbDatabaseList.json | 30 +++---------------- .../CosmosDBRestorableSqlDatabaseGet.json | 2 +- 4 files changed, 15 insertions(+), 36 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index fac46053b0b9..acc6ab9c5e5c 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4652,7 +4652,7 @@ }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{mongodbCollectionSnapshotId}": { "get": { - "operationId": "RestorableMongodbCollection_Get", + "operationId": "RestorableMongodbCollections_Get", "x-ms-examples": { "CosmosDBRestorableMongodbCollectionGet": { "$ref": "./examples/CosmosDBRestorableMongodbCollectionGet.json" @@ -8290,8 +8290,9 @@ "restorableLocations": { "description": "List of regions where the of the database account can be restored from.", "type": "array", - "default": "Default", - "$ref": "#/definitions/RestorableLocationResource" + "items": { + "$ref": "#/definitions/RestorableLocationResource" + } } } }, @@ -8316,7 +8317,7 @@ "RestorableLocationResource": { "type": "object", "description": "Properties of the regional restorable account.", - "properties": { + "properties": { "locationName": { "type": "string", "description": "The location of the regional restorable account." @@ -8678,7 +8679,7 @@ } }, "description": "The List operation response, that contains the restorable MongoDB resources." - } + } }, "parameters": { "resourceGroupNameParameter": { @@ -8896,7 +8897,7 @@ "description": "The resource id of the restorable SQL database." }, "restorableMongodbDatabaseRidParameter": { - "name": "restorableMongoDatabaseRid", + "name": "restorableMongodbDatabaseRid", "in": "query", "required": true, "type": "string", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json index f6f152dd9ef4..355a0266d3d4 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json @@ -4,13 +4,13 @@ "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "databaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" + "mongodbDatabaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" }, "responses": { "200": { "body": { - "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableSqlDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", + "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", "properties": { "resource": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json index 8190d79f964d..b8f1e83c5640 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json @@ -18,12 +18,11 @@ "_rid": "DLB14gAAAA==", "eventTimestamp": "2020-09-02T19:45:03Z", "ownerId": "Database1", - "ownerResourceId": "3fu-hg==", + "ownerResourceId": "PD5DALigDgw=", "operationType": "Create", "database": { "id": "Database1", - "_rid": "3fu-hg==", - "_self": "dbs/3fu-hg==/", + "_rid": "PD5DALigDgw=", "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"" } } @@ -38,37 +37,16 @@ "_rid": "ESXNLAAAAA==", "eventTimestamp": "2020-09-02T19:53:42Z", "ownerId": "Database1", - "ownerResourceId": "3fu-hg==", + "ownerResourceId": "PD5DALigDgw=", "operationType": "Delete", "database": { "id": "Database1", - "_rid": "3fu-hg==", - "_self": "dbs/3fu-hg==/", + "_rid": "PD5DALigDgw=", "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", "_ts": 1599075903 } } } - }, - { - "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/2c07991b-9c7c-4e85-be68-b18c1f2ff326", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", - "name": "2c07991b-9c7c-4e85-be68-b18c1f2ff326", - "properties": { - "resource": { - "_rid": "aXFqUQAAAA==", - "eventTimestamp": "2020-09-02T19:53:15Z", - "ownerId": "Database2", - "ownerResourceId": "0SziSg==", - "operationType": "Create", - "database": { - "id": "Database2", - "_rid": "0SziSg==", - "_self": "dbs/0SziSg==/", - "_etag": "\"0000ca0a-0000-0700-0000-5f4ff82b0000\"" - } - } - } } ] } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json index 4bba28fefc49..fde8a6448c0f 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json @@ -4,7 +4,7 @@ "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "databaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" + "sqlDatabaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" }, "responses": { "200": { From bea1863487dbb65c1fc0d98002832b229aa7bbb1 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 4 Nov 2020 00:34:27 -0800 Subject: [PATCH 12/24] make read only --- .../preview/2020-06-01-preview/cosmos-db.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index acc6ab9c5e5c..e3f7f471ef01 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -8270,26 +8270,31 @@ "properties": { "accountName": { "type": "string", + "readOnly": true, "description": "The name of the global database account" }, "creationTime": { "type": "string", + "readOnly": true, "format": "date-time", "description": "The creation time of the restorable database account (ISO-8601 format)." }, "deletionTime": { "type": "string", + "readOnly": true, "format": "date-time", "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." }, "apiType": { - "description": "Enum to indicate the API type of the restorable database account.", "type": "string", + "readOnly": true, + "description": "Enum to indicate the API type of the restorable database account.", "$ref": "#/definitions/ApiType" }, "restorableLocations": { - "description": "List of regions where the of the database account can be restored from.", "type": "array", + "readOnly": true, + "description": "List of regions where the of the database account can be restored from.", "items": { "$ref": "#/definitions/RestorableLocationResource" } @@ -8299,6 +8304,7 @@ "ApiType": { "description": "Enum to indicate the API type of the restorable database account.", "type": "string", + "readOnly": true, "enum": [ "None", "MongoDB", @@ -8320,19 +8326,23 @@ "properties": { "locationName": { "type": "string", + "readOnly": true, "description": "The location of the regional restorable account." }, "regionalDatabaseAccountInstanceId": { "type": "string", + "readOnly": true, "description": "The instance id of the regional restorable account." }, "creationTime": { "type": "string", + "readOnly": true, "format": "date-time", "description": "The creation time of the regional restorable database account (ISO-8601 format)." }, "deletionTime": { "type": "string", + "readOnly": true, "format": "date-time", "description": "The time at which the regional restorable database account has been deleted (ISO-8601 format)." } From 022fd14c9a6a4aaeb1fd6b10b9cbe8892c526669 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 4 Nov 2020 11:24:01 -0800 Subject: [PATCH 13/24] remove the word snapshot and make properties readonly --- .../preview/2020-06-01-preview/cosmos-db.json | 98 +++++++++++-------- ...osmosDBRestorableMongodbCollectionGet.json | 2 +- .../CosmosDBRestorableMongodbDatabaseGet.json | 2 +- .../CosmosDBRestorableSqlContainerGet.json | 2 +- .../CosmosDBRestorableSqlDatabaseGet.json | 2 +- 5 files changed, 62 insertions(+), 44 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index e3f7f471ef01..ab80dd49ee2f 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4341,7 +4341,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{sqlDatabaseSnapshotId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{restorableSqlDatabaseId}": { "get": { "operationId": "RestorableSqlDatabases_Get", "x-ms-examples": { @@ -4364,7 +4364,7 @@ "$ref": "#/parameters/instanceIdParameter" }, { - "$ref": "#/parameters/sqlDatabaseSnapshotIdParameter" + "$ref": "#/parameters/restorableSqlDatabaseIdParameter" } ], "responses": { @@ -4428,7 +4428,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{sqlContainerSnapshotId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{restorableSqlContainerId}": { "get": { "operationId": "RestorableSqlContainers_Get", "x-ms-examples": { @@ -4451,7 +4451,7 @@ "$ref": "#/parameters/instanceIdParameter" }, { - "$ref": "#/parameters/sqlContainerSnapshotIdParameter" + "$ref": "#/parameters/restorableSqlContainerIdParameter" } ], "responses": { @@ -4563,7 +4563,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases/{mongodbDatabaseSnapshotId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases/{restorableMongodbDatabaseId}": { "get": { "operationId": "RestorableMongodbDatabases_Get", "x-ms-examples": { @@ -4586,7 +4586,7 @@ "$ref": "#/parameters/instanceIdParameter" }, { - "$ref": "#/parameters/mongodbDatabaseSnapshotIdParameter" + "$ref": "#/parameters/restorableMongodbDatabaseIdParameter" } ], "responses": { @@ -4650,7 +4650,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{mongodbCollectionSnapshotId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{restorableMongodbCollectionId}": { "get": { "operationId": "RestorableMongodbCollections_Get", "x-ms-examples": { @@ -4673,7 +4673,7 @@ "$ref": "#/parameters/instanceIdParameter" }, { - "$ref": "#/parameters/mongodbCollectionSnapshotIdParameter" + "$ref": "#/parameters/restorableMongodbCollectionIdParameter" } ], "responses": { @@ -8270,18 +8270,15 @@ "properties": { "accountName": { "type": "string", - "readOnly": true, "description": "The name of the global database account" }, "creationTime": { "type": "string", - "readOnly": true, "format": "date-time", "description": "The creation time of the restorable database account (ISO-8601 format)." }, "deletionTime": { "type": "string", - "readOnly": true, "format": "date-time", "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." }, @@ -8386,37 +8383,44 @@ "properties": { "_rid": { "type": "string", - "description": "A system generated property. A unique identifier.", - "readOnly": true + "readOnly": true, + "description": "A system generated property. A unique identifier." }, "operationType": { "type": "string", + "readOnly": true, "description": "The operation type of this database event." }, "eventTimestamp": { "type": "string", + "readOnly": true, "description": "The timestamp of this database event." }, "ownerId": { "type": "string", - "description": "The name of type of this restorable SQL database." + "readOnly": true, + "description": "The name of this restorable SQL database." }, "ownerResourceId": { "type": "string", - "description": "The resource Id of type of this restorable SQL database." + "readOnly": true, + "description": "The resource Id of this restorable SQL database." }, "database": { "properties": { "_colls": { "type": "string", - "description": "A system generated property that specified the addressable path of the collections resource." + "readOnly": true, + "description": "A system generated property that specified the addressable path of the collections resource." }, "_users": { "type": "string", + "readOnly": true, "description": "A system generated property that specifies the addressable path of the users resource." }, "_self": { "type": "string", + "readOnly": true, "description": "A system generated property that specifies the addressable path of the database resource." } }, @@ -8471,29 +8475,34 @@ "properties": { "_rid": { "type": "string", - "description": "A system generated property. A unique identifier.", - "readOnly": true + "readOnly": true, + "description": "A system generated property. A unique identifier." }, "operationType": { "type": "string", + "readOnly": true, "description": "The operation type of this container event." }, "eventTimestamp": { "type": "string", + "readOnly": true, "description": "The timestamp of this container event." }, "ownerId": { "type": "string", - "description": "The name of type of this restorable SQL container." + "readOnly": true, + "description": "The name of this restorable SQL container." }, "ownerResourceId": { "type": "string", - "description": "The resource Id of type of this restorable SQL container." + "readOnly": true, + "description": "The resource Id of this restorable SQL container." }, "documentCollection": { "properties": { "_self": { "type": "string", + "readOnly": true, "description": "A system generated property that specifies the addressable path of the container resource." } }, @@ -8561,29 +8570,34 @@ "properties": { "_rid": { "type": "string", - "description": "A system generated property. A unique identifier.", - "readOnly": true + "readOnly": true, + "description": "A system generated property. A unique identifier." }, "operationType": { "type": "string", + "readOnly": true, "description": "The operation type of this database event." }, "eventTimestamp": { "type": "string", + "readOnly": true, "description": "The timestamp of this database event." }, "ownerId": { "type": "string", - "description": "The name of type of this restorable MongoDB database." + "readOnly": true, + "description": "The name of this restorable MongoDB database." }, "ownerResourceId": { "type": "string", - "description": "The resource Id of type of this restorable MongoDB database." + "readOnly": true, + "description": "The resource Id of this restorable MongoDB database." }, "database": { "properties": { "_self": { "type": "string", + "readOnly": true, "description": "A system generated property that specifies the addressable path of the database resource." } }, @@ -8638,24 +8652,28 @@ "properties": { "_rid": { "type": "string", - "description": "A system generated property. A unique identifier.", - "readOnly": true + "readOnly": true, + "description": "A system generated property. A unique identifier." }, "operationType": { "type": "string", + "readOnly": true, "description": "The operation type of this collection event." }, "eventTimestamp": { "type": "string", + "readOnly": true, "description": "The timestamp of this collection event." }, "ownerId": { "type": "string", - "description": "The name of type of this restorable MongoDB collection." + "readOnly": true, + "description": "The name of this restorable MongoDB collection." }, "ownerResourceId": { "type": "string", - "description": "The resource Id of type of this restorable MongoDB collection." + "readOnly": true, + "description": "The resource Id of this restorable MongoDB collection." }, "documentCollection": { "properties": { @@ -8866,37 +8884,37 @@ "x-ms-parameter-location": "method", "description": "The instanceId GUID of a restorable database account." }, - "sqlDatabaseSnapshotIdParameter": { - "name": "sqlDatabaseSnapshotId", + "restorableSqlDatabaseIdParameter": { + "name": "restorableSqlDatabaseId", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The snapshot GUID of the restorable SQL database." + "description": "The GUID of the restorable SQL database." }, - "mongodbDatabaseSnapshotIdParameter": { - "name": "mongodbDatabaseSnapshotId", + "restorableMongodbDatabaseIdParameter": { + "name": "restorableMongodbDatabaseId", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The snapshot GUID of the restorable MongoDB database." + "description": "The GUID of the restorable MongoDB database." }, - "sqlContainerSnapshotIdParameter": { - "name": "sqlContainerSnapshotId", + "restorableSqlContainerIdParameter": { + "name": "restorableSqlContainerId", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The snapshot GUID of the restorable SQL container." + "description": "The GUID of the restorable SQL container." }, - "mongodbCollectionSnapshotIdParameter": { - "name": "mongodbCollectionSnapshotId", + "restorableMongodbCollectionIdParameter": { + "name": "restorableMongodbCollectionId", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The snapshot GUID of the restorable MongoDB collection." + "description": "The GUID of the restorable MongoDB collection." }, "restorableSqlDatabaseRidParameter": { "name": "restorableSqlDatabaseRid", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json index 27bc1224acc1..5ee0688cf0f7 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json @@ -4,7 +4,7 @@ "subscriptionId": "subid", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "mongodbCollectionSnapshotId": "79609a98-3394-41f8-911f-cfab0c075c86" + "restorableMongodbCollectionId": "79609a98-3394-41f8-911f-cfab0c075c86" }, "responses": { "200": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json index 355a0266d3d4..102dffcdcc8b 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json @@ -4,7 +4,7 @@ "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "mongodbDatabaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" + "restorableMongodbDatabaseId": "59c21367-b98b-4a8e-abb7-b6f46600decc" }, "responses": { "200": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json index 6696b3e6fea5..d0819c628ad2 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json @@ -4,7 +4,7 @@ "subscriptionId": "subid", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "sqlContainerSnapshotId": "79609a98-3394-41f8-911f-cfab0c075c86" + "restorableSqlContainerId": "79609a98-3394-41f8-911f-cfab0c075c86" }, "responses": { "200": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json index fde8a6448c0f..ca2a5c4401ff 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json @@ -4,7 +4,7 @@ "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", "location": "WestUS", "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "sqlDatabaseSnapshotId": "59c21367-b98b-4a8e-abb7-b6f46600decc" + "restorableSqlDatabaseId": "59c21367-b98b-4a8e-abb7-b6f46600decc" }, "responses": { "200": { From 941fc50639b5a3b3aff68afbc0356030f03dd4fe Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Wed, 4 Nov 2020 11:33:11 -0800 Subject: [PATCH 14/24] pretty --- .../preview/2020-06-01-preview/cosmos-db.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index ab80dd49ee2f..1feba8f965f9 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -8411,7 +8411,7 @@ "_colls": { "type": "string", "readOnly": true, - "description": "A system generated property that specified the addressable path of the collections resource." + "description": "A system generated property that specified the addressable path of the collections resource." }, "_users": { "type": "string", From 755bc39b082c6cc3c283483d68bc23c34ab3023c Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Fri, 6 Nov 2020 10:42:19 -0800 Subject: [PATCH 15/24] improved some descriptions --- .../preview/2020-06-01-preview/cosmos-db.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index 1feba8f965f9..6bb4379a4888 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4481,7 +4481,7 @@ "$ref": "./examples/CosmosDBRestorableSqlResourceList.json" } }, - "description": "Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time.", + "description": "Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time and location.", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" @@ -4703,7 +4703,7 @@ "$ref": "./examples/CosmosDBRestorableMongodbResourceList.json" } }, - "description": "Lists all the restorable Azure Cosmos DB MongoDB resources available for a specific database account at a given time.", + "description": "Lists all the restorable Azure Cosmos DB MongoDB resources available for a specific database account at a given time and location.", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" @@ -8139,7 +8139,7 @@ }, "databasesToRestore": { "type": "array", - "description": "List of specific databases to restore.", + "description": "List of specific databases available for restore.", "items": { "$ref": "#/definitions/DatabaseRestoreResource" } @@ -8152,11 +8152,11 @@ "properties": { "databaseName": { "type": "string", - "description": "The name of the database to restore." + "description": "The name of the database available for restore." }, "collectionNames": { "type": "array", - "description": "The names of the collections to restore.", + "description": "The names of the collections available for restore.", "items": { "$ref": "#/definitions/CollectionName" } From 647ac36926312cc9153ec82288c17b4b8aa08e1a Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Mon, 16 Nov 2020 15:00:25 -0800 Subject: [PATCH 16/24] update description and removed mongodb content --- .../preview/2020-06-01-preview/cosmos-db.json | 40 ++----------------- ...osmosDBRestorableMongodbCollectionGet.json | 25 +----------- ...smosDBRestorableMongodbCollectionList.json | 25 +----------- .../CosmosDBRestorableMongodbDatabaseGet.json | 6 +-- ...CosmosDBRestorableMongodbDatabaseList.json | 15 +------ 5 files changed, 8 insertions(+), 103 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index 6bb4379a4888..1aa979cdb43e 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -8303,7 +8303,6 @@ "type": "string", "readOnly": true, "enum": [ - "None", "MongoDB", "Gremlin", "Cassandra", @@ -8498,7 +8497,7 @@ "readOnly": true, "description": "The resource Id of this restorable SQL container." }, - "documentCollection": { + "container": { "properties": { "_self": { "type": "string", @@ -8592,23 +8591,6 @@ "type": "string", "readOnly": true, "description": "The resource Id of this restorable MongoDB database." - }, - "database": { - "properties": { - "_self": { - "type": "string", - "readOnly": true, - "description": "A system generated property that specifies the addressable path of the database resource." - } - }, - "allOf": [ - { - "$ref": "#/definitions/MongoDBDatabaseResource" - }, - { - "$ref": "#/definitions/ExtendedResourceProperties" - } - ] } } } @@ -8674,22 +8656,6 @@ "type": "string", "readOnly": true, "description": "The resource Id of this restorable MongoDB collection." - }, - "documentCollection": { - "properties": { - "_self": { - "type": "string", - "description": "A system generated property that specifies the addressable path of the collection resource." - } - }, - "allOf": [ - { - "$ref": "#/definitions/MongoDBCollectionResource" - }, - { - "$ref": "#/definitions/ExtendedResourceProperties" - } - ] } } } @@ -8938,7 +8904,7 @@ "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The location where the resources are located." + "description": "The location where the restorable resources are located." }, "restoreTimestampInUtcParameter": { "name": "restoreTimestampInUtc", @@ -8946,7 +8912,7 @@ "required": true, "type": "string", "x-ms-parameter-location": "method", - "description": "The timestamp when the resources exist." + "description": "The timestamp when the restorable resources existed." } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json index 5ee0688cf0f7..ab3fbd0b60d6 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json @@ -18,30 +18,7 @@ "eventTimestamp": "2020-10-13T04:56:42Z", "ownerId": "Collection1", "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Create", - "documentCollection": { - "id": "Collection1", - "indexes": [ - { - "key": { - "keys": [ - "testKey" - ] - }, - "options": { - "expireAfterSeconds": 100, - "unique": true - } - } - ], - "shardKey": { - "testKey": "Hash" - }, - "analyticalStorageTtl": 500, - "_rid": "PD5DALigDgw=", - "_ts": 1459200611, - "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" - } + "operationType": "Create" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json index e84adb5094fa..7ccb03a9c397 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionList.json @@ -20,30 +20,7 @@ "eventTimestamp": "2020-10-13T04:56:42Z", "ownerId": "Collection1", "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Create", - "documentCollection": { - "id": "Collection1", - "indexes": [ - { - "key": { - "keys": [ - "testKey" - ] - }, - "options": { - "expireAfterSeconds": 100, - "unique": true - } - } - ], - "shardKey": { - "testKey": "Hash" - }, - "analyticalStorageTtl": 500, - "_rid": "V18LoLrv-qA=", - "_ts": 1459200611, - "_etag": "\"00005900-0000-0000-0000-56f9a2630000\"" - } + "operationType": "Create" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json index 102dffcdcc8b..5f9f7920ba8d 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json @@ -18,11 +18,7 @@ "eventTimestamp": "2020-09-02T19:45:03Z", "ownerId": "Database1", "ownerResourceId": "PD5DALigDgw=", - "operationType": "Create", - "database": { - "id": "Database1", - "_rid": "PD5DALigDgw=" - } + "operationType": "Create" } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json index b8f1e83c5640..5638d0cafb39 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseList.json @@ -19,12 +19,7 @@ "eventTimestamp": "2020-09-02T19:45:03Z", "ownerId": "Database1", "ownerResourceId": "PD5DALigDgw=", - "operationType": "Create", - "database": { - "id": "Database1", - "_rid": "PD5DALigDgw=", - "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"" - } + "operationType": "Create" } } }, @@ -38,13 +33,7 @@ "eventTimestamp": "2020-09-02T19:53:42Z", "ownerId": "Database1", "ownerResourceId": "PD5DALigDgw=", - "operationType": "Delete", - "database": { - "id": "Database1", - "_rid": "PD5DALigDgw=", - "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", - "_ts": 1599075903 - } + "operationType": "Delete" } } } From a4a6c5b50c008d68ee3f57c75b365f90ba1e4ed6 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Mon, 16 Nov 2020 15:10:19 -0800 Subject: [PATCH 17/24] fix container property name --- .../examples/CosmosDBRestorableSqlContainerGet.json | 2 +- .../examples/CosmosDBRestorableSqlContainerList.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json index d0819c628ad2..a8d9e20b9a28 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json @@ -19,7 +19,7 @@ "ownerId": "Container1", "ownerResourceId": "V18LoLrv-qA=", "operationType": "Create", - "documentCollection": { + "container": { "id": "Container1", "indexingPolicy": { "indexingMode": "Consistent", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json index fcd634f50399..348ee20a01ad 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json @@ -21,7 +21,7 @@ "ownerId": "Container1", "ownerResourceId": "V18LoLrv-qA=", "operationType": "Create", - "documentCollection": { + "container": { "id": "Container1", "indexingPolicy": { "indexingMode": "Consistent", From d05e1ab41e4c0ab497a7253960f792424e8d63eb Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Mon, 16 Nov 2020 15:22:41 -0800 Subject: [PATCH 18/24] fix documentcollection name --- .../examples/CosmosDBRestorableSqlContainerList.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json index 348ee20a01ad..1bfd3cede997 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerList.json @@ -63,7 +63,7 @@ "ownerId": "Container1", "ownerResourceId": "V18LoLrv-qA=", "operationType": "Replace", - "documentCollection": { + "container": { "id": "Container1", "indexingPolicy": { "indexingMode": "Consistent", From ad607dadc0f1f3743b86a696f44bd93093bd7114 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 17 Nov 2020 15:29:34 -0800 Subject: [PATCH 19/24] make query parameter optional --- .../preview/2020-06-01-preview/cosmos-db.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index 1aa979cdb43e..d0a14730049e 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -8885,7 +8885,7 @@ "restorableSqlDatabaseRidParameter": { "name": "restorableSqlDatabaseRid", "in": "query", - "required": true, + "required": false, "type": "string", "x-ms-parameter-location": "method", "description": "The resource id of the restorable SQL database." @@ -8893,7 +8893,7 @@ "restorableMongodbDatabaseRidParameter": { "name": "restorableMongodbDatabaseRid", "in": "query", - "required": true, + "required": false, "type": "string", "x-ms-parameter-location": "method", "description": "The resource id of the restorable Mongo database." @@ -8901,7 +8901,7 @@ "restoreLocationParameter": { "name": "restoreLocation", "in": "query", - "required": true, + "required": false, "type": "string", "x-ms-parameter-location": "method", "description": "The location where the restorable resources are located." @@ -8909,7 +8909,7 @@ "restoreTimestampInUtcParameter": { "name": "restoreTimestampInUtc", "in": "query", - "required": true, + "required": false, "type": "string", "x-ms-parameter-location": "method", "description": "The timestamp when the restorable resources existed." From 6b8e7b916af333f84aed48d306c71873f0fa59bf Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 1 Dec 2020 10:43:23 -0800 Subject: [PATCH 20/24] address Meha's comments --- custom-words.txt | 1 - .../preview/2020-06-01-preview/cosmos-db.json | 30 +++++++++++++++---- .../CosmosDBRestorableMongodbDatabaseGet.json | 2 +- ...CosmosDBRestorableMongodbResourceList.json | 6 ++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/custom-words.txt b/custom-words.txt index 792fc8915f92..ae42b648994a 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -554,7 +554,6 @@ Español estaba Etag etags -Etcd Ethereum evalue evaluateautoscale diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index d0a14730049e..c22f3583d961 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -8285,7 +8285,7 @@ "apiType": { "type": "string", "readOnly": true, - "description": "Enum to indicate the API type of the restorable database account.", + "description": "The API type of the restorable database account.", "$ref": "#/definitions/ApiType" }, "restorableLocations": { @@ -8308,7 +8308,6 @@ "Cassandra", "Table", "Sql", - "Etcd", "GremlinV2" ], "x-ms-enum": { @@ -8388,7 +8387,8 @@ "operationType": { "type": "string", "readOnly": true, - "description": "The operation type of this database event." + "description": "The operation type of this database event.", + "$ref": "#/definitions/OperationType" }, "eventTimestamp": { "type": "string", @@ -8480,7 +8480,8 @@ "operationType": { "type": "string", "readOnly": true, - "description": "The operation type of this container event." + "description": "The operation type of this container event.", + "$ref": "#/definitions/OperationType" }, "eventTimestamp": { "type": "string", @@ -8575,7 +8576,8 @@ "operationType": { "type": "string", "readOnly": true, - "description": "The operation type of this database event." + "description": "The operation type of this database event.", + "$ref": "#/definitions/OperationType" }, "eventTimestamp": { "type": "string", @@ -8640,7 +8642,8 @@ "operationType": { "type": "string", "readOnly": true, - "description": "The operation type of this collection event." + "description": "The operation type of this collection event.", + "$ref": "#/definitions/OperationType" }, "eventTimestamp": { "type": "string", @@ -8675,6 +8678,21 @@ "description": "The List operation response, that contains the restorable MongoDB resources." } }, + "OperationType": { + "description": "Enum to indicate the operation type of the event.", + "type": "string", + "readOnly": true, + "enum": [ + "Create", + "Replace", + "Delete", + "SystemOperation" + ], + "x-ms-enum": { + "name": "OperationType", + "modelAsString": true + } + }, "parameters": { "resourceGroupNameParameter": { "name": "resourceGroupName", diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json index 5f9f7920ba8d..8e12b8801d5f 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", + "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", "properties": { diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbResourceList.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbResourceList.json index 48c753e9f968..c1144838ccaf 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbResourceList.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbResourceList.json @@ -14,14 +14,14 @@ { "databaseName": "Database1", "collectionNames": [ - "Container1" + "Collection1" ] }, { "databaseName": "Database2", "collectionNames": [ - "Container1", - "Container2" + "Collection1", + "Collection2" ] }, { From 0b357ed6b1e77d535ac9b518b8e43be5a4de3a22 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 1 Dec 2020 11:48:37 -0800 Subject: [PATCH 21/24] move restorable apis to separate file --- .../preview/2020-06-01-preview/cosmos-db.json | 1774 ++++------------- .../2020-06-01-preview/restorable.json | 1138 +++++++++++ 2 files changed, 1477 insertions(+), 1435 deletions(-) create mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index c22f3583d961..8d32d8d3815d 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4184,564 +4184,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts": { - "get": { - "operationId": "RestorableDatabaseAccounts_ListByLocation", - "x-ms-examples": { - "CosmosDBDatabaseAccountList": { - "$ref": "./examples/CosmosDBRestorableDatabaseAccountList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableDatabaseAccountsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts": { - "get": { - "operationId": "RestorableDatabaseAccounts_List", - "x-ms-examples": { - "CosmosDBDatabaseAccountList": { - "$ref": "./examples/CosmosDBRestorableDatabaseAccountNoLocationList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableDatabaseAccountsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}": { - "get": { - "operationId": "RestorableDatabaseAccounts_GetByLocation", - "x-ms-examples": { - "CosmosDBDatabaseAccountGet": { - "$ref": "./examples/CosmosDBRestorableDatabaseAccountGet.json" - } - }, - "description": "Retrieves the properties of an existing Azure Cosmos DB restorable database account.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - } - ], - "responses": { - "200": { - "description": "The restorable database account properties were retrieved successfully.", - "schema": { - "$ref": "#/definitions/RestorableDatabaseAccountGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases": { - "get": { - "operationId": "RestorableSqlDatabases_List", - "x-ms-examples": { - "CosmosDBRestorableSqlDatabaseList": { - "$ref": "./examples/CosmosDBRestorableSqlDatabaseList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB SQL databases available under the restorable account.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlDatabasesListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{restorableSqlDatabaseId}": { - "get": { - "operationId": "RestorableSqlDatabases_Get", - "x-ms-examples": { - "CosmosDBRestorableSqlDatabaseGet": { - "$ref": "./examples/CosmosDBRestorableSqlDatabaseGet.json" - } - }, - "description": "Get the properties of a restorable SQL database.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableSqlDatabaseIdParameter" - } - ], - "responses": { - "200": { - "description": "The restorable SQL databases properties were retrieved successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlDatabaseGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers": { - "get": { - "operationId": "RestorableSqlContainers_List", - "x-ms-examples": { - "CosmosDBRestorableSqlContainerList": { - "$ref": "./examples/CosmosDBRestorableSqlContainerList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB SQL containers available for a specific database.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableSqlDatabaseRidParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlContainersListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{restorableSqlContainerId}": { - "get": { - "operationId": "RestorableSqlContainers_Get", - "x-ms-examples": { - "CosmosDBRestorableSqlContainerGet": { - "$ref": "./examples/CosmosDBRestorableSqlContainerGet.json" - } - }, - "description": "Get the properties of a restorable SQL container.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableSqlContainerIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlContainerGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources": { - "get": { - "operationId": "RestorableSqlResources_List", - "x-ms-examples": { - "CosmosDBRestorableSqlResourceList": { - "$ref": "./examples/CosmosDBRestorableSqlResourceList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time and location.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restoreLocationParameter" - }, - { - "$ref": "#/parameters/restoreTimestampInUtcParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlResourcesListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases": { - "get": { - "operationId": "RestorableMongodbDatabases_List", - "x-ms-examples": { - "CosmosDBRestorableMongodbDatabaseList": { - "$ref": "./examples/CosmosDBRestorableMongodbDatabaseList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB MongoDB databases available under the restorable account.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbDatabasesListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases/{restorableMongodbDatabaseId}": { - "get": { - "operationId": "RestorableMongodbDatabases_Get", - "x-ms-examples": { - "CosmosDBRestorableMongodbDatabaseGet": { - "$ref": "./examples/CosmosDBRestorableMongodbDatabaseGet.json" - } - }, - "description": "Get the properties of a restorable MongoDB database.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableMongodbDatabaseIdParameter" - } - ], - "responses": { - "200": { - "description": "The restorable MongoDB databases properties were retrieved successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections": { - "get": { - "operationId": "RestorableMongodbCollections_List", - "x-ms-examples": { - "CosmosDBRestorableMongodbCollectionList": { - "$ref": "./examples/CosmosDBRestorableMongodbCollectionList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB MongoDB collection available for a specific database.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableMongodbDatabaseRidParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbCollectionsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{restorableMongodbCollectionId}": { - "get": { - "operationId": "RestorableMongodbCollections_Get", - "x-ms-examples": { - "CosmosDBRestorableMongodbCollectionGet": { - "$ref": "./examples/CosmosDBRestorableMongodbCollectionGet.json" - } - }, - "description": "Get the properties of a restorable MongoDB Collection.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableMongodbCollectionIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbCollectionGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources": { - "get": { - "operationId": "RestorableMongodbResources_List", - "x-ms-examples": { - "CosmosDBRestorableMongodbResourceList": { - "$ref": "./examples/CosmosDBRestorableMongodbResourceList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB MongoDB resources available for a specific database account at a given time and location.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restoreLocationParameter" - }, - { - "$ref": "#/parameters/restoreTimestampInUtcParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbResourcesListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } } }, "definitions": { @@ -7760,937 +7202,479 @@ "name": "PrimaryAggregationType" } }, - "unit": { - "description": "The unit of the metric.", - "$ref": "#/definitions/UnitType" - }, - "resourceUri": { - "readOnly": true, - "type": "string", - "description": "The resource uri of the database." - }, - "name": { - "readOnly": true, - "$ref": "#/definitions/MetricName", - "description": "The name information for the metric." - } - }, - "description": "The definition of a metric." - }, - "MetricAvailability": { - "properties": { - "timeGrain": { - "readOnly": true, - "type": "string", - "description": "The time grain to be used to summarize the metric values." - }, - "retention": { - "readOnly": true, - "type": "string", - "description": "The retention for the metric values." - } - }, - "description": "The availability of the metric." - }, - "MetricListResult": { - "properties": { - "value": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - }, - "description": "The list of metrics for the account." - } - }, - "description": "The response to a list metrics request." - }, - "Metric": { - "properties": { - "startTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The start time for the metric (ISO-8601 format)." - }, - "endTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The end time for the metric (ISO-8601 format)." - }, - "timeGrain": { - "readOnly": true, - "type": "string", - "description": "The time grain to be used to summarize the metric values." - }, - "unit": { - "$ref": "#/definitions/UnitType", - "description": "The unit of the metric." - }, - "name": { - "readOnly": true, - "$ref": "#/definitions/MetricName", - "description": "The name information for the metric." - }, - "metricValues": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/MetricValue" - }, - "description": "The metric values for the specified time window and timestep." - } - }, - "description": "Metric data" - }, - "MetricName": { - "properties": { - "value": { - "readOnly": true, - "type": "string", - "description": "The name of the metric." - }, - "localizedValue": { - "readOnly": true, - "type": "string", - "description": "The friendly name of the metric." - } - }, - "description": "A metric name." - }, - "MetricValue": { - "properties": { - "_count": { - "readOnly": true, - "type": "number", - "format": "int32", - "description": "The number of values for the metric." - }, - "average": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The average value of the metric." - }, - "maximum": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The max value of the metric." - }, - "minimum": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The min value of the metric." - }, - "timestamp": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The metric timestamp (ISO-8601 format)." - }, - "total": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The total value of the metric." - } - }, - "description": "Represents metrics values." - }, - "PercentileMetricListResult": { - "properties": { - "value": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/PercentileMetric" - }, - "description": "The list of percentile metrics for the account." - } - }, - "description": "The response to a list percentile metrics request." - }, - "PercentileMetric": { - "properties": { - "startTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The start time for the metric (ISO-8601 format)." - }, - "endTime": { - "readOnly": true, - "type": "string", - "format": "date-time", - "description": "The end time for the metric (ISO-8601 format)." - }, - "timeGrain": { - "readOnly": true, - "type": "string", - "description": "The time grain to be used to summarize the metric values." - }, - "unit": { - "$ref": "#/definitions/UnitType", - "description": "The unit of the metric." - }, - "name": { - "readOnly": true, - "$ref": "#/definitions/MetricName", - "description": "The name information for the metric." - }, - "metricValues": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/PercentileMetricValue" - }, - "description": "The percentile metric values for the specified time window and timestep." - } - }, - "description": "Percentile Metric data" - }, - "PercentileMetricValue": { - "allOf": [ - { - "$ref": "#/definitions/MetricValue" - } - ], - "properties": { - "P10": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The 10th percentile value for the metric." - }, - "P25": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The 25th percentile value for the metric." - }, - "P50": { - "readOnly": true, - "type": "number", - "format": "double", - "description": "The 50th percentile value for the metric." + "unit": { + "description": "The unit of the metric.", + "$ref": "#/definitions/UnitType" }, - "P75": { + "resourceUri": { "readOnly": true, - "type": "number", - "format": "double", - "description": "The 75th percentile value for the metric." + "type": "string", + "description": "The resource uri of the database." }, - "P90": { + "name": { "readOnly": true, - "type": "number", - "format": "double", - "description": "The 90th percentile value for the metric." - }, - "P95": { + "$ref": "#/definitions/MetricName", + "description": "The name information for the metric." + } + }, + "description": "The definition of a metric." + }, + "MetricAvailability": { + "properties": { + "timeGrain": { "readOnly": true, - "type": "number", - "format": "double", - "description": "The 95th percentile value for the metric." + "type": "string", + "description": "The time grain to be used to summarize the metric values." }, - "P99": { + "retention": { "readOnly": true, - "type": "number", - "format": "double", - "description": "The 99th percentile value for the metric." + "type": "string", + "description": "The retention for the metric values." } }, - "description": "Represents percentile metrics values." + "description": "The availability of the metric." }, - "PartitionMetricListResult": { + "MetricListResult": { "properties": { "value": { "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/PartitionMetric" + "$ref": "#/definitions/Metric" }, - "description": "The list of partition-level metrics for the account." + "description": "The list of metrics for the account." } }, - "description": "The response to a list partition metrics request." + "description": "The response to a list metrics request." }, - "PartitionMetric": { - "allOf": [ - { - "$ref": "#/definitions/Metric" - } - ], + "Metric": { "properties": { - "partitionId": { + "startTime": { "readOnly": true, "type": "string", - "description": "The partition id (GUID identifier) of the metric values." + "format": "date-time", + "description": "The start time for the metric (ISO-8601 format)." }, - "partitionKeyRangeId": { + "endTime": { "readOnly": true, "type": "string", - "description": "The partition key range id (integer identifier) of the metric values." - } - }, - "description": "The metric values for a single partition." - }, - "UnitType": { - "type": "string", - "readOnly": true, - "description": "The unit of the metric.", - "enum": [ - "Count", - "Bytes", - "Seconds", - "Percent", - "CountPerSecond", - "BytesPerSecond", - "Milliseconds" - ], - "x-ms-enum": { - "modelAsString": true, - "name": "UnitType" - } - }, - "ConnectorOffer": { - "description": "The cassandra connector offer type for the Cosmos DB C* database account.", - "type": "string", - "enum": [ - "Small" - ], - "x-ms-enum": { - "name": "ConnectorOffer", - "modelAsString": true - } - }, - "PublicNetworkAccess": { - "type": "string", - "readOnly": true, - "description": "Whether requests from Public Network are allowed", - "enum": [ - "Enabled", - "Disabled" - ], - "x-ms-enum": { - "modelAsString": true, - "name": "PublicNetworkAccess" - } - }, - "ApiProperties": { - "type": "object", - "properties": { - "serverVersion": { - "type": "string", - "enum": [ - "3.2", - "3.6" - ], - "description": "Describes the ServerVersion of an a MongoDB account.", - "x-ms-enum": { - "modelAsString": true, - "name": "ServerVersion" - } - } - } - }, - "CreateMode": { - "description": "Enum to indicate the mode of account creation.", - "type": "string", - "default": "Default", - "enum": [ - "Default", - "Restore" - ], - "x-ms-enum": { - "name": "CreateMode", - "modelAsString": true - } - }, - "RestoreParameters": { - "type": "object", - "description": "Parameters to indicate the information about the restore.", - "x-ms-mutability": [ - "read", - "create" - ], - "properties": { - "restoreMode": { - "type": "string", - "enum": [ - "PointInTime" - ], - "description": "Describes the mode of the restore.", - "x-ms-enum": { - "modelAsString": true, - "name": "RestoreMode" - } + "format": "date-time", + "description": "The end time for the metric (ISO-8601 format)." }, - "restoreSource": { + "timeGrain": { + "readOnly": true, "type": "string", - "description": "The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}" + "description": "The time grain to be used to summarize the metric values." }, - "restoreTimestampInUtc": { - "type": "string", - "format": "date-time", - "description": "Time to which the account has to be restored (ISO-8601 format)." + "unit": { + "$ref": "#/definitions/UnitType", + "description": "The unit of the metric." }, - "databasesToRestore": { + "name": { + "readOnly": true, + "$ref": "#/definitions/MetricName", + "description": "The name information for the metric." + }, + "metricValues": { + "readOnly": true, "type": "array", - "description": "List of specific databases available for restore.", "items": { - "$ref": "#/definitions/DatabaseRestoreResource" - } + "$ref": "#/definitions/MetricValue" + }, + "description": "The metric values for the specified time window and timestep." } - } + }, + "description": "Metric data" }, - "DatabaseRestoreResource": { - "type": "object", - "description": "Specific Databases to restore.", + "MetricName": { "properties": { - "databaseName": { + "value": { + "readOnly": true, "type": "string", - "description": "The name of the database available for restore." + "description": "The name of the metric." }, - "collectionNames": { - "type": "array", - "description": "The names of the collections available for restore.", - "items": { - "$ref": "#/definitions/CollectionName" - } - } - } - }, - "CollectionName": { - "type": "string", - "description": "The name of the collection." - }, - "BackupPolicy": { - "type": "object", - "description": "The object representing the policy for taking backups on an account.", - "discriminator": "type", - "properties": { - "type": { + "localizedValue": { + "readOnly": true, "type": "string", - "enum": [ - "Periodic", - "Continuous" - ], - "description": "Describes the mode of backups.", - "x-ms-enum": { - "modelAsString": true, - "name": "BackupType" - } - } - }, - "required": [ - "type" - ] - }, - "PeriodicModeBackupPolicy": { - "description": "The object representing periodic mode backup policy.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/BackupPolicy" - } - ], - "properties": { - "periodicModeProperties": { - "type": "object", - "description": "Configuration values for periodic mode backup", - "$ref": "#/definitions/PeriodicModeProperties" - } - }, - "x-ms-discriminator-value": "Periodic" - }, - "ContinuousModeBackupPolicy": { - "description": "The object representing continuous mode backup policy.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/BackupPolicy" + "description": "The friendly name of the metric." } - ], - "x-ms-discriminator-value": "Continuous" + }, + "description": "A metric name." }, - "PeriodicModeProperties": { - "type": "object", - "description": "Configuration values for periodic mode backup", + "MetricValue": { "properties": { - "backupIntervalInMinutes": { - "type": "integer", + "_count": { + "readOnly": true, + "type": "number", "format": "int32", - "minimum": 0, - "description": "An integer representing the interval in minutes between two backups" + "description": "The number of values for the metric." }, - "backupRetentionIntervalInHours": { - "type": "integer", - "format": "int32", - "minimum": 0, - "description": "An integer representing the time (in hours) that each backup is retained" + "average": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The average value of the metric." + }, + "maximum": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The max value of the metric." + }, + "minimum": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The min value of the metric." + }, + "timestamp": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The metric timestamp (ISO-8601 format)." + }, + "total": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The total value of the metric." } - } + }, + "description": "Represents metrics values." }, - "RestorableDatabaseAccountsListResult": { + "PercentileMetricListResult": { "properties": { "value": { "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/RestorableDatabaseAccountGetResult" + "$ref": "#/definitions/PercentileMetric" }, - "description": "List of restorable database accounts and their properties." - } - }, - "description": "The List operation response, that contains the restorable database accounts and their properties." - }, - "RestorableDatabaseAccountGetResult": { - "description": "A Azure Cosmos DB restorable database account.", - "type": "object", - "properties": { - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The properties of a restorable database account.", - "$ref": "#/definitions/RestorableDatabaseAccountProperties" + "description": "The list of percentile metrics for the account." } }, - "allOf": [ - { - "$ref": "#/definitions/ARMResourceProperties" - } - ] + "description": "The response to a list percentile metrics request." }, - "RestorableDatabaseAccountProperties": { - "type": "object", - "description": "The properties of a restorable database account.", + "PercentileMetric": { "properties": { - "accountName": { - "type": "string", - "description": "The name of the global database account" - }, - "creationTime": { + "startTime": { + "readOnly": true, "type": "string", "format": "date-time", - "description": "The creation time of the restorable database account (ISO-8601 format)." + "description": "The start time for the metric (ISO-8601 format)." }, - "deletionTime": { + "endTime": { + "readOnly": true, "type": "string", "format": "date-time", - "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." + "description": "The end time for the metric (ISO-8601 format)." }, - "apiType": { + "timeGrain": { + "readOnly": true, "type": "string", + "description": "The time grain to be used to summarize the metric values." + }, + "unit": { + "$ref": "#/definitions/UnitType", + "description": "The unit of the metric." + }, + "name": { "readOnly": true, - "description": "The API type of the restorable database account.", - "$ref": "#/definitions/ApiType" + "$ref": "#/definitions/MetricName", + "description": "The name information for the metric." }, - "restorableLocations": { - "type": "array", + "metricValues": { "readOnly": true, - "description": "List of regions where the of the database account can be restored from.", + "type": "array", "items": { - "$ref": "#/definitions/RestorableLocationResource" - } + "$ref": "#/definitions/PercentileMetricValue" + }, + "description": "The percentile metric values for the specified time window and timestep." } - } + }, + "description": "Percentile Metric data" }, - "ApiType": { - "description": "Enum to indicate the API type of the restorable database account.", - "type": "string", - "readOnly": true, - "enum": [ - "MongoDB", - "Gremlin", - "Cassandra", - "Table", - "Sql", - "GremlinV2" + "PercentileMetricValue": { + "allOf": [ + { + "$ref": "#/definitions/MetricValue" + } ], - "x-ms-enum": { - "name": "ApiType", - "modelAsString": true - } - }, - "RestorableLocationResource": { - "type": "object", - "description": "Properties of the regional restorable account.", "properties": { - "locationName": { - "type": "string", + "P10": { "readOnly": true, - "description": "The location of the regional restorable account." + "type": "number", + "format": "double", + "description": "The 10th percentile value for the metric." }, - "regionalDatabaseAccountInstanceId": { - "type": "string", + "P25": { "readOnly": true, - "description": "The instance id of the regional restorable account." + "type": "number", + "format": "double", + "description": "The 25th percentile value for the metric." }, - "creationTime": { - "type": "string", + "P50": { "readOnly": true, - "format": "date-time", - "description": "The creation time of the regional restorable database account (ISO-8601 format)." + "type": "number", + "format": "double", + "description": "The 50th percentile value for the metric." }, - "deletionTime": { - "type": "string", + "P75": { "readOnly": true, - "format": "date-time", - "description": "The time at which the regional restorable database account has been deleted (ISO-8601 format)." + "type": "number", + "format": "double", + "description": "The 75th percentile value for the metric." + }, + "P90": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The 90th percentile value for the metric." + }, + "P95": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The 95th percentile value for the metric." + }, + "P99": { + "readOnly": true, + "type": "number", + "format": "double", + "description": "The 99th percentile value for the metric." } - } + }, + "description": "Represents percentile metrics values." }, - "RestorableSqlDatabasesListResult": { + "PartitionMetricListResult": { "properties": { "value": { "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/RestorableSqlDatabaseGetResult" + "$ref": "#/definitions/PartitionMetric" }, - "description": "List of restorable SQL databases and their properties." + "description": "The list of partition-level metrics for the account." } }, - "description": "The List operation response, that contains the restorable SQL databases and their properties." + "description": "The response to a list partition metrics request." }, - "RestorableSqlDatabaseGetResult": { - "description": "An Azure Cosmos DB restorable SQL database", - "type": "object", - "properties": { - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The properties of a restorable SQL database.", - "$ref": "#/definitions/RestorableSqlDatabaseProperties" - } - }, + "PartitionMetric": { "allOf": [ { - "$ref": "#/definitions/ARMResourceProperties" - } - ] - }, - "RestorableSqlDatabaseProperties": { - "description": "The properties of an Azure Cosmos DB restorable SQL database", - "type": "object", - "properties": { - "resource": { - "properties": { - "_rid": { - "type": "string", - "readOnly": true, - "description": "A system generated property. A unique identifier." - }, - "operationType": { - "type": "string", - "readOnly": true, - "description": "The operation type of this database event.", - "$ref": "#/definitions/OperationType" - }, - "eventTimestamp": { - "type": "string", - "readOnly": true, - "description": "The timestamp of this database event." - }, - "ownerId": { - "type": "string", - "readOnly": true, - "description": "The name of this restorable SQL database." - }, - "ownerResourceId": { - "type": "string", - "readOnly": true, - "description": "The resource Id of this restorable SQL database." - }, - "database": { - "properties": { - "_colls": { - "type": "string", - "readOnly": true, - "description": "A system generated property that specified the addressable path of the collections resource." - }, - "_users": { - "type": "string", - "readOnly": true, - "description": "A system generated property that specifies the addressable path of the users resource." - }, - "_self": { - "type": "string", - "readOnly": true, - "description": "A system generated property that specifies the addressable path of the database resource." - } - }, - "allOf": [ - { - "$ref": "#/definitions/SqlDatabaseResource" - }, - { - "$ref": "#/definitions/ExtendedResourceProperties" - } - ] - } - } + "$ref": "#/definitions/Metric" } - } - }, - "RestorableSqlContainersListResult": { + ], "properties": { - "value": { + "partitionId": { "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/RestorableSqlContainerGetResult" - }, - "description": "List of restorable SQL containers and their properties." + "type": "string", + "description": "The partition id (GUID identifier) of the metric values." + }, + "partitionKeyRangeId": { + "readOnly": true, + "type": "string", + "description": "The partition key range id (integer identifier) of the metric values." } }, - "description": "The List operation response, that contains the restorable SQL containers and their properties." + "description": "The metric values for a single partition." }, - "RestorableSqlContainerGetResult": { - "description": "An Azure Cosmos DB restorable SQL container", - "type": "object", - "properties": { - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The properties of a restorable SQL container.", - "$ref": "#/definitions/RestorableSqlContainerProperties" - } - }, - "allOf": [ - { - "$ref": "#/definitions/ARMResourceProperties" - } - ] + "UnitType": { + "type": "string", + "readOnly": true, + "description": "The unit of the metric.", + "enum": [ + "Count", + "Bytes", + "Seconds", + "Percent", + "CountPerSecond", + "BytesPerSecond", + "Milliseconds" + ], + "x-ms-enum": { + "modelAsString": true, + "name": "UnitType" + } + }, + "ConnectorOffer": { + "description": "The cassandra connector offer type for the Cosmos DB C* database account.", + "type": "string", + "enum": [ + "Small" + ], + "x-ms-enum": { + "name": "ConnectorOffer", + "modelAsString": true + } + }, + "PublicNetworkAccess": { + "type": "string", + "readOnly": true, + "description": "Whether requests from Public Network are allowed", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "modelAsString": true, + "name": "PublicNetworkAccess" + } }, - "RestorableSqlContainerProperties": { - "description": "The properties of an Azure Cosmos DB restorable SQL container", + "ApiProperties": { "type": "object", "properties": { - "resource": { - "properties": { - "_rid": { - "type": "string", - "readOnly": true, - "description": "A system generated property. A unique identifier." - }, - "operationType": { - "type": "string", - "readOnly": true, - "description": "The operation type of this container event.", - "$ref": "#/definitions/OperationType" - }, - "eventTimestamp": { - "type": "string", - "readOnly": true, - "description": "The timestamp of this container event." - }, - "ownerId": { - "type": "string", - "readOnly": true, - "description": "The name of this restorable SQL container." - }, - "ownerResourceId": { - "type": "string", - "readOnly": true, - "description": "The resource Id of this restorable SQL container." - }, - "container": { - "properties": { - "_self": { - "type": "string", - "readOnly": true, - "description": "A system generated property that specifies the addressable path of the container resource." - } - }, - "allOf": [ - { - "$ref": "#/definitions/SqlContainerResource" - }, - { - "$ref": "#/definitions/ExtendedResourceProperties" - } - ] - } + "serverVersion": { + "type": "string", + "enum": [ + "3.2", + "3.6" + ], + "description": "Describes the ServerVersion of an a MongoDB account.", + "x-ms-enum": { + "modelAsString": true, + "name": "ServerVersion" } } } }, - "RestorableSqlResourcesListResult": { + "CreateMode": { + "description": "Enum to indicate the mode of account creation.", + "type": "string", + "default": "Default", + "enum": [ + "Default", + "Restore" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": true + } + }, + "RestoreParameters": { + "type": "object", + "description": "Parameters to indicate the information about the restore.", + "x-ms-mutability": [ + "read", + "create" + ], "properties": { - "value": { - "readOnly": true, + "restoreMode": { + "type": "string", + "enum": [ + "PointInTime" + ], + "description": "Describes the mode of the restore.", + "x-ms-enum": { + "modelAsString": true, + "name": "RestoreMode" + } + }, + "restoreSource": { + "type": "string", + "description": "The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}" + }, + "restoreTimestampInUtc": { + "type": "string", + "format": "date-time", + "description": "Time to which the account has to be restored (ISO-8601 format)." + }, + "databasesToRestore": { "type": "array", + "description": "List of specific databases available for restore.", "items": { "$ref": "#/definitions/DatabaseRestoreResource" - }, - "description": "List of restorable SQL resources, including the database and collection names." + } } - }, - "description": "The List operation response, that contains the restorable SQL resources." + } }, - "RestorableMongodbDatabasesListResult": { + "DatabaseRestoreResource": { + "type": "object", + "description": "Specific Databases to restore.", "properties": { - "value": { - "readOnly": true, + "databaseName": { + "type": "string", + "description": "The name of the database available for restore." + }, + "collectionNames": { "type": "array", + "description": "The names of the collections available for restore.", "items": { - "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" - }, - "description": "List of restorable MongoDB databases and their properties." + "$ref": "#/definitions/CollectionName" + } } - }, - "description": "The List operation response, that contains the restorable MongoDB databases and their properties." + } + }, + "CollectionName": { + "type": "string", + "description": "The name of the collection." }, - "RestorableMongodbDatabaseGetResult": { - "description": "An Azure Cosmos DB restorable MongoDB database", + "BackupPolicy": { "type": "object", + "description": "The object representing the policy for taking backups on an account.", + "discriminator": "type", "properties": { - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The properties of a restorable MongoDB database.", - "$ref": "#/definitions/RestorableMongodbDatabaseProperties" + "type": { + "type": "string", + "enum": [ + "Periodic", + "Continuous" + ], + "description": "Describes the mode of backups.", + "x-ms-enum": { + "modelAsString": true, + "name": "BackupType" + } } }, - "allOf": [ - { - "$ref": "#/definitions/ARMResourceProperties" - } + "required": [ + "type" ] }, - "RestorableMongodbDatabaseProperties": { - "description": "The properties of an Azure Cosmos DB restorable MongoDB database", + "PeriodicModeBackupPolicy": { + "description": "The object representing periodic mode backup policy.", "type": "object", - "properties": { - "resource": { - "properties": { - "_rid": { - "type": "string", - "readOnly": true, - "description": "A system generated property. A unique identifier." - }, - "operationType": { - "type": "string", - "readOnly": true, - "description": "The operation type of this database event.", - "$ref": "#/definitions/OperationType" - }, - "eventTimestamp": { - "type": "string", - "readOnly": true, - "description": "The timestamp of this database event." - }, - "ownerId": { - "type": "string", - "readOnly": true, - "description": "The name of this restorable MongoDB database." - }, - "ownerResourceId": { - "type": "string", - "readOnly": true, - "description": "The resource Id of this restorable MongoDB database." - } - } + "allOf": [ + { + "$ref": "#/definitions/BackupPolicy" } - } - }, - "RestorableMongodbCollectionsListResult": { + ], "properties": { - "value": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/RestorableMongodbCollectionGetResult" - }, - "description": "List of restorable MongoDB collections and their properties." + "periodicModeProperties": { + "type": "object", + "description": "Configuration values for periodic mode backup", + "$ref": "#/definitions/PeriodicModeProperties" } }, - "description": "The List operation response, that contains the restorable MongoDB collections and their properties." + "x-ms-discriminator-value": "Periodic" }, - "RestorableMongodbCollectionGetResult": { - "description": "An Azure Cosmos DB restorable MongoDB collection", + "ContinuousModeBackupPolicy": { + "description": "The object representing continuous mode backup policy.", "type": "object", - "properties": { - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The properties of a restorable MongoDB collection.", - "$ref": "#/definitions/RestorableMongodbCollectionProperties" - } - }, "allOf": [ { - "$ref": "#/definitions/ARMResourceProperties" + "$ref": "#/definitions/BackupPolicy" } - ] + ], + "x-ms-discriminator-value": "Continuous" }, - "RestorableMongodbCollectionProperties": { - "description": "The properties of an Azure Cosmos DB restorable MongoDB collection", + "PeriodicModeProperties": { "type": "object", + "description": "Configuration values for periodic mode backup", "properties": { - "resource": { - "properties": { - "_rid": { - "type": "string", - "readOnly": true, - "description": "A system generated property. A unique identifier." - }, - "operationType": { - "type": "string", - "readOnly": true, - "description": "The operation type of this collection event.", - "$ref": "#/definitions/OperationType" - }, - "eventTimestamp": { - "type": "string", - "readOnly": true, - "description": "The timestamp of this collection event." - }, - "ownerId": { - "type": "string", - "readOnly": true, - "description": "The name of this restorable MongoDB collection." - }, - "ownerResourceId": { - "type": "string", - "readOnly": true, - "description": "The resource Id of this restorable MongoDB collection." - } - } + "backupIntervalInMinutes": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "An integer representing the interval in minutes between two backups" + }, + "backupRetentionIntervalInHours": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "An integer representing the time (in hours) that each backup is retained" } } - }, - "RestorableMongodbResourcesListResult": { - "properties": { - "value": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseRestoreResource" - }, - "description": "List of restorable MongoDB resources, including the database and collection names." - } - }, - "description": "The List operation response, that contains the restorable MongoDB resources." - } - }, - "OperationType": { - "description": "Enum to indicate the operation type of the event.", - "type": "string", - "readOnly": true, - "enum": [ - "Create", - "Replace", - "Delete", - "SystemOperation" - ], - "x-ms-enum": { - "name": "OperationType", - "modelAsString": true } }, "parameters": { @@ -8851,86 +7835,6 @@ "type": "string", "x-ms-parameter-location": "method", "description": "Partition Key Range Id for which to get data." - }, - "locationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Cosmos DB region, with spaces between words and each word capitalized." - }, - "instanceIdParameter": { - "name": "instanceId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The instanceId GUID of a restorable database account." - }, - "restorableSqlDatabaseIdParameter": { - "name": "restorableSqlDatabaseId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable SQL database." - }, - "restorableMongodbDatabaseIdParameter": { - "name": "restorableMongodbDatabaseId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable MongoDB database." - }, - "restorableSqlContainerIdParameter": { - "name": "restorableSqlContainerId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable SQL container." - }, - "restorableMongodbCollectionIdParameter": { - "name": "restorableMongodbCollectionId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable MongoDB collection." - }, - "restorableSqlDatabaseRidParameter": { - "name": "restorableSqlDatabaseRid", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The resource id of the restorable SQL database." - }, - "restorableMongodbDatabaseRidParameter": { - "name": "restorableMongodbDatabaseRid", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The resource id of the restorable Mongo database." - }, - "restoreLocationParameter": { - "name": "restoreLocation", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The location where the restorable resources are located." - }, - "restoreTimestampInUtcParameter": { - "name": "restoreTimestampInUtc", - "in": "query", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The timestamp when the restorable resources existed." } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json new file mode 100644 index 000000000000..b013233126fd --- /dev/null +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json @@ -0,0 +1,1138 @@ +{ + "swagger": "2.0", + "info": { + "title": "Cosmos DB", + "description": "Azure Cosmos DB Database Service Resource Provider REST API", + "version": "2020-06-01-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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts": { + "get": { + "operationId": "RestorableDatabaseAccounts_ListByLocation", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableDatabaseAccountList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableDatabaseAccountsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts": { + "get": { + "operationId": "RestorableDatabaseAccounts_List", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableDatabaseAccountNoLocationList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableDatabaseAccountsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}": { + "get": { + "operationId": "RestorableDatabaseAccounts_GetByLocation", + "x-ms-examples": { + "CosmosDBDatabaseAccountGet": { + "$ref": "./examples/CosmosDBRestorableDatabaseAccountGet.json" + } + }, + "description": "Retrieves the properties of an existing Azure Cosmos DB restorable database account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The restorable database account properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/RestorableDatabaseAccountGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases": { + "get": { + "operationId": "RestorableSqlDatabases_List", + "x-ms-examples": { + "CosmosDBRestorableSqlDatabaseList": { + "$ref": "./examples/CosmosDBRestorableSqlDatabaseList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB SQL databases available under the restorable account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlDatabasesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{restorableSqlDatabaseId}": { + "get": { + "operationId": "RestorableSqlDatabases_Get", + "x-ms-examples": { + "CosmosDBRestorableSqlDatabaseGet": { + "$ref": "./examples/CosmosDBRestorableSqlDatabaseGet.json" + } + }, + "description": "Get the properties of a restorable SQL database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableSqlDatabaseIdParameter" + } + ], + "responses": { + "200": { + "description": "The restorable SQL databases properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlDatabaseGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers": { + "get": { + "operationId": "RestorableSqlContainers_List", + "x-ms-examples": { + "CosmosDBRestorableSqlContainerList": { + "$ref": "./examples/CosmosDBRestorableSqlContainerList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB SQL containers available for a specific database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableSqlDatabaseRidParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlContainersListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{restorableSqlContainerId}": { + "get": { + "operationId": "RestorableSqlContainers_Get", + "x-ms-examples": { + "CosmosDBRestorableSqlContainerGet": { + "$ref": "./examples/CosmosDBRestorableSqlContainerGet.json" + } + }, + "description": "Get the properties of a restorable SQL container.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableSqlContainerIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlContainerGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources": { + "get": { + "operationId": "RestorableSqlResources_List", + "x-ms-examples": { + "CosmosDBRestorableSqlResourceList": { + "$ref": "./examples/CosmosDBRestorableSqlResourceList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB SQL resources available for a specific database account at a given time and location.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restoreLocationParameter" + }, + { + "$ref": "#/parameters/restoreTimestampInUtcParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableSqlResourcesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases": { + "get": { + "operationId": "RestorableMongodbDatabases_List", + "x-ms-examples": { + "CosmosDBRestorableMongodbDatabaseList": { + "$ref": "./examples/CosmosDBRestorableMongodbDatabaseList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB MongoDB databases available under the restorable account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbDatabasesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases/{restorableMongodbDatabaseId}": { + "get": { + "operationId": "RestorableMongodbDatabases_Get", + "x-ms-examples": { + "CosmosDBRestorableMongodbDatabaseGet": { + "$ref": "./examples/CosmosDBRestorableMongodbDatabaseGet.json" + } + }, + "description": "Get the properties of a restorable MongoDB database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableMongodbDatabaseIdParameter" + } + ], + "responses": { + "200": { + "description": "The restorable MongoDB databases properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections": { + "get": { + "operationId": "RestorableMongodbCollections_List", + "x-ms-examples": { + "CosmosDBRestorableMongodbCollectionList": { + "$ref": "./examples/CosmosDBRestorableMongodbCollectionList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB MongoDB collection available for a specific database.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableMongodbDatabaseRidParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbCollectionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{restorableMongodbCollectionId}": { + "get": { + "operationId": "RestorableMongodbCollections_Get", + "x-ms-examples": { + "CosmosDBRestorableMongodbCollectionGet": { + "$ref": "./examples/CosmosDBRestorableMongodbCollectionGet.json" + } + }, + "description": "Get the properties of a restorable MongoDB Collection.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restorableMongodbCollectionIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbCollectionGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources": { + "get": { + "operationId": "RestorableMongodbResources_List", + "x-ms-examples": { + "CosmosDBRestorableMongodbResourceList": { + "$ref": "./examples/CosmosDBRestorableMongodbResourceList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB MongoDB resources available for a specific database account at a given time and location.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + }, + { + "$ref": "#/parameters/restoreLocationParameter" + }, + { + "$ref": "#/parameters/restoreTimestampInUtcParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableMongodbResourcesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "RestorableDatabaseAccountsListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableDatabaseAccountGetResult" + }, + "description": "List of restorable database accounts and their properties." + } + }, + "description": "The List operation response, that contains the restorable database accounts and their properties." + }, + "RestorableDatabaseAccountGetResult": { + "description": "A Azure Cosmos DB restorable database account.", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable database account.", + "$ref": "#/definitions/RestorableDatabaseAccountProperties" + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableDatabaseAccountProperties": { + "type": "object", + "description": "The properties of a restorable database account.", + "properties": { + "accountName": { + "type": "string", + "description": "The name of the global database account" + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "The creation time of the restorable database account (ISO-8601 format)." + }, + "deletionTime": { + "type": "string", + "format": "date-time", + "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." + }, + "apiType": { + "type": "string", + "readOnly": true, + "description": "The API type of the restorable database account.", + "$ref": "#/definitions/ApiType" + }, + "restorableLocations": { + "type": "array", + "readOnly": true, + "description": "List of regions where the of the database account can be restored from.", + "items": { + "$ref": "#/definitions/RestorableLocationResource" + } + } + } + }, + "ApiType": { + "description": "Enum to indicate the API type of the restorable database account.", + "type": "string", + "readOnly": true, + "enum": [ + "MongoDB", + "Gremlin", + "Cassandra", + "Table", + "Sql", + "GremlinV2" + ], + "x-ms-enum": { + "name": "ApiType", + "modelAsString": true + } + }, + "RestorableLocationResource": { + "type": "object", + "description": "Properties of the regional restorable account.", + "properties": { + "locationName": { + "type": "string", + "readOnly": true, + "description": "The location of the regional restorable account." + }, + "regionalDatabaseAccountInstanceId": { + "type": "string", + "readOnly": true, + "description": "The instance id of the regional restorable account." + }, + "creationTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The creation time of the regional restorable database account (ISO-8601 format)." + }, + "deletionTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The time at which the regional restorable database account has been deleted (ISO-8601 format)." + } + } + }, + "RestorableSqlDatabasesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableSqlDatabaseGetResult" + }, + "description": "List of restorable SQL databases and their properties." + } + }, + "description": "The List operation response, that contains the restorable SQL databases and their properties." + }, + "RestorableSqlDatabaseGetResult": { + "description": "An Azure Cosmos DB restorable SQL database", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable SQL database.", + "$ref": "#/definitions/RestorableSqlDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableSqlDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB restorable SQL database", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "readOnly": true, + "description": "A system generated property. A unique identifier." + }, + "operationType": { + "type": "string", + "readOnly": true, + "description": "The operation type of this database event.", + "$ref": "#/definitions/OperationType" + }, + "eventTimestamp": { + "type": "string", + "readOnly": true, + "description": "The timestamp of this database event." + }, + "ownerId": { + "type": "string", + "readOnly": true, + "description": "The name of this restorable SQL database." + }, + "ownerResourceId": { + "type": "string", + "readOnly": true, + "description": "The resource Id of this restorable SQL database." + }, + "database": { + "properties": { + "_colls": { + "type": "string", + "readOnly": true, + "description": "A system generated property that specified the addressable path of the collections resource." + }, + "_users": { + "type": "string", + "readOnly": true, + "description": "A system generated property that specifies the addressable path of the users resource." + }, + "_self": { + "type": "string", + "readOnly": true, + "description": "A system generated property that specifies the addressable path of the database resource." + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/SqlDatabaseResource" + }, + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ExtendedResourceProperties" + } + ] + } + } + } + } + }, + "RestorableSqlContainersListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableSqlContainerGetResult" + }, + "description": "List of restorable SQL containers and their properties." + } + }, + "description": "The List operation response, that contains the restorable SQL containers and their properties." + }, + "RestorableSqlContainerGetResult": { + "description": "An Azure Cosmos DB restorable SQL container", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable SQL container.", + "$ref": "#/definitions/RestorableSqlContainerProperties" + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableSqlContainerProperties": { + "description": "The properties of an Azure Cosmos DB restorable SQL container", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "readOnly": true, + "description": "A system generated property. A unique identifier." + }, + "operationType": { + "type": "string", + "readOnly": true, + "description": "The operation type of this container event.", + "$ref": "#/definitions/OperationType" + }, + "eventTimestamp": { + "type": "string", + "readOnly": true, + "description": "The timestamp of this container event." + }, + "ownerId": { + "type": "string", + "readOnly": true, + "description": "The name of this restorable SQL container." + }, + "ownerResourceId": { + "type": "string", + "readOnly": true, + "description": "The resource Id of this restorable SQL container." + }, + "container": { + "properties": { + "_self": { + "type": "string", + "readOnly": true, + "description": "A system generated property that specifies the addressable path of the container resource." + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/SqlContainerResource" + }, + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ExtendedResourceProperties" + } + ] + } + } + } + } + }, + "RestorableSqlResourcesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DatabaseRestoreResource" + }, + "description": "List of restorable SQL resources, including the database and collection names." + } + }, + "description": "The List operation response, that contains the restorable SQL resources." + }, + "RestorableMongodbDatabasesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" + }, + "description": "List of restorable MongoDB databases and their properties." + } + }, + "description": "The List operation response, that contains the restorable MongoDB databases and their properties." + }, + "RestorableMongodbDatabaseGetResult": { + "description": "An Azure Cosmos DB restorable MongoDB database", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable MongoDB database.", + "$ref": "#/definitions/RestorableMongodbDatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableMongodbDatabaseProperties": { + "description": "The properties of an Azure Cosmos DB restorable MongoDB database", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "readOnly": true, + "description": "A system generated property. A unique identifier." + }, + "operationType": { + "type": "string", + "readOnly": true, + "description": "The operation type of this database event.", + "$ref": "#/definitions/OperationType" + }, + "eventTimestamp": { + "type": "string", + "readOnly": true, + "description": "The timestamp of this database event." + }, + "ownerId": { + "type": "string", + "readOnly": true, + "description": "The name of this restorable MongoDB database." + }, + "ownerResourceId": { + "type": "string", + "readOnly": true, + "description": "The resource Id of this restorable MongoDB database." + } + } + } + } + }, + "RestorableMongodbCollectionsListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableMongodbCollectionGetResult" + }, + "description": "List of restorable MongoDB collections and their properties." + } + }, + "description": "The List operation response, that contains the restorable MongoDB collections and their properties." + }, + "RestorableMongodbCollectionGetResult": { + "description": "An Azure Cosmos DB restorable MongoDB collection", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable MongoDB collection.", + "$ref": "#/definitions/RestorableMongodbCollectionProperties" + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableMongodbCollectionProperties": { + "description": "The properties of an Azure Cosmos DB restorable MongoDB collection", + "type": "object", + "properties": { + "resource": { + "properties": { + "_rid": { + "type": "string", + "readOnly": true, + "description": "A system generated property. A unique identifier." + }, + "operationType": { + "type": "string", + "readOnly": true, + "description": "The operation type of this collection event.", + "$ref": "#/definitions/OperationType" + }, + "eventTimestamp": { + "type": "string", + "readOnly": true, + "description": "The timestamp of this collection event." + }, + "ownerId": { + "type": "string", + "readOnly": true, + "description": "The name of this restorable MongoDB collection." + }, + "ownerResourceId": { + "type": "string", + "readOnly": true, + "description": "The resource Id of this restorable MongoDB collection." + } + } + } + } + }, + "RestorableMongodbResourcesListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DatabaseRestoreResource" + }, + "description": "List of restorable MongoDB resources, including the database and collection names." + } + }, + "description": "The List operation response, that contains the restorable MongoDB resources." + }, + "OperationType": { + "description": "Enum to indicate the operation type of the event.", + "type": "string", + "readOnly": true, + "enum": [ + "Create", + "Replace", + "Delete", + "SystemOperation" + ], + "x-ms-enum": { + "name": "OperationType", + "modelAsString": true + } + } + }, + "parameters": { + "locationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Cosmos DB region, with spaces between words and each word capitalized." + }, + "instanceIdParameter": { + "name": "instanceId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The instanceId GUID of a restorable database account." + }, + "restorableSqlDatabaseIdParameter": { + "name": "restorableSqlDatabaseId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The GUID of the restorable SQL database." + }, + "restorableMongodbDatabaseIdParameter": { + "name": "restorableMongodbDatabaseId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The GUID of the restorable MongoDB database." + }, + "restorableSqlContainerIdParameter": { + "name": "restorableSqlContainerId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The GUID of the restorable SQL container." + }, + "restorableMongodbCollectionIdParameter": { + "name": "restorableMongodbCollectionId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The GUID of the restorable MongoDB collection." + }, + "restorableSqlDatabaseRidParameter": { + "name": "restorableSqlDatabaseRid", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The resource id of the restorable SQL database." + }, + "restorableMongodbDatabaseRidParameter": { + "name": "restorableMongodbDatabaseRid", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The resource id of the restorable Mongo database." + }, + "restoreLocationParameter": { + "name": "restoreLocation", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The location where the restorable resources are located." + }, + "restoreTimestampInUtcParameter": { + "name": "restoreTimestampInUtc", + "in": "query", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The timestamp when the restorable resources existed." + } + } +} From 190d84e201646c0ea9faa1eda64fb7a81e404fea Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 1 Dec 2020 15:30:28 -0800 Subject: [PATCH 22/24] move restorable database apis back to cosmos-db.json --- .../preview/2020-06-01-preview/cosmos-db.json | 239 +++++++++++++++ .../2020-06-01-preview/restorable.json | 279 ++---------------- 2 files changed, 259 insertions(+), 259 deletions(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index 8d32d8d3815d..d39362035ddf 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -4184,6 +4184,120 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts": { + "get": { + "operationId": "RestorableDatabaseAccounts_ListByLocation", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableDatabaseAccountList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableDatabaseAccountsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts": { + "get": { + "operationId": "RestorableDatabaseAccounts_List", + "x-ms-examples": { + "CosmosDBDatabaseAccountList": { + "$ref": "./examples/CosmosDBRestorableDatabaseAccountNoLocationList.json" + } + }, + "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The operation completed successfully.", + "schema": { + "$ref": "#/definitions/RestorableDatabaseAccountsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}": { + "get": { + "operationId": "RestorableDatabaseAccounts_GetByLocation", + "x-ms-examples": { + "CosmosDBDatabaseAccountGet": { + "$ref": "./examples/CosmosDBRestorableDatabaseAccountGet.json" + } + }, + "description": "Retrieves the properties of an existing Azure Cosmos DB restorable database account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "$ref": "#/parameters/instanceIdParameter" + } + ], + "responses": { + "200": { + "description": "The restorable database account properties were retrieved successfully.", + "schema": { + "$ref": "#/definitions/RestorableDatabaseAccountGetResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DefaultErrorResponse" + } + } + } + } } }, "definitions": { @@ -7675,6 +7789,115 @@ "description": "An integer representing the time (in hours) that each backup is retained" } } + }, + "RestorableDatabaseAccountsListResult": { + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/RestorableDatabaseAccountGetResult" + }, + "description": "List of restorable database accounts and their properties." + } + }, + "description": "The List operation response, that contains the restorable database accounts and their properties." + }, + "RestorableDatabaseAccountGetResult": { + "description": "A Azure Cosmos DB restorable database account.", + "type": "object", + "properties": { + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The properties of a restorable database account.", + "$ref": "#/definitions/RestorableDatabaseAccountProperties" + } + }, + "allOf": [ + { + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + } + ] + }, + "RestorableDatabaseAccountProperties": { + "type": "object", + "description": "The properties of a restorable database account.", + "properties": { + "accountName": { + "type": "string", + "description": "The name of the global database account" + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "The creation time of the restorable database account (ISO-8601 format)." + }, + "deletionTime": { + "type": "string", + "format": "date-time", + "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." + }, + "apiType": { + "type": "string", + "readOnly": true, + "description": "The API type of the restorable database account.", + "$ref": "#/definitions/ApiType" + }, + "restorableLocations": { + "type": "array", + "readOnly": true, + "description": "List of regions where the of the database account can be restored from.", + "items": { + "$ref": "#/definitions/RestorableLocationResource" + } + } + } + }, + "ApiType": { + "description": "Enum to indicate the API type of the restorable database account.", + "type": "string", + "readOnly": true, + "enum": [ + "MongoDB", + "Gremlin", + "Cassandra", + "Table", + "Sql", + "GremlinV2" + ], + "x-ms-enum": { + "name": "ApiType", + "modelAsString": true + } + }, + "RestorableLocationResource": { + "type": "object", + "description": "Properties of the regional restorable account.", + "properties": { + "locationName": { + "type": "string", + "readOnly": true, + "description": "The location of the regional restorable account." + }, + "regionalDatabaseAccountInstanceId": { + "type": "string", + "readOnly": true, + "description": "The instance id of the regional restorable account." + }, + "creationTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The creation time of the regional restorable database account (ISO-8601 format)." + }, + "deletionTime": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "The time at which the regional restorable database account has been deleted (ISO-8601 format)." + } + } } }, "parameters": { @@ -7835,6 +8058,22 @@ "type": "string", "x-ms-parameter-location": "method", "description": "Partition Key Range Id for which to get data." + }, + "locationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "Cosmos DB region, with spaces between words and each word capitalized." + }, + "instanceIdParameter": { + "name": "instanceId", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "description": "The instanceId GUID of a restorable database account." } } } diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json index b013233126fd..75b4d429f983 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json @@ -34,120 +34,6 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts": { - "get": { - "operationId": "RestorableDatabaseAccounts_ListByLocation", - "x-ms-examples": { - "CosmosDBDatabaseAccountList": { - "$ref": "./examples/CosmosDBRestorableDatabaseAccountList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription and in a region.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableDatabaseAccountsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts": { - "get": { - "operationId": "RestorableDatabaseAccounts_List", - "x-ms-examples": { - "CosmosDBDatabaseAccountList": { - "$ref": "./examples/CosmosDBRestorableDatabaseAccountNoLocationList.json" - } - }, - "description": "Lists all the restorable Azure Cosmos DB database accounts available under the subscription.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableDatabaseAccountsListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}": { - "get": { - "operationId": "RestorableDatabaseAccounts_GetByLocation", - "x-ms-examples": { - "CosmosDBDatabaseAccountGet": { - "$ref": "./examples/CosmosDBRestorableDatabaseAccountGet.json" - } - }, - "description": "Retrieves the properties of an existing Azure Cosmos DB restorable database account.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/locationParameter" - }, - { - "$ref": "#/parameters/instanceIdParameter" - } - ], - "responses": { - "200": { - "description": "The restorable database account properties were retrieved successfully.", - "schema": { - "$ref": "#/definitions/RestorableDatabaseAccountGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases": { "get": { "operationId": "RestorableSqlDatabases_List", @@ -165,10 +51,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" } ], "responses": { @@ -207,10 +93,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restorableSqlDatabaseIdParameter" @@ -249,10 +135,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restorableSqlDatabaseRidParameter" @@ -294,10 +180,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restorableSqlContainerIdParameter" @@ -339,10 +225,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restoreLocationParameter" @@ -387,10 +273,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" } ], "responses": { @@ -429,10 +315,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restorableMongodbDatabaseIdParameter" @@ -471,10 +357,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restorableMongodbDatabaseRidParameter" @@ -516,10 +402,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restorableMongodbCollectionIdParameter" @@ -561,10 +447,10 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "#/parameters/locationParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" }, { - "$ref": "#/parameters/instanceIdParameter" + "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" }, { "$ref": "#/parameters/restoreLocationParameter" @@ -594,115 +480,6 @@ } }, "definitions": { - "RestorableDatabaseAccountsListResult": { - "properties": { - "value": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/RestorableDatabaseAccountGetResult" - }, - "description": "List of restorable database accounts and their properties." - } - }, - "description": "The List operation response, that contains the restorable database accounts and their properties." - }, - "RestorableDatabaseAccountGetResult": { - "description": "A Azure Cosmos DB restorable database account.", - "type": "object", - "properties": { - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The properties of a restorable database account.", - "$ref": "#/definitions/RestorableDatabaseAccountProperties" - } - }, - "allOf": [ - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" - } - ] - }, - "RestorableDatabaseAccountProperties": { - "type": "object", - "description": "The properties of a restorable database account.", - "properties": { - "accountName": { - "type": "string", - "description": "The name of the global database account" - }, - "creationTime": { - "type": "string", - "format": "date-time", - "description": "The creation time of the restorable database account (ISO-8601 format)." - }, - "deletionTime": { - "type": "string", - "format": "date-time", - "description": "The time at which the restorable database account has been deleted (ISO-8601 format)." - }, - "apiType": { - "type": "string", - "readOnly": true, - "description": "The API type of the restorable database account.", - "$ref": "#/definitions/ApiType" - }, - "restorableLocations": { - "type": "array", - "readOnly": true, - "description": "List of regions where the of the database account can be restored from.", - "items": { - "$ref": "#/definitions/RestorableLocationResource" - } - } - } - }, - "ApiType": { - "description": "Enum to indicate the API type of the restorable database account.", - "type": "string", - "readOnly": true, - "enum": [ - "MongoDB", - "Gremlin", - "Cassandra", - "Table", - "Sql", - "GremlinV2" - ], - "x-ms-enum": { - "name": "ApiType", - "modelAsString": true - } - }, - "RestorableLocationResource": { - "type": "object", - "description": "Properties of the regional restorable account.", - "properties": { - "locationName": { - "type": "string", - "readOnly": true, - "description": "The location of the regional restorable account." - }, - "regionalDatabaseAccountInstanceId": { - "type": "string", - "readOnly": true, - "description": "The instance id of the regional restorable account." - }, - "creationTime": { - "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The creation time of the regional restorable database account (ISO-8601 format)." - }, - "deletionTime": { - "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The time at which the regional restorable database account has been deleted (ISO-8601 format)." - } - } - }, "RestorableSqlDatabasesListResult": { "properties": { "value": { @@ -1054,22 +831,6 @@ } }, "parameters": { - "locationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "Cosmos DB region, with spaces between words and each word capitalized." - }, - "instanceIdParameter": { - "name": "instanceId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The instanceId GUID of a restorable database account." - }, "restorableSqlDatabaseIdParameter": { "name": "restorableSqlDatabaseId", "in": "path", From f16443edc7ab29c5ff198f010ca21853e0695148 Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 1 Dec 2020 15:39:11 -0800 Subject: [PATCH 23/24] remove point read apis --- ...osmosDBRestorableMongodbCollectionGet.json | 27 --- .../CosmosDBRestorableMongodbDatabaseGet.json | 27 --- .../CosmosDBRestorableSqlContainerGet.json | 55 ----- .../CosmosDBRestorableSqlDatabaseGet.json | 35 --- .../2020-06-01-preview/restorable.json | 206 ------------------ 5 files changed, 350 deletions(-) delete mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json delete mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json delete mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json delete mode 100644 specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json deleted file mode 100644 index ab3fbd0b60d6..000000000000 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbCollectionGet.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01-preview", - "subscriptionId": "subid", - "location": "WestUS", - "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "restorableMongodbCollectionId": "79609a98-3394-41f8-911f-cfab0c075c86" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableMongodbCollections/79609a98-3394-41f8-911f-cfab0c075c86", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbCollections", - "name": "79609a98-3394-41f8-911f-cfab0c075c86", - "properties": { - "resource": { - "_rid": "zAyAPQAAAA==", - "eventTimestamp": "2020-10-13T04:56:42Z", - "ownerId": "Collection1", - "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Create" - } - } - } - } - } -} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json deleted file mode 100644 index 8e12b8801d5f..000000000000 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableMongodbDatabaseGet.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01-preview", - "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", - "location": "WestUS", - "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "restorableMongodbDatabaseId": "59c21367-b98b-4a8e-abb7-b6f46600decc" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/d9b26648-2f53-4541-b3d8-3044f4f9810d/restorableMongodbDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableMongodbDatabases", - "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", - "properties": { - "resource": { - "_rid": "DLB14gAAAA==", - "eventTimestamp": "2020-09-02T19:45:03Z", - "ownerId": "Database1", - "ownerResourceId": "PD5DALigDgw=", - "operationType": "Create" - } - } - } - } - } -} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json deleted file mode 100644 index a8d9e20b9a28..000000000000 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlContainerGet.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01-preview", - "subscriptionId": "subid", - "location": "WestUS", - "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "restorableSqlContainerId": "79609a98-3394-41f8-911f-cfab0c075c86" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/subid/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/98a570f2-63db-4117-91f0-366327b7b353/restorableSqlContainers/79609a98-3394-41f8-911f-cfab0c075c86", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlContainers", - "name": "79609a98-3394-41f8-911f-cfab0c075c86", - "properties": { - "resource": { - "_rid": "zAyAPQAAAA==", - "eventTimestamp": "2020-10-13T04:56:42Z", - "ownerId": "Container1", - "ownerResourceId": "V18LoLrv-qA=", - "operationType": "Create", - "container": { - "id": "Container1", - "indexingPolicy": { - "indexingMode": "Consistent", - "automatic": true, - "includedPaths": [ - { - "path": "/*" - }, - { - "path": "/\"_ts\"/?" - } - ], - "excludedPaths": [ - { - "path": "/\"_etag\"/?" - } - ] - }, - "conflictResolutionPolicy": { - "mode": "LastWriterWins", - "conflictResolutionPath": "/_ts", - "conflictResolutionProcedure": "" - }, - "_rid": "V18LoLrv-qA=", - "_self": "dbs/V18LoA==/colls/V18LoLrv-qA=/", - "_etag": "\"00003e00-0000-0700-0000-5f85338a0000\"" - } - } - } - } - } - } -} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json deleted file mode 100644 index ca2a5c4401ff..000000000000 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/examples/CosmosDBRestorableSqlDatabaseGet.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parameters": { - "api-version": "2020-06-01-preview", - "subscriptionId": "2296c272-5d55-40d9-bc05-4d56dc2d7588", - "location": "WestUS", - "instanceId": "d9b26648-2f53-4541-b3d8-3044f4f9810d", - "restorableSqlDatabaseId": "59c21367-b98b-4a8e-abb7-b6f46600decc" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/2296c272-5d55-40d9-bc05-4d56dc2d7588/providers/Microsoft.DocumentDb/locations/westus/restorableDatabaseAccounts/36f09704-6be3-4f33-aa05-17b73e504c75/restorableSqlDatabases/59c21367-b98b-4a8e-abb7-b6f46600decc", - "type": "Microsoft.DocumentDB/locations/restorableDatabaseAccounts/restorableSqlDatabases", - "name": "59c21367-b98b-4a8e-abb7-b6f46600decc", - "properties": { - "resource": { - "_rid": "DLB14gAAAA==", - "eventTimestamp": "2020-09-02T19:45:03Z", - "ownerId": "Database1", - "ownerResourceId": "3fu-hg==", - "operationType": "Create", - "database": { - "id": "Database1", - "_rid": "3fu-hg==", - "_self": "dbs/3fu-hg==/", - "_etag": "\"0000c20a-0000-0700-0000-5f4ff63f0000\"", - "_colls": "colls/", - "_users": "users/" - } - } - } - } - } - } -} diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json index 75b4d429f983..9a3d6b9b8a43 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json @@ -76,48 +76,6 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases/{restorableSqlDatabaseId}": { - "get": { - "operationId": "RestorableSqlDatabases_Get", - "x-ms-examples": { - "CosmosDBRestorableSqlDatabaseGet": { - "$ref": "./examples/CosmosDBRestorableSqlDatabaseGet.json" - } - }, - "description": "Get the properties of a restorable SQL database.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableSqlDatabaseIdParameter" - } - ], - "responses": { - "200": { - "description": "The restorable SQL databases properties were retrieved successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlDatabaseGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers": { "get": { "operationId": "RestorableSqlContainers_List", @@ -163,51 +121,6 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers/{restorableSqlContainerId}": { - "get": { - "operationId": "RestorableSqlContainers_Get", - "x-ms-examples": { - "CosmosDBRestorableSqlContainerGet": { - "$ref": "./examples/CosmosDBRestorableSqlContainerGet.json" - } - }, - "description": "Get the properties of a restorable SQL container.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableSqlContainerIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableSqlContainerGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources": { "get": { "operationId": "RestorableSqlResources_List", @@ -298,48 +211,6 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases/{restorableMongodbDatabaseId}": { - "get": { - "operationId": "RestorableMongodbDatabases_Get", - "x-ms-examples": { - "CosmosDBRestorableMongodbDatabaseGet": { - "$ref": "./examples/CosmosDBRestorableMongodbDatabaseGet.json" - } - }, - "description": "Get the properties of a restorable MongoDB database.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableMongodbDatabaseIdParameter" - } - ], - "responses": { - "200": { - "description": "The restorable MongoDB databases properties were retrieved successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbDatabaseGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections": { "get": { "operationId": "RestorableMongodbCollections_List", @@ -385,51 +256,6 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections/{restorableMongodbCollectionId}": { - "get": { - "operationId": "RestorableMongodbCollections_Get", - "x-ms-examples": { - "CosmosDBRestorableMongodbCollectionGet": { - "$ref": "./examples/CosmosDBRestorableMongodbCollectionGet.json" - } - }, - "description": "Get the properties of a restorable MongoDB Collection.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/locationParameter" - }, - { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/parameters/instanceIdParameter" - }, - { - "$ref": "#/parameters/restorableMongodbCollectionIdParameter" - } - ], - "responses": { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/RestorableMongodbCollectionGetResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/DefaultErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources": { "get": { "operationId": "RestorableMongodbResources_List", @@ -831,38 +657,6 @@ } }, "parameters": { - "restorableSqlDatabaseIdParameter": { - "name": "restorableSqlDatabaseId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable SQL database." - }, - "restorableMongodbDatabaseIdParameter": { - "name": "restorableMongodbDatabaseId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable MongoDB database." - }, - "restorableSqlContainerIdParameter": { - "name": "restorableSqlContainerId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable SQL container." - }, - "restorableMongodbCollectionIdParameter": { - "name": "restorableMongodbCollectionId", - "in": "path", - "required": true, - "type": "string", - "x-ms-parameter-location": "method", - "description": "The GUID of the restorable MongoDB collection." - }, "restorableSqlDatabaseRidParameter": { "name": "restorableSqlDatabaseRid", "in": "query", From 3ccbd3f3d09a842adc5804eb101b01a7630002fa Mon Sep 17 00:00:00 2001 From: Vinh Trinh Date: Tue, 1 Dec 2020 16:40:51 -0800 Subject: [PATCH 24/24] fix avocado --- .../preview/2020-06-01-preview/cosmos-db.json | 2 +- specification/cosmos-db/resource-manager/readme.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json index d39362035ddf..5c326dbdf557 100644 --- a/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json +++ b/specification/cosmos-db/resource-manager/Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json @@ -7816,7 +7816,7 @@ }, "allOf": [ { - "$ref": "../../preview/2020-06-01-preview/cosmos-db.json#/definitions/ARMResourceProperties" + "$ref": "#/definitions/ARMResourceProperties" } ] }, diff --git a/specification/cosmos-db/resource-manager/readme.md b/specification/cosmos-db/resource-manager/readme.md index c499f9084d26..9bc9678339c4 100644 --- a/specification/cosmos-db/resource-manager/readme.md +++ b/specification/cosmos-db/resource-manager/readme.md @@ -49,6 +49,7 @@ input-file: - Microsoft.DocumentDB/preview/2020-06-01-preview/cosmos-db.json - Microsoft.DocumentDB/preview/2020-06-01-preview/notebook.json - Microsoft.DocumentDB/preview/2020-06-01-preview/rbac.json +- Microsoft.DocumentDB/preview/2020-06-01-preview/restorable.json - Microsoft.DocumentDB/preview/2019-08-01-preview/privateLinkResources.json - Microsoft.DocumentDB/preview/2019-08-01-preview/privateEndpointConnection.json ```