From 7c2b91f5a8615db6aaae10bf03531bc22dcbcd09 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 11 Aug 2020 08:24:45 +0000 Subject: [PATCH] Generated from 5f32e9e2f53e222ca19944f4dc57d44568d27dc9 adding int format --- .../src/models/cassandraResourcesMappers.ts | 1 + .../src/models/databaseAccountsMappers.ts | 1 + .../src/models/gremlinResourcesMappers.ts | 1 + sdk/cosmosdb/arm-cosmosdb/src/models/index.ts | 947 ++++++++++++++++-- .../arm-cosmosdb/src/models/mappers.ts | 93 ++ .../src/models/mongoDBResourcesMappers.ts | 1 + .../src/models/notebookWorkspacesMappers.ts | 1 + .../privateEndpointConnectionsMappers.ts | 1 + .../src/models/privateLinkResourcesMappers.ts | 1 + .../src/models/sqlResourcesMappers.ts | 1 + .../src/models/tableResourcesMappers.ts | 1 + .../src/operations/cassandraResources.ts | 248 +++++ .../src/operations/databaseAccounts.ts | 1 - .../src/operations/gremlinResources.ts | 248 +++++ .../src/operations/mongoDBResources.ts | 248 +++++ .../src/operations/sqlResources.ts | 248 +++++ .../src/operations/tableResources.ts | 120 +++ 17 files changed, 2071 insertions(+), 91 deletions(-) diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts index 8076d88e0ecd..82a9fd18b4e2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts @@ -37,6 +37,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts index 6e8a41e5a809..e39dae4bd613 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountConnectionString, DatabaseAccountCreateUpdateParameters, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts index dd77c0ca8c2e..bedc97f02dcf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index e5d581ad3955..db47da64995a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -219,6 +219,33 @@ export interface ApiProperties { serverVersion?: ServerVersion; } +/** + * The CORS policy for the Cosmos DB database account. + */ +export interface CorsPolicy { + /** + * The origin domains that are permitted to make a request against the service via CORS. + */ + allowedOrigins: string; + /** + * The methods (HTTP request verbs) that the origin domain may use for a CORS request. + */ + allowedMethods?: string; + /** + * The request headers that the origin domain may specify on the CORS request. + */ + allowedHeaders?: string; + /** + * The response headers that may be sent in the response to the CORS request and exposed by the + * browser to the request issuer. + */ + exposedHeaders?: string; + /** + * The maximum amount time that a browser should cache the preflight OPTIONS request. + */ + maxAgeInSeconds?: number; +} + /** * The core properties of ARM resources. */ @@ -357,6 +384,10 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { * Flag to indicate whether to enable storage analytics. */ enableAnalyticalStorage?: boolean; + /** + * The CORS policy for the Cosmos DB database account. + */ + cors?: CorsPolicy[]; } /** @@ -621,6 +652,10 @@ export interface SqlContainerGetPropertiesResource { * The conflict resolution policy for the container. */ conflictResolutionPolicy?: ConflictResolutionPolicy; + /** + * Analytical TTL. + */ + analyticalStorageTtl?: number; /** * A system generated property. A unique identifier. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1446,6 +1481,10 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper * Flag to indicate whether to enable storage analytics. */ enableAnalyticalStorage?: boolean; + /** + * The CORS policy for the Cosmos DB database account. + */ + cors?: CorsPolicy[]; } /** @@ -1526,6 +1565,10 @@ export interface DatabaseAccountUpdateParameters { * Flag to indicate whether to enable storage analytics. */ enableAnalyticalStorage?: boolean; + /** + * The CORS policy for the Cosmos DB database account. + */ + cors?: CorsPolicy[]; } /** @@ -1715,6 +1758,10 @@ export interface SqlContainerResource { * The conflict resolution policy for the container. */ conflictResolutionPolicy?: ConflictResolutionPolicy; + /** + * Analytical TTL. + */ + analyticalStorageTtl?: number; } /** @@ -3597,6 +3644,46 @@ export type SqlResourcesUpdateSqlDatabaseThroughputResponse = ThroughputSettings }; }; +/** + * Contains response data for the migrateSqlDatabaseToAutoscale operation. + */ +export type SqlResourcesMigrateSqlDatabaseToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateSqlDatabaseToManualThroughput operation. + */ +export type SqlResourcesMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the listSqlContainers operation. */ @@ -3697,6 +3784,46 @@ export type SqlResourcesUpdateSqlContainerThroughputResponse = ThroughputSetting }; }; +/** + * Contains response data for the migrateSqlContainerToAutoscale operation. + */ +export type SqlResourcesMigrateSqlContainerToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateSqlContainerToManualThroughput operation. + */ +export type SqlResourcesMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the listSqlStoredProcedures operation. */ @@ -3918,9 +4045,9 @@ export type SqlResourcesBeginUpdateSqlDatabaseThroughputResponse = ThroughputSet }; /** - * Contains response data for the beginCreateUpdateSqlContainer operation. + * Contains response data for the beginMigrateSqlDatabaseToAutoscale operation. */ -export type SqlResourcesBeginCreateUpdateSqlContainerResponse = SqlContainerGetResults & { +export type SqlResourcesBeginMigrateSqlDatabaseToAutoscaleResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -3933,14 +4060,14 @@ export type SqlResourcesBeginCreateUpdateSqlContainerResponse = SqlContainerGetR /** * The response body as parsed JSON or XML */ - parsedBody: SqlContainerGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the beginUpdateSqlContainerThroughput operation. + * Contains response data for the beginMigrateSqlDatabaseToManualThroughput operation. */ -export type SqlResourcesBeginUpdateSqlContainerThroughputResponse = ThroughputSettingsGetResults & { +export type SqlResourcesBeginMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -3958,9 +4085,9 @@ export type SqlResourcesBeginUpdateSqlContainerThroughputResponse = ThroughputSe }; /** - * Contains response data for the beginCreateUpdateSqlStoredProcedure operation. + * Contains response data for the beginCreateUpdateSqlContainer operation. */ -export type SqlResourcesBeginCreateUpdateSqlStoredProcedureResponse = SqlStoredProcedureGetResults & { +export type SqlResourcesBeginCreateUpdateSqlContainerResponse = SqlContainerGetResults & { /** * The underlying HTTP response. */ @@ -3973,14 +4100,14 @@ export type SqlResourcesBeginCreateUpdateSqlStoredProcedureResponse = SqlStoredP /** * The response body as parsed JSON or XML */ - parsedBody: SqlStoredProcedureGetResults; + parsedBody: SqlContainerGetResults; }; }; /** - * Contains response data for the beginCreateUpdateSqlUserDefinedFunction operation. + * Contains response data for the beginUpdateSqlContainerThroughput operation. */ -export type SqlResourcesBeginCreateUpdateSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults & { +export type SqlResourcesBeginUpdateSqlContainerThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -3993,14 +4120,14 @@ export type SqlResourcesBeginCreateUpdateSqlUserDefinedFunctionResponse = SqlUse /** * The response body as parsed JSON or XML */ - parsedBody: SqlUserDefinedFunctionGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the beginCreateUpdateSqlTrigger operation. + * Contains response data for the beginMigrateSqlContainerToAutoscale operation. */ -export type SqlResourcesBeginCreateUpdateSqlTriggerResponse = SqlTriggerGetResults & { +export type SqlResourcesBeginMigrateSqlContainerToAutoscaleResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4013,14 +4140,14 @@ export type SqlResourcesBeginCreateUpdateSqlTriggerResponse = SqlTriggerGetResul /** * The response body as parsed JSON or XML */ - parsedBody: SqlTriggerGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the listMongoDBDatabases operation. + * Contains response data for the beginMigrateSqlContainerToManualThroughput operation. */ -export type MongoDBResourcesListMongoDBDatabasesResponse = MongoDBDatabaseListResult & { +export type SqlResourcesBeginMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4033,14 +4160,14 @@ export type MongoDBResourcesListMongoDBDatabasesResponse = MongoDBDatabaseListRe /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBDatabaseListResult; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the getMongoDBDatabase operation. + * Contains response data for the beginCreateUpdateSqlStoredProcedure operation. */ -export type MongoDBResourcesGetMongoDBDatabaseResponse = MongoDBDatabaseGetResults & { +export type SqlResourcesBeginCreateUpdateSqlStoredProcedureResponse = SqlStoredProcedureGetResults & { /** * The underlying HTTP response. */ @@ -4053,14 +4180,14 @@ export type MongoDBResourcesGetMongoDBDatabaseResponse = MongoDBDatabaseGetResul /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBDatabaseGetResults; + parsedBody: SqlStoredProcedureGetResults; }; }; /** - * Contains response data for the createUpdateMongoDBDatabase operation. + * Contains response data for the beginCreateUpdateSqlUserDefinedFunction operation. */ -export type MongoDBResourcesCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults & { +export type SqlResourcesBeginCreateUpdateSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults & { /** * The underlying HTTP response. */ @@ -4073,14 +4200,14 @@ export type MongoDBResourcesCreateUpdateMongoDBDatabaseResponse = MongoDBDatabas /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBDatabaseGetResults; + parsedBody: SqlUserDefinedFunctionGetResults; }; }; /** - * Contains response data for the getMongoDBDatabaseThroughput operation. + * Contains response data for the beginCreateUpdateSqlTrigger operation. */ -export type MongoDBResourcesGetMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults & { +export type SqlResourcesBeginCreateUpdateSqlTriggerResponse = SqlTriggerGetResults & { /** * The underlying HTTP response. */ @@ -4093,14 +4220,14 @@ export type MongoDBResourcesGetMongoDBDatabaseThroughputResponse = ThroughputSet /** * The response body as parsed JSON or XML */ - parsedBody: ThroughputSettingsGetResults; + parsedBody: SqlTriggerGetResults; }; }; /** - * Contains response data for the updateMongoDBDatabaseThroughput operation. + * Contains response data for the listMongoDBDatabases operation. */ -export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesListMongoDBDatabasesResponse = MongoDBDatabaseListResult & { /** * The underlying HTTP response. */ @@ -4113,14 +4240,14 @@ export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = Throughput /** * The response body as parsed JSON or XML */ - parsedBody: ThroughputSettingsGetResults; + parsedBody: MongoDBDatabaseListResult; }; }; /** - * Contains response data for the listMongoDBCollections operation. + * Contains response data for the getMongoDBDatabase operation. */ -export type MongoDBResourcesListMongoDBCollectionsResponse = MongoDBCollectionListResult & { +export type MongoDBResourcesGetMongoDBDatabaseResponse = MongoDBDatabaseGetResults & { /** * The underlying HTTP response. */ @@ -4133,14 +4260,14 @@ export type MongoDBResourcesListMongoDBCollectionsResponse = MongoDBCollectionLi /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBCollectionListResult; + parsedBody: MongoDBDatabaseGetResults; }; }; /** - * Contains response data for the getMongoDBCollection operation. + * Contains response data for the createUpdateMongoDBDatabase operation. */ -export type MongoDBResourcesGetMongoDBCollectionResponse = MongoDBCollectionGetResults & { +export type MongoDBResourcesCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults & { /** * The underlying HTTP response. */ @@ -4153,14 +4280,14 @@ export type MongoDBResourcesGetMongoDBCollectionResponse = MongoDBCollectionGetR /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBCollectionGetResults; + parsedBody: MongoDBDatabaseGetResults; }; }; /** - * Contains response data for the createUpdateMongoDBCollection operation. + * Contains response data for the getMongoDBDatabaseThroughput operation. */ -export type MongoDBResourcesCreateUpdateMongoDBCollectionResponse = MongoDBCollectionGetResults & { +export type MongoDBResourcesGetMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4173,14 +4300,14 @@ export type MongoDBResourcesCreateUpdateMongoDBCollectionResponse = MongoDBColle /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBCollectionGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the getMongoDBCollectionThroughput operation. + * Contains response data for the updateMongoDBDatabaseThroughput operation. */ -export type MongoDBResourcesGetMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4198,9 +4325,9 @@ export type MongoDBResourcesGetMongoDBCollectionThroughputResponse = ThroughputS }; /** - * Contains response data for the updateMongoDBCollectionThroughput operation. + * Contains response data for the migrateMongoDBDatabaseToAutoscale operation. */ -export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4218,9 +4345,9 @@ export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = Throughp }; /** - * Contains response data for the beginCreateUpdateMongoDBDatabase operation. + * Contains response data for the migrateMongoDBDatabaseToManualThroughput operation. */ -export type MongoDBResourcesBeginCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults & { +export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4233,14 +4360,14 @@ export type MongoDBResourcesBeginCreateUpdateMongoDBDatabaseResponse = MongoDBDa /** * The response body as parsed JSON or XML */ - parsedBody: MongoDBDatabaseGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the beginUpdateMongoDBDatabaseThroughput operation. + * Contains response data for the listMongoDBCollections operation. */ -export type MongoDBResourcesBeginUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesListMongoDBCollectionsResponse = MongoDBCollectionListResult & { /** * The underlying HTTP response. */ @@ -4253,14 +4380,14 @@ export type MongoDBResourcesBeginUpdateMongoDBDatabaseThroughputResponse = Throu /** * The response body as parsed JSON or XML */ - parsedBody: ThroughputSettingsGetResults; + parsedBody: MongoDBCollectionListResult; }; }; /** - * Contains response data for the beginCreateUpdateMongoDBCollection operation. + * Contains response data for the getMongoDBCollection operation. */ -export type MongoDBResourcesBeginCreateUpdateMongoDBCollectionResponse = MongoDBCollectionGetResults & { +export type MongoDBResourcesGetMongoDBCollectionResponse = MongoDBCollectionGetResults & { /** * The underlying HTTP response. */ @@ -4278,9 +4405,9 @@ export type MongoDBResourcesBeginCreateUpdateMongoDBCollectionResponse = MongoDB }; /** - * Contains response data for the beginUpdateMongoDBCollectionThroughput operation. + * Contains response data for the createUpdateMongoDBCollection operation. */ -export type MongoDBResourcesBeginUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesCreateUpdateMongoDBCollectionResponse = MongoDBCollectionGetResults & { /** * The underlying HTTP response. */ @@ -4293,14 +4420,14 @@ export type MongoDBResourcesBeginUpdateMongoDBCollectionThroughputResponse = Thr /** * The response body as parsed JSON or XML */ - parsedBody: ThroughputSettingsGetResults; + parsedBody: MongoDBCollectionGetResults; }; }; /** - * Contains response data for the listTables operation. + * Contains response data for the getMongoDBCollectionThroughput operation. */ -export type TableResourcesListTablesResponse = TableListResult & { +export type MongoDBResourcesGetMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4313,14 +4440,14 @@ export type TableResourcesListTablesResponse = TableListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: TableListResult; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the getTable operation. + * Contains response data for the updateMongoDBCollectionThroughput operation. */ -export type TableResourcesGetTableResponse = TableGetResults & { +export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4333,14 +4460,14 @@ export type TableResourcesGetTableResponse = TableGetResults & { /** * The response body as parsed JSON or XML */ - parsedBody: TableGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the createUpdateTable operation. + * Contains response data for the migrateMongoDBCollectionToAutoscale operation. */ -export type TableResourcesCreateUpdateTableResponse = TableGetResults & { +export type MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4353,14 +4480,14 @@ export type TableResourcesCreateUpdateTableResponse = TableGetResults & { /** * The response body as parsed JSON or XML */ - parsedBody: TableGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the getTableThroughput operation. + * Contains response data for the migrateMongoDBCollectionToManualThroughput operation. */ -export type TableResourcesGetTableThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4378,9 +4505,9 @@ export type TableResourcesGetTableThroughputResponse = ThroughputSettingsGetResu }; /** - * Contains response data for the updateTableThroughput operation. + * Contains response data for the beginCreateUpdateMongoDBDatabase operation. */ -export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesBeginCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults & { /** * The underlying HTTP response. */ @@ -4393,14 +4520,14 @@ export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetR /** * The response body as parsed JSON or XML */ - parsedBody: ThroughputSettingsGetResults; + parsedBody: MongoDBDatabaseGetResults; }; }; /** - * Contains response data for the beginCreateUpdateTable operation. + * Contains response data for the beginUpdateMongoDBDatabaseThroughput operation. */ -export type TableResourcesBeginCreateUpdateTableResponse = TableGetResults & { +export type MongoDBResourcesBeginUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4413,14 +4540,14 @@ export type TableResourcesBeginCreateUpdateTableResponse = TableGetResults & { /** * The response body as parsed JSON or XML */ - parsedBody: TableGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the beginUpdateTableThroughput operation. + * Contains response data for the beginMigrateMongoDBDatabaseToAutoscale operation. */ -export type TableResourcesBeginUpdateTableThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesBeginMigrateMongoDBDatabaseToAutoscaleResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4438,9 +4565,9 @@ export type TableResourcesBeginUpdateTableThroughputResponse = ThroughputSetting }; /** - * Contains response data for the listCassandraKeyspaces operation. + * Contains response data for the beginMigrateMongoDBDatabaseToManualThroughput operation. */ -export type CassandraResourcesListCassandraKeyspacesResponse = CassandraKeyspaceListResult & { +export type MongoDBResourcesBeginMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4453,14 +4580,14 @@ export type CassandraResourcesListCassandraKeyspacesResponse = CassandraKeyspace /** * The response body as parsed JSON or XML */ - parsedBody: CassandraKeyspaceListResult; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the getCassandraKeyspace operation. + * Contains response data for the beginCreateUpdateMongoDBCollection operation. */ -export type CassandraResourcesGetCassandraKeyspaceResponse = CassandraKeyspaceGetResults & { +export type MongoDBResourcesBeginCreateUpdateMongoDBCollectionResponse = MongoDBCollectionGetResults & { /** * The underlying HTTP response. */ @@ -4473,14 +4600,14 @@ export type CassandraResourcesGetCassandraKeyspaceResponse = CassandraKeyspaceGe /** * The response body as parsed JSON or XML */ - parsedBody: CassandraKeyspaceGetResults; + parsedBody: MongoDBCollectionGetResults; }; }; /** - * Contains response data for the createUpdateCassandraKeyspace operation. + * Contains response data for the beginUpdateMongoDBCollectionThroughput operation. */ -export type CassandraResourcesCreateUpdateCassandraKeyspaceResponse = CassandraKeyspaceGetResults & { +export type MongoDBResourcesBeginUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4493,14 +4620,14 @@ export type CassandraResourcesCreateUpdateCassandraKeyspaceResponse = CassandraK /** * The response body as parsed JSON or XML */ - parsedBody: CassandraKeyspaceGetResults; + parsedBody: ThroughputSettingsGetResults; }; }; /** - * Contains response data for the getCassandraKeyspaceThroughput operation. + * Contains response data for the beginMigrateMongoDBCollectionToAutoscale operation. */ -export type CassandraResourcesGetCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesBeginMigrateMongoDBCollectionToAutoscaleResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4518,9 +4645,9 @@ export type CassandraResourcesGetCassandraKeyspaceThroughputResponse = Throughpu }; /** - * Contains response data for the updateCassandraKeyspaceThroughput operation. + * Contains response data for the beginMigrateMongoDBCollectionToManualThroughput operation. */ -export type CassandraResourcesUpdateCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults & { +export type MongoDBResourcesBeginMigrateMongoDBCollectionToManualThroughputResponse = ThroughputSettingsGetResults & { /** * The underlying HTTP response. */ @@ -4538,9 +4665,9 @@ export type CassandraResourcesUpdateCassandraKeyspaceThroughputResponse = Throug }; /** - * Contains response data for the listCassandraTables operation. + * Contains response data for the listTables operation. */ -export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult & { +export type TableResourcesListTablesResponse = TableListResult & { /** * The underlying HTTP response. */ @@ -4553,14 +4680,374 @@ export type CassandraResourcesListCassandraTablesResponse = CassandraTableListRe /** * The response body as parsed JSON or XML */ - parsedBody: CassandraTableListResult; + parsedBody: TableListResult; }; }; /** - * Contains response data for the getCassandraTable operation. + * Contains response data for the getTable operation. */ -export type CassandraResourcesGetCassandraTableResponse = CassandraTableGetResults & { +export type TableResourcesGetTableResponse = TableGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TableGetResults; + }; +}; + +/** + * Contains response data for the createUpdateTable operation. + */ +export type TableResourcesCreateUpdateTableResponse = TableGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TableGetResults; + }; +}; + +/** + * Contains response data for the getTableThroughput operation. + */ +export type TableResourcesGetTableThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the updateTableThroughput operation. + */ +export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateTableToAutoscale operation. + */ +export type TableResourcesMigrateTableToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateTableToManualThroughput operation. + */ +export type TableResourcesMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginCreateUpdateTable operation. + */ +export type TableResourcesBeginCreateUpdateTableResponse = TableGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TableGetResults; + }; +}; + +/** + * Contains response data for the beginUpdateTableThroughput operation. + */ +export type TableResourcesBeginUpdateTableThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginMigrateTableToAutoscale operation. + */ +export type TableResourcesBeginMigrateTableToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginMigrateTableToManualThroughput operation. + */ +export type TableResourcesBeginMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the listCassandraKeyspaces operation. + */ +export type CassandraResourcesListCassandraKeyspacesResponse = CassandraKeyspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraKeyspaceListResult; + }; +}; + +/** + * Contains response data for the getCassandraKeyspace operation. + */ +export type CassandraResourcesGetCassandraKeyspaceResponse = CassandraKeyspaceGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraKeyspaceGetResults; + }; +}; + +/** + * Contains response data for the createUpdateCassandraKeyspace operation. + */ +export type CassandraResourcesCreateUpdateCassandraKeyspaceResponse = CassandraKeyspaceGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraKeyspaceGetResults; + }; +}; + +/** + * Contains response data for the getCassandraKeyspaceThroughput operation. + */ +export type CassandraResourcesGetCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the updateCassandraKeyspaceThroughput operation. + */ +export type CassandraResourcesUpdateCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateCassandraKeyspaceToAutoscale operation. + */ +export type CassandraResourcesMigrateCassandraKeyspaceToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateCassandraKeyspaceToManualThroughput operation. + */ +export type CassandraResourcesMigrateCassandraKeyspaceToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the listCassandraTables operation. + */ +export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CassandraTableListResult; + }; +}; + +/** + * Contains response data for the getCassandraTable operation. + */ +export type CassandraResourcesGetCassandraTableResponse = CassandraTableGetResults & { /** * The underlying HTTP response. */ @@ -4637,6 +5124,46 @@ export type CassandraResourcesUpdateCassandraTableThroughputResponse = Throughpu }; }; +/** + * Contains response data for the migrateCassandraTableToAutoscale operation. + */ +export type CassandraResourcesMigrateCassandraTableToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateCassandraTableToManualThroughput operation. + */ +export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the beginCreateUpdateCassandraKeyspace operation. */ @@ -4677,6 +5204,46 @@ export type CassandraResourcesBeginUpdateCassandraKeyspaceThroughputResponse = T }; }; +/** + * Contains response data for the beginMigrateCassandraKeyspaceToAutoscale operation. + */ +export type CassandraResourcesBeginMigrateCassandraKeyspaceToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginMigrateCassandraKeyspaceToManualThroughput operation. + */ +export type CassandraResourcesBeginMigrateCassandraKeyspaceToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the beginCreateUpdateCassandraTable operation. */ @@ -4717,6 +5284,46 @@ export type CassandraResourcesBeginUpdateCassandraTableThroughputResponse = Thro }; }; +/** + * Contains response data for the beginMigrateCassandraTableToAutoscale operation. + */ +export type CassandraResourcesBeginMigrateCassandraTableToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginMigrateCassandraTableToManualThroughput operation. + */ +export type CassandraResourcesBeginMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the listGremlinDatabases operation. */ @@ -4817,6 +5424,46 @@ export type GremlinResourcesUpdateGremlinDatabaseThroughputResponse = Throughput }; }; +/** + * Contains response data for the migrateGremlinDatabaseToAutoscale operation. + */ +export type GremlinResourcesMigrateGremlinDatabaseToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateGremlinDatabaseToManualThroughput operation. + */ +export type GremlinResourcesMigrateGremlinDatabaseToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the listGremlinGraphs operation. */ @@ -4917,6 +5564,46 @@ export type GremlinResourcesUpdateGremlinGraphThroughputResponse = ThroughputSet }; }; +/** + * Contains response data for the migrateGremlinGraphToAutoscale operation. + */ +export type GremlinResourcesMigrateGremlinGraphToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the migrateGremlinGraphToManualThroughput operation. + */ +export type GremlinResourcesMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the beginCreateUpdateGremlinDatabase operation. */ @@ -4957,6 +5644,46 @@ export type GremlinResourcesBeginUpdateGremlinDatabaseThroughputResponse = Throu }; }; +/** + * Contains response data for the beginMigrateGremlinDatabaseToAutoscale operation. + */ +export type GremlinResourcesBeginMigrateGremlinDatabaseToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginMigrateGremlinDatabaseToManualThroughput operation. + */ +export type GremlinResourcesBeginMigrateGremlinDatabaseToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the beginCreateUpdateGremlinGraph operation. */ @@ -4997,6 +5724,46 @@ export type GremlinResourcesBeginUpdateGremlinGraphThroughputResponse = Throughp }; }; +/** + * Contains response data for the beginMigrateGremlinGraphToAutoscale operation. + */ +export type GremlinResourcesBeginMigrateGremlinGraphToAutoscaleResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + +/** + * Contains response data for the beginMigrateGremlinGraphToManualThroughput operation. + */ +export type GremlinResourcesBeginMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ThroughputSettingsGetResults; + }; +}; + /** * Contains response data for the listByDatabaseAccount operation. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index 8e51cb8aae25..ca81adfe92c1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -333,6 +333,51 @@ export const ApiProperties: msRest.CompositeMapper = { } }; +export const CorsPolicy: msRest.CompositeMapper = { + serializedName: "CorsPolicy", + type: { + name: "Composite", + className: "CorsPolicy", + modelProperties: { + allowedOrigins: { + required: true, + serializedName: "allowedOrigins", + type: { + name: "String" + } + }, + allowedMethods: { + serializedName: "allowedMethods", + type: { + name: "String" + } + }, + allowedHeaders: { + serializedName: "allowedHeaders", + type: { + name: "String" + } + }, + exposedHeaders: { + serializedName: "exposedHeaders", + type: { + name: "String" + } + }, + maxAgeInSeconds: { + serializedName: "maxAgeInSeconds", + constraints: { + InclusiveMaximum: 2147483647, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + } + } + } +}; + export const ARMResourceProperties: msRest.CompositeMapper = { serializedName: "ARMResourceProperties", type: { @@ -592,6 +637,18 @@ export const DatabaseAccountGetResults: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsPolicy" + } + } + } } } } @@ -1062,6 +1119,12 @@ export const SqlContainerGetPropertiesResource: msRest.CompositeMapper = { className: "ConflictResolutionPolicy" } }, + analyticalStorageTtl: { + serializedName: "analyticalStorageTtl", + type: { + name: "Number" + } + }, _rid: { readOnly: true, serializedName: "_rid", @@ -2509,6 +2572,18 @@ export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsPolicy" + } + } + } } } } @@ -2658,6 +2733,18 @@ export const DatabaseAccountUpdateParameters: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsPolicy" + } + } + } } } } @@ -2960,6 +3047,12 @@ export const SqlContainerResource: msRest.CompositeMapper = { name: "Composite", className: "ConflictResolutionPolicy" } + }, + analyticalStorageTtl: { + serializedName: "analyticalStorageTtl", + type: { + name: "Number" + } } } } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts index 5a447e578304..891bde7252db 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts index 67b430bb0b35..30281fd37a99 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts @@ -34,6 +34,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts index 75eadc705194..124b903874eb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts index 982e3c4539fa..581b05750533 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts index c82b56d06e33..03d52a4ee24d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts index db653215827a..7856ac56e806 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts @@ -35,6 +35,7 @@ export { ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts index 7ab389e8b87b..1d0d92ad1cad 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts @@ -176,6 +176,32 @@ export class CassandraResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateCassandraKeyspaceToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateCassandraKeyspaceToAutoscale(resourceGroupName,accountName,keyspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateCassandraKeyspaceToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateCassandraKeyspaceToManualThroughput(resourceGroupName,accountName,keyspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Lists the Cassandra table under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -339,6 +365,34 @@ export class CassandraResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateCassandraTableToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateCassandraTableToAutoscale(resourceGroupName,accountName,keyspaceName,tableName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateCassandraTableToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateCassandraTableToManualThroughput(resourceGroupName,accountName,keyspaceName,tableName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Create or update an Azure Cosmos DB Cassandra keyspace * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -405,6 +459,46 @@ export class CassandraResources { options); } + /** + * Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateCassandraKeyspaceToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + options + }, + beginMigrateCassandraKeyspaceToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateCassandraKeyspaceToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + options + }, + beginMigrateCassandraKeyspaceToManualThroughputOperationSpec, + options); + } + /** * Create or update an Azure Cosmos DB Cassandra Table * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -476,6 +570,50 @@ export class CassandraResources { beginUpdateCassandraTableThroughputOperationSpec, options); } + + /** + * Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateCassandraTableToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + tableName, + options + }, + beginMigrateCassandraTableToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateCassandraTableToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + keyspaceName, + tableName, + options + }, + beginMigrateCassandraTableToManualThroughputOperationSpec, + options); + } } // Operation Specifications @@ -730,6 +868,60 @@ const beginUpdateCassandraKeyspaceThroughputOperationSpec: msRest.OperationSpec serializer }; +const beginMigrateCassandraKeyspaceToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateCassandraKeyspaceToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateUpdateCassandraTableOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}", @@ -825,3 +1017,59 @@ const beginUpdateCassandraTableThroughputOperationSpec: msRest.OperationSpec = { }, serializer }; + +const beginMigrateCassandraTableToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateCassandraTableToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts index 67516cd31809..9a59a1044f14 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/databaseAccounts.ts @@ -631,7 +631,6 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.DatabaseAccountGetResults }, - 404: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts index 7b2f57d67e7a..3ddcd62ef302 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts @@ -176,6 +176,32 @@ export class GremlinResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateGremlinDatabaseToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateGremlinDatabaseToAutoscale(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateGremlinDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateGremlinDatabaseToManualThroughput(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Lists the Gremlin graph under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -339,6 +365,34 @@ export class GremlinResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateGremlinGraphToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateGremlinGraphToAutoscale(resourceGroupName,accountName,databaseName,graphName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateGremlinGraphToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateGremlinGraphToManualThroughput(resourceGroupName,accountName,databaseName,graphName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Create or update an Azure Cosmos DB Gremlin database * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -405,6 +459,46 @@ export class GremlinResources { options); } + /** + * Migrate an Azure Cosmos DB Gremlin database from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateGremlinDatabaseToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginMigrateGremlinDatabaseToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB Gremlin database from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateGremlinDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginMigrateGremlinDatabaseToManualThroughputOperationSpec, + options); + } + /** * Create or update an Azure Cosmos DB Gremlin graph * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -476,6 +570,50 @@ export class GremlinResources { beginUpdateGremlinGraphThroughputOperationSpec, options); } + + /** + * Migrate an Azure Cosmos DB Gremlin graph from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateGremlinGraphToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + graphName, + options + }, + beginMigrateGremlinGraphToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB Gremlin graph from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateGremlinGraphToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + graphName, + options + }, + beginMigrateGremlinGraphToManualThroughputOperationSpec, + options); + } } // Operation Specifications @@ -730,6 +868,60 @@ const beginUpdateGremlinDatabaseThroughputOperationSpec: msRest.OperationSpec = serializer }; +const beginMigrateGremlinDatabaseToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateGremlinDatabaseToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateUpdateGremlinGraphOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}", @@ -825,3 +1017,59 @@ const beginUpdateGremlinGraphThroughputOperationSpec: msRest.OperationSpec = { }, serializer }; + +const beginMigrateGremlinGraphToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.graphName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateGremlinGraphToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.graphName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts index b0ad885dacde..2f14b65c840e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -176,6 +176,32 @@ export class MongoDBResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateMongoDBDatabaseToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateMongoDBDatabaseToAutoscale(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateMongoDBDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateMongoDBDatabaseToManualThroughput(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Lists the MongoDB collection under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -339,6 +365,34 @@ export class MongoDBResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateMongoDBCollectionToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateMongoDBCollectionToAutoscale(resourceGroupName,accountName,databaseName,collectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateMongoDBCollectionToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateMongoDBCollectionToManualThroughput(resourceGroupName,accountName,databaseName,collectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Create or updates Azure Cosmos DB MongoDB database * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -405,6 +459,46 @@ export class MongoDBResources { options); } + /** + * Migrate an Azure Cosmos DB MongoDB database from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateMongoDBDatabaseToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginMigrateMongoDBDatabaseToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateMongoDBDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginMigrateMongoDBDatabaseToManualThroughputOperationSpec, + options); + } + /** * Create or update an Azure Cosmos DB MongoDB Collection * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -476,6 +570,50 @@ export class MongoDBResources { beginUpdateMongoDBCollectionThroughputOperationSpec, options); } + + /** + * Migrate an Azure Cosmos DB MongoDB collection from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateMongoDBCollectionToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + collectionName, + options + }, + beginMigrateMongoDBCollectionToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB MongoDB collection from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateMongoDBCollectionToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + collectionName, + options + }, + beginMigrateMongoDBCollectionToManualThroughputOperationSpec, + options); + } } // Operation Specifications @@ -730,6 +868,60 @@ const beginUpdateMongoDBDatabaseThroughputOperationSpec: msRest.OperationSpec = serializer }; +const beginMigrateMongoDBDatabaseToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateMongoDBDatabaseToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateUpdateMongoDBCollectionOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}", @@ -825,3 +1017,59 @@ const beginUpdateMongoDBCollectionThroughputOperationSpec: msRest.OperationSpec }, serializer }; + +const beginMigrateMongoDBCollectionToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateMongoDBCollectionToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts index 6f9978440405..3392930254a7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts @@ -174,6 +174,32 @@ export class SqlResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateSqlDatabaseToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateSqlDatabaseToAutoscale(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateSqlDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateSqlDatabaseToManualThroughput(resourceGroupName,accountName,databaseName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -336,6 +362,34 @@ export class SqlResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateSqlContainerToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateSqlContainerToAutoscale(resourceGroupName,accountName,databaseName,containerName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateSqlContainerToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateSqlContainerToManualThroughput(resourceGroupName,accountName,databaseName,containerName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -748,6 +802,46 @@ export class SqlResources { options); } + /** + * Migrate an Azure Cosmos DB SQL database from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateSqlDatabaseToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginMigrateSqlDatabaseToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB SQL database from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateSqlDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + options + }, + beginMigrateSqlDatabaseToManualThroughputOperationSpec, + options); + } + /** * Create or update an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -820,6 +914,50 @@ export class SqlResources { options); } + /** + * Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateSqlContainerToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + containerName, + options + }, + beginMigrateSqlContainerToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateSqlContainerToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + containerName, + options + }, + beginMigrateSqlContainerToManualThroughputOperationSpec, + options); + } + /** * Create or update an Azure Cosmos DB SQL storedProcedure * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1390,6 +1528,60 @@ const beginUpdateSqlDatabaseThroughputOperationSpec: msRest.OperationSpec = { serializer }; +const beginMigrateSqlDatabaseToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateSqlDatabaseToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateUpdateSqlContainerOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", @@ -1486,6 +1678,62 @@ const beginUpdateSqlContainerThroughputOperationSpec: msRest.OperationSpec = { serializer }; +const beginMigrateSqlContainerToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateSqlContainerToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const beginCreateUpdateSqlStoredProcedureOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts index a23fc4eb04ac..a94d2af9ed93 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts @@ -174,6 +174,32 @@ export class TableResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Migrate an Azure Cosmos DB Table from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateTableToAutoscale(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateTableToAutoscale(resourceGroupName,accountName,tableName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Migrate an Azure Cosmos DB Table from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + migrateTableToManualThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginMigrateTableToManualThroughput(resourceGroupName,accountName,tableName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Create or update an Azure Cosmos DB Table * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -238,6 +264,46 @@ export class TableResources { beginUpdateTableThroughputOperationSpec, options); } + + /** + * Migrate an Azure Cosmos DB Table from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateTableToAutoscale(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + beginMigrateTableToAutoscaleOperationSpec, + options); + } + + /** + * Migrate an Azure Cosmos DB Table from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param [options] The optional parameters + * @returns Promise + */ + beginMigrateTableToManualThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + tableName, + options + }, + beginMigrateTableToManualThroughputOperationSpec, + options); + } } // Operation Specifications @@ -411,3 +477,57 @@ const beginUpdateTableThroughputOperationSpec: msRest.OperationSpec = { }, serializer }; + +const beginMigrateTableToAutoscaleOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginMigrateTableToManualThroughputOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};