From d67a88485a920d382e8dd4e3457fd070b27ddbfc Mon Sep 17 00:00:00 2001 From: colawwj <70128817+colawwj@users.noreply.github.com> Date: Wed, 27 Oct 2021 16:40:30 +0800 Subject: [PATCH] cosmosdb-track1 (#18390) --- sdk/cosmosdb/arm-cosmosdb/package.json | 2 +- .../src/cosmosDBManagementClient.ts | 6 + .../src/cosmosDBManagementClientContext.ts | 6 +- .../src/models/cassandraClustersMappers.ts | 153 +++ .../src/models/cassandraDataCentersMappers.ts | 146 +++ .../src/models/cassandraResourcesMappers.ts | 11 + .../src/models/databaseAccountsMappers.ts | 11 + .../src/models/gremlinResourcesMappers.ts | 11 + sdk/cosmosdb/arm-cosmosdb/src/models/index.ts | 971 +++++++++++++- .../src/models/locationsMappers.ts | 146 +++ .../arm-cosmosdb/src/models/mappers.ts | 1157 +++++++++++++++-- .../src/models/mongoDBResourcesMappers.ts | 14 + .../src/models/notebookWorkspacesMappers.ts | 11 + .../arm-cosmosdb/src/models/parameters.ts | 30 + .../privateEndpointConnectionsMappers.ts | 11 + .../src/models/privateLinkResourcesMappers.ts | 11 + .../src/models/sqlResourcesMappers.ts | 11 + .../src/models/tableResourcesMappers.ts | 11 + .../src/operations/cassandraClusters.ts | 614 +++++++++ .../src/operations/cassandraDataCenters.ts | 353 +++++ .../arm-cosmosdb/src/operations/index.ts | 3 + .../arm-cosmosdb/src/operations/locations.ts | 128 ++ .../src/operations/mongoDBResources.ts | 74 ++ 23 files changed, 3753 insertions(+), 138 deletions(-) create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/models/cassandraClustersMappers.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/models/cassandraDataCentersMappers.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/models/locationsMappers.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index ce8cbe76557e..3000a3f1650f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -2,7 +2,7 @@ "name": "@azure/arm-cosmosdb", "author": "Microsoft Corporation", "description": "CosmosDBManagementClient Library with typescript type definitions for node.js and browser.", - "version": "14.1.1", + "version": "14.2.0", "dependencies": { "@azure/ms-rest-azure-js": "^2.1.0", "@azure/ms-rest-js": "^2.2.0", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index bb1862208b62..360d4ee291ce 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -35,6 +35,7 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext { tableResources: operations.TableResources; cassandraResources: operations.CassandraResources; gremlinResources: operations.GremlinResources; + locations: operations.Locations; notebookWorkspaces: operations.NotebookWorkspaces; privateEndpointConnections: operations.PrivateEndpointConnections; privateLinkResources: operations.PrivateLinkResources; @@ -45,6 +46,8 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext { restorableMongodbDatabases: operations.RestorableMongodbDatabases; restorableMongodbCollections: operations.RestorableMongodbCollections; restorableMongodbResources: operations.RestorableMongodbResources; + cassandraClusters: operations.CassandraClusters; + cassandraDataCenters: operations.CassandraDataCenters; /** * Initializes a new instance of the CosmosDBManagementClient class. @@ -77,6 +80,7 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext { this.tableResources = new operations.TableResources(this); this.cassandraResources = new operations.CassandraResources(this); this.gremlinResources = new operations.GremlinResources(this); + this.locations = new operations.Locations(this); this.notebookWorkspaces = new operations.NotebookWorkspaces(this); this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.privateLinkResources = new operations.PrivateLinkResources(this); @@ -87,6 +91,8 @@ class CosmosDBManagementClient extends CosmosDBManagementClientContext { this.restorableMongodbDatabases = new operations.RestorableMongodbDatabases(this); this.restorableMongodbCollections = new operations.RestorableMongodbCollections(this); this.restorableMongodbResources = new operations.RestorableMongodbResources(this); + this.cassandraClusters = new operations.CassandraClusters(this); + this.cassandraDataCenters = new operations.CassandraDataCenters(this); } } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts index fe8294ec51b3..44054a6ee1c6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClientContext.ts @@ -13,12 +13,12 @@ import * as msRestAzure from "@azure/ms-rest-azure-js"; import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-cosmosdb"; -const packageVersion = "14.1.1"; +const packageVersion = "14.2.0"; export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials | TokenCredential; - apiVersion?: string; subscriptionId: string; + apiVersion?: string; /** * Initializes a new instance of the CosmosDBManagementClient class. @@ -49,7 +49,7 @@ export class CosmosDBManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2021-06-15'; + this.apiVersion = '2021-10-15'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraClustersMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraClustersMappers.ts new file mode 100644 index 000000000000..7a11d7aac03f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraClustersMappers.ts @@ -0,0 +1,153 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AnalyticalStorageConfiguration, + ApiProperties, + ARMProxyResource, + ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, + AutoUpgradePolicyResource, + AzureEntityResource, + BackupPolicy, + BackupPolicyMigrationState, + BaseResource, + Capability, + Capacity, + CassandraClusterPublicStatus, + CassandraClusterPublicStatusDataCentersItem, + CassandraClusterPublicStatusDataCentersItemNodesItem, + CassandraKeyspaceCreateUpdateParameters, + CassandraKeyspaceGetPropertiesOptions, + CassandraKeyspaceGetPropertiesResource, + CassandraKeyspaceGetResults, + CassandraKeyspaceResource, + CassandraPartitionKey, + CassandraSchema, + CassandraTableCreateUpdateParameters, + CassandraTableGetPropertiesOptions, + CassandraTableGetPropertiesResource, + CassandraTableGetResults, + CassandraTableResource, + Certificate, + CloudError, + ClusterKey, + ClusterResource, + ClusterResourceProperties, + Column, + CommandOutput, + CommandPostBody, + CompositePath, + ConflictResolutionPolicy, + ConnectionError, + ConsistencyPolicy, + ContainerPartitionKey, + ContinuousModeBackupPolicy, + CorsPolicy, + CreateUpdateOptions, + DatabaseAccountCreateUpdateParameters, + DatabaseAccountGetResults, + DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, + ErrorResponse, + ExcludedPath, + FailoverPolicy, + GremlinDatabaseCreateUpdateParameters, + GremlinDatabaseGetPropertiesOptions, + GremlinDatabaseGetPropertiesResource, + GremlinDatabaseGetResults, + GremlinDatabaseResource, + GremlinGraphCreateUpdateParameters, + GremlinGraphGetPropertiesOptions, + GremlinGraphGetPropertiesResource, + GremlinGraphGetResults, + GremlinGraphResource, + IncludedPath, + Indexes, + IndexingPolicy, + IpAddressOrRange, + ListClusters, + Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, + ManagedCassandraReaperStatus, + ManagedServiceIdentity, + ManagedServiceIdentityUserAssignedIdentitiesValue, + MongoDBCollectionCreateUpdateParameters, + MongoDBCollectionGetPropertiesOptions, + MongoDBCollectionGetPropertiesResource, + MongoDBCollectionGetResults, + MongoDBCollectionResource, + MongoDBDatabaseCreateUpdateParameters, + MongoDBDatabaseGetPropertiesOptions, + MongoDBDatabaseGetPropertiesResource, + MongoDBDatabaseGetResults, + MongoDBDatabaseResource, + MongoIndex, + MongoIndexKeys, + MongoIndexOptions, + NotebookWorkspace, + NotebookWorkspaceCreateUpdateParameters, + OptionsResource, + PeriodicModeBackupPolicy, + PeriodicModeProperties, + Permission, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + RestoreParameters, + SeedNode, + SpatialSpec, + SqlContainerCreateUpdateParameters, + SqlContainerGetPropertiesOptions, + SqlContainerGetPropertiesResource, + SqlContainerGetResults, + SqlContainerResource, + SqlDatabaseCreateUpdateParameters, + SqlDatabaseGetPropertiesOptions, + SqlDatabaseGetPropertiesResource, + SqlDatabaseGetResults, + SqlDatabaseResource, + SqlRoleAssignmentGetResults, + SqlRoleDefinitionGetResults, + SqlStoredProcedureCreateUpdateParameters, + SqlStoredProcedureGetPropertiesResource, + SqlStoredProcedureGetResults, + SqlStoredProcedureResource, + SqlTriggerCreateUpdateParameters, + SqlTriggerGetPropertiesResource, + SqlTriggerGetResults, + SqlTriggerResource, + SqlUserDefinedFunctionCreateUpdateParameters, + SqlUserDefinedFunctionGetPropertiesResource, + SqlUserDefinedFunctionGetResults, + SqlUserDefinedFunctionResource, + SystemData, + TableCreateUpdateParameters, + TableGetPropertiesOptions, + TableGetPropertiesResource, + TableGetResults, + TableResource, + ThroughputPolicyResource, + ThroughputSettingsGetPropertiesResource, + ThroughputSettingsGetResults, + ThroughputSettingsResource, + ThroughputSettingsUpdateParameters, + TrackedResource, + UniqueKey, + UniqueKeyPolicy, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraDataCentersMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraDataCentersMappers.ts new file mode 100644 index 000000000000..cf70312269b1 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraDataCentersMappers.ts @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AnalyticalStorageConfiguration, + ApiProperties, + ARMProxyResource, + ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, + AutoUpgradePolicyResource, + AzureEntityResource, + BackupPolicy, + BackupPolicyMigrationState, + BaseResource, + Capability, + Capacity, + CassandraKeyspaceCreateUpdateParameters, + CassandraKeyspaceGetPropertiesOptions, + CassandraKeyspaceGetPropertiesResource, + CassandraKeyspaceGetResults, + CassandraKeyspaceResource, + CassandraPartitionKey, + CassandraSchema, + CassandraTableCreateUpdateParameters, + CassandraTableGetPropertiesOptions, + CassandraTableGetPropertiesResource, + CassandraTableGetResults, + CassandraTableResource, + Certificate, + CloudError, + ClusterKey, + ClusterResource, + ClusterResourceProperties, + Column, + CompositePath, + ConflictResolutionPolicy, + ConsistencyPolicy, + ContainerPartitionKey, + ContinuousModeBackupPolicy, + CorsPolicy, + CreateUpdateOptions, + DatabaseAccountCreateUpdateParameters, + DatabaseAccountGetResults, + DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, + ErrorResponse, + ExcludedPath, + FailoverPolicy, + GremlinDatabaseCreateUpdateParameters, + GremlinDatabaseGetPropertiesOptions, + GremlinDatabaseGetPropertiesResource, + GremlinDatabaseGetResults, + GremlinDatabaseResource, + GremlinGraphCreateUpdateParameters, + GremlinGraphGetPropertiesOptions, + GremlinGraphGetPropertiesResource, + GremlinGraphGetResults, + GremlinGraphResource, + IncludedPath, + Indexes, + IndexingPolicy, + IpAddressOrRange, + ListDataCenters, + Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, + ManagedServiceIdentity, + ManagedServiceIdentityUserAssignedIdentitiesValue, + MongoDBCollectionCreateUpdateParameters, + MongoDBCollectionGetPropertiesOptions, + MongoDBCollectionGetPropertiesResource, + MongoDBCollectionGetResults, + MongoDBCollectionResource, + MongoDBDatabaseCreateUpdateParameters, + MongoDBDatabaseGetPropertiesOptions, + MongoDBDatabaseGetPropertiesResource, + MongoDBDatabaseGetResults, + MongoDBDatabaseResource, + MongoIndex, + MongoIndexKeys, + MongoIndexOptions, + NotebookWorkspace, + NotebookWorkspaceCreateUpdateParameters, + OptionsResource, + PeriodicModeBackupPolicy, + PeriodicModeProperties, + Permission, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + RestoreParameters, + SeedNode, + SpatialSpec, + SqlContainerCreateUpdateParameters, + SqlContainerGetPropertiesOptions, + SqlContainerGetPropertiesResource, + SqlContainerGetResults, + SqlContainerResource, + SqlDatabaseCreateUpdateParameters, + SqlDatabaseGetPropertiesOptions, + SqlDatabaseGetPropertiesResource, + SqlDatabaseGetResults, + SqlDatabaseResource, + SqlRoleAssignmentGetResults, + SqlRoleDefinitionGetResults, + SqlStoredProcedureCreateUpdateParameters, + SqlStoredProcedureGetPropertiesResource, + SqlStoredProcedureGetResults, + SqlStoredProcedureResource, + SqlTriggerCreateUpdateParameters, + SqlTriggerGetPropertiesResource, + SqlTriggerGetResults, + SqlTriggerResource, + SqlUserDefinedFunctionCreateUpdateParameters, + SqlUserDefinedFunctionGetPropertiesResource, + SqlUserDefinedFunctionGetResults, + SqlUserDefinedFunctionResource, + SystemData, + TableCreateUpdateParameters, + TableGetPropertiesOptions, + TableGetPropertiesResource, + TableGetResults, + TableResource, + ThroughputPolicyResource, + ThroughputSettingsGetPropertiesResource, + ThroughputSettingsGetResults, + ThroughputSettingsResource, + ThroughputSettingsUpdateParameters, + TrackedResource, + UniqueKey, + UniqueKeyPolicy, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts index 74398ce35f03..3078bc43475c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/cassandraResourcesMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -34,8 +35,11 @@ export { CassandraTableGetResults, CassandraTableListResult, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -47,6 +51,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ExcludedPath, FailoverPolicy, GremlinDatabaseCreateUpdateParameters, @@ -64,6 +70,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -92,6 +102,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts index daf8a890c4d4..1ae66cd6e36f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/databaseAccountsMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,8 +33,11 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -52,6 +56,8 @@ export { DatabaseAccountsListResult, DatabaseAccountUpdateParameters, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ErrorResponse, ExcludedPath, FailoverPolicies, @@ -71,6 +77,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, Metric, @@ -110,6 +120,7 @@ export { RegionForOnlineOffline, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts index c950ad92168e..790b1f5a1d04 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/gremlinResourcesMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,8 +33,11 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -45,6 +49,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ExcludedPath, FailoverPolicy, GremlinDatabaseCreateUpdateParameters, @@ -64,6 +70,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -92,6 +102,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 957f3666b2df..0acbfea0ff7d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -383,6 +383,18 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +/** + * The object that represents all properties related to capacity enforcement on an account. + */ +export interface Capacity { + /** + * The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a + * strict limit of max throughput that can be provisioned on that account to be 2000. A + * totalThroughputLimit of -1 indicates no limits on provisioning of throughput. + */ + totalThroughputLimit?: number; +} + /** * Metadata pertaining to creation and last modification of the resource. */ @@ -600,6 +612,10 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { * authentication. */ disableLocalAuth?: boolean; + /** + * The object that represents all properties related to capacity enforcement on an account. + */ + capacity?: Capacity; /** * The system meta data relating to this resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1746,6 +1762,10 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper * Parameters to indicate the information about the restore. */ restoreParameters?: RestoreParameters; + /** + * The object that represents all properties related to capacity enforcement on an account. + */ + capacity?: Capacity; } /** @@ -1859,6 +1879,10 @@ export interface DatabaseAccountUpdateParameters { * authentication. */ disableLocalAuth?: boolean; + /** + * The object that represents all properties related to capacity enforcement on an account. + */ + capacity?: Capacity; } /** @@ -2711,6 +2735,10 @@ export interface PeriodicModeProperties { * An integer representing the time (in hours) that each backup is retained */ backupRetentionIntervalInHours?: number; + /** + * Enum to indicate type of backup residency. Possible values include: 'Geo', 'Local', 'Zone' + */ + backupStorageRedundancy?: BackupStorageRedundancy; } /** @@ -2745,6 +2773,37 @@ export interface ContinuousModeBackupPolicy { migrationState?: BackupPolicyMigrationState; } +/** + * Cosmos DB location metadata + */ +export interface LocationProperties { + /** + * Flag indicating whether the location supports availability zones or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly supportsAvailabilityZone?: boolean; + /** + * Flag indicating whether the location is residency sensitive. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isResidencyRestricted?: boolean; + /** + * The properties of available backup storage redundancies. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly backupStorageRedundancies?: BackupStorageRedundancy[]; +} + +/** + * Cosmos DB location get result + */ +export interface LocationGetResult extends ARMProxyResource { + /** + * Cosmos DB location metadata + */ + properties?: LocationProperties; +} + /** * The resource model definition for an Azure Resource Manager tracked top level resource which has * 'tags' and a 'location' @@ -3380,6 +3439,432 @@ export interface BackupInformation { continuousBackupInformation?: ContinuousBackupInformation; } +/** + * An interface representing SeedNode. + */ +export interface SeedNode { + /** + * IP address of this seed node. + */ + ipAddress?: string; +} + +/** + * An interface representing Certificate. + */ +export interface Certificate { + /** + * PEM formatted public key. + */ + pem?: string; +} + +/** + * Properties of a managed Cassandra cluster. + */ +export interface ClusterResourceProperties { + /** + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + */ + provisioningState?: ManagedCassandraProvisioningState; + /** + * To create an empty cluster, omit this field or set it to null. To restore a backup into a new + * cluster, set this field to the resource id of the backup. + */ + restoreFromBackupId?: string; + /** + * Resource id of a subnet that this cluster's management service should have its network + * interface attached to. The subnet must be routable to all subnets that will be delegated to + * data centers. The resource id must be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/' + */ + delegatedManagementSubnetId?: string; + /** + * Which version of Cassandra should this cluster converge to running (e.g., 3.11). When updated, + * the cluster may take some time to migrate to the new version. + */ + cassandraVersion?: string; + /** + * If you need to set the clusterName property in cassandra.yaml to something besides the + * resource name of the cluster, set the value to use on this property. + */ + clusterNameOverride?: string; + /** + * Which authentication method Cassandra should use to authenticate clients. 'None' turns off + * authentication, so should not be used except in emergencies. 'Cassandra' is the default + * password based authentication. The default is 'Cassandra'. Possible values include: 'None', + * 'Cassandra' + */ + authenticationMethod?: AuthenticationMethod; + /** + * Initial password for clients connecting as admin to the cluster. Should be changed after + * cluster creation. Returns null on GET. This field only applies when the authenticationMethod + * field is 'Cassandra'. + */ + initialCassandraAdminPassword?: string; + /** + * Hostname or IP address where the Prometheus endpoint containing data about the managed + * Cassandra nodes can be reached. + */ + prometheusEndpoint?: SeedNode; + /** + * Should automatic repairs run on this cluster? If omitted, this is true, and should stay true + * unless you are running a hybrid cluster where you are already doing your own repairs. + */ + repairEnabled?: boolean; + /** + * List of TLS certificates used to authorize clients connecting to the cluster. All connections + * are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, + * the managed Cassandra cluster will reject all connections not bearing a TLS client certificate + * that can be validated from one or more of the public certificates in this property. + */ + clientCertificates?: Certificate[]; + /** + * List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS + * certificates of all nodes in unmanaged data centers must be verifiable using one of the + * certificates provided in this property. + */ + externalGossipCertificates?: Certificate[]; + /** + * List of TLS certificates that unmanaged nodes must trust for gossip with managed nodes. All + * managed nodes will present TLS client certificates that are verifiable using one of the + * certificates provided in this property. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly gossipCertificates?: Certificate[]; + /** + * List of IP addresses of seed nodes in unmanaged data centers. These will be added to the seed + * node lists of all managed nodes. + */ + externalSeedNodes?: SeedNode[]; + /** + * List of IP addresses of seed nodes in the managed data centers. These should be added to the + * seed node lists of all unmanaged nodes. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly seedNodes?: SeedNode[]; + /** + * Number of hours to wait between taking a backup of the cluster. To disable backups, set this + * property to 0. + */ + hoursBetweenBackups?: number; + /** + * Whether the cluster and associated data centers has been deallocated. + */ + deallocated?: boolean; + /** + * Whether Cassandra audit logging is enabled + */ + cassandraAuditLoggingEnabled?: boolean; +} + +/** + * The core properties of ARM resources. + */ +export interface ManagedCassandraARMResourceProperties extends BaseResource { + /** + * The unique resource identifier of the ARM resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the ARM resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of Azure resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The location of the resource group to which the resource belongs. + */ + location?: string; + tags?: { [propertyName: string]: string }; + identity?: ManagedCassandraManagedServiceIdentity; +} + +/** + * Representation of a managed Cassandra cluster. + */ +export interface ClusterResource extends ManagedCassandraARMResourceProperties { + /** + * Properties of a managed Cassandra cluster. + */ + properties?: ClusterResourceProperties; +} + +/** + * Identity for the resource. + */ +export interface ManagedCassandraManagedServiceIdentity { + /** + * The object id of the identity resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant id of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The type of the resource. Possible values include: 'SystemAssigned', 'None' + */ + type?: ManagedCassandraResourceIdentityType; +} + +/** + * An interface representing ManagedCassandraReaperStatus. + */ +export interface ManagedCassandraReaperStatus { + healthy?: boolean; + repairRunIds?: { [propertyName: string]: string }; + repairSchedules?: { [propertyName: string]: string }; +} + +/** + * An interface representing ConnectionError. + */ +export interface ConnectionError { + /** + * The kind of connection error that occurred. Possible values include: 'Unknown', 'OK', + * 'OperatorToDataCenterNetworkError', 'DatacenterToDatacenterNetworkError', + * 'InternalOperatorToDataCenterCertificateError', 'InternalError' + */ + connectionState?: ConnectionState; + /** + * The IP of host that originated the failed connection. + */ + iPFrom?: string; + /** + * The IP that the connection attempted to reach. + */ + iPTo?: string; + /** + * The TCP port the connection was attempted on. + */ + port?: number; + /** + * Detailed error message about the failed connection. + */ + exception?: string; +} + +/** + * An interface representing CassandraClusterPublicStatusDataCentersItemNodesItem. + */ +export interface CassandraClusterPublicStatusDataCentersItemNodesItem { + /** + * The node's IP address. + */ + address?: string; + /** + * Possible values include: 'Normal', 'Leaving', 'Joining', 'Moving', 'Stopped' + */ + state?: NodeState; + status?: string; + /** + * The amount of file system data in the data directory (e.g., 47.66 kB), excluding all content + * in the snapshots subdirectories. Because all SSTable data files are included, any data that is + * not cleaned up (such as TTL-expired cells or tombstones) is counted. + */ + load?: string; + /** + * List of tokens this node covers. + */ + tokens?: string[]; + size?: number; + /** + * The network ID of the node. + */ + hostID?: string; + /** + * The rack this node is part of. + */ + rack?: string; + /** + * The timestamp when these statistics were captured. + */ + timestamp?: string; + /** + * The amount of disk used, in kB, of the directory /var/lib/cassandra. + */ + diskUsedKB?: number; + /** + * The amount of disk free, in kB, of the directory /var/lib/cassandra. + */ + diskFreeKB?: number; + /** + * Used memory (calculated as total - free - buffers - cache), in kB. + */ + memoryUsedKB?: number; + /** + * Memory used by kernel buffers (Buffers in /proc/meminfo) and page cache and slabs (Cached and + * SReclaimable in /proc/meminfo), in kB. + */ + memoryBuffersAndCachedKB?: number; + /** + * Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + */ + memoryFreeKB?: number; + /** + * Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in kB. + */ + memoryTotalKB?: number; + /** + * A float representing the current system-wide CPU utilization as a percentage. + */ + cpuUsage?: number; +} + +/** + * An interface representing CassandraClusterPublicStatusDataCentersItem. + */ +export interface CassandraClusterPublicStatusDataCentersItem { + /** + * The name of this Datacenter. + */ + name?: string; + /** + * A list of all seed nodes in the cluster, managed and unmanaged. + */ + seedNodes?: string[]; + nodes?: CassandraClusterPublicStatusDataCentersItemNodesItem[]; +} + +/** + * Properties of a managed Cassandra cluster public status. + */ +export interface CassandraClusterPublicStatus { + eTag?: string; + reaperStatus?: ManagedCassandraReaperStatus; + /** + * List relevant information about any connection errors to the Datacenters. + */ + connectionErrors?: ConnectionError[]; + /** + * List of the status of each datacenter in this cluster. + */ + dataCenters?: CassandraClusterPublicStatusDataCentersItem[]; +} + +/** + * Specification of which command to run where + */ +export interface CommandPostBody { + /** + * The command which should be run + */ + command: string; + /** + * The arguments for the command to be run + */ + argumentsProperty?: { [propertyName: string]: string }; + /** + * IP address of the cassandra host to run the command on + */ + host: string; + /** + * If true, stops cassandra before executing the command and then start it again + */ + cassandraStopStart?: boolean; + /** + * If true, allows the command to *write* to the cassandra directory, otherwise read-only. + */ + readwrite?: boolean; +} + +/** + * Response of /command api + */ +export interface CommandOutput { + /** + * Output of the command. + */ + commandOutput?: string; +} + +/** + * Properties of a managed Cassandra data center. + */ +export interface DataCenterResourceProperties { + /** + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + */ + provisioningState?: ManagedCassandraProvisioningState; + /** + * The region this data center should be created in. + */ + dataCenterLocation?: string; + /** + * Resource id of a subnet the nodes in this data center should have their network interfaces + * connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must + * be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' + * property. This resource id will be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'. + */ + delegatedSubnetId?: string; + /** + * The number of nodes the data center should have. This is the desired number. After it is set, + * it may take some time for the data center to be scaled to match. To monitor the number of + * nodes and their status, use the fetchNodeStatus method on the cluster. + */ + nodeCount?: number; + /** + * IP addresses for seed nodes in this data center. This is for reference. Generally you will + * want to use the seedNodes property on the cluster, which aggregates the seed nodes from all + * data centers in the cluster. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly seedNodes?: SeedNode[]; + /** + * A fragment of a cassandra.yaml configuration file to be included in the cassandra.yaml for all + * nodes in this data center. The fragment should be Base64 encoded, and only a subset of keys + * are allowed. + */ + base64EncodedCassandraYamlFragment?: string; + /** + * Key uri to use for encryption of managed disks. Ensure the system assigned identity of the + * cluster has been assigned appropriate permissions(key get/wrap/unwrap permissions) on the key. + */ + managedDiskCustomerKeyUri?: string; + /** + * Indicates the Key Uri of the customer key to use for encryption of the backup storage account. + */ + backupStorageCustomerKeyUri?: string; + /** + * Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2 + */ + sku?: string; + /** + * Disk SKU used for data centers. Default value is P30. + */ + diskSku?: string; + /** + * Number of disk used for data centers. Default value is 4. + */ + diskCapacity?: number; + /** + * If the azure data center has Availability Zone support, apply it to the Virtual Machine + * ScaleSet that host the cassandra data center virtual machines. + */ + availabilityZone?: boolean; +} + +/** + * A managed Cassandra data center. + */ +export interface DataCenterResource extends ARMProxyResource { + /** + * Properties of a managed Cassandra data center. + */ + properties?: DataCenterResourceProperties; +} + /** * Optional Parameters. */ @@ -3670,8 +4155,16 @@ export interface GremlinGraphListResult extends Array { /** * @interface - * A list of notebook workspace resources - * @extends Array + * The List operation response, that contains Cosmos DB locations and their properties. + * @extends Array + */ +export interface LocationListResult extends Array { +} + +/** + * @interface + * A list of notebook workspace resources + * @extends Array */ export interface NotebookWorkspaceListResult extends Array { } @@ -3749,6 +4242,22 @@ export interface RestorableMongodbCollectionsListResult extends Array { } +/** + * @interface + * List of managed Cassandra clusters. + * @extends Array + */ +export interface ListClusters extends Array { +} + +/** + * @interface + * List of managed Cassandra data centers and their properties. + * @extends Array + */ +export interface ListDataCenters extends Array { +} + /** * Defines values for DatabaseAccountKind. * Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse' @@ -3958,6 +4467,14 @@ export type UnitType = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'CountPerSeco */ export type PrimaryAggregationType = 'None' | 'Average' | 'Total' | 'Minimum' | 'Maximum' | 'Last'; +/** + * Defines values for BackupStorageRedundancy. + * Possible values include: 'Geo', 'Local', 'Zone' + * @readonly + * @enum {string} + */ +export type BackupStorageRedundancy = 'Geo' | 'Local' | 'Zone'; + /** * Defines values for RoleDefinitionType. * Possible values include: 'BuiltInRole', 'CustomRole' @@ -3982,6 +4499,56 @@ export type ApiType = 'MongoDB' | 'Gremlin' | 'Cassandra' | 'Table' | 'Sql' | 'G */ export type OperationType = 'Create' | 'Replace' | 'Delete' | 'SystemOperation'; +/** + * Defines values for ManagedCassandraProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + * @readonly + * @enum {string} + */ +export type ManagedCassandraProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Failed' | 'Canceled'; + +/** + * Defines values for AuthenticationMethod. + * Possible values include: 'None', 'Cassandra' + * @readonly + * @enum {string} + */ +export type AuthenticationMethod = 'None' | 'Cassandra'; + +/** + * Defines values for ManagedCassandraResourceIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type ManagedCassandraResourceIdentityType = 'SystemAssigned' | 'None'; + +/** + * Defines values for NodeStatus. + * Possible values include: 'Up', 'Down' + * @readonly + * @enum {string} + */ +export type NodeStatus = 'Up' | 'Down'; + +/** + * Defines values for NodeState. + * Possible values include: 'Normal', 'Leaving', 'Joining', 'Moving', 'Stopped' + * @readonly + * @enum {string} + */ +export type NodeState = 'Normal' | 'Leaving' | 'Joining' | 'Moving' | 'Stopped'; + +/** + * Defines values for ConnectionState. + * Possible values include: 'Unknown', 'OK', 'OperatorToDataCenterNetworkError', + * 'DatacenterToDatacenterNetworkError', 'InternalOperatorToDataCenterCertificateError', + * 'InternalError' + * @readonly + * @enum {string} + */ +export type ConnectionState = 'Unknown' | 'OK' | 'OperatorToDataCenterNetworkError' | 'DatacenterToDatacenterNetworkError' | 'InternalOperatorToDataCenterCertificateError' | 'InternalError'; + /** * Contains response data for the get operation. */ @@ -5807,6 +6374,26 @@ export type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse = }; }; +/** + * Contains response data for the retrieveContinuousBackupInformation operation. + */ +export type MongoDBResourcesRetrieveContinuousBackupInformationResponse = BackupInformation & { + /** + * 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: BackupInformation; + }; +}; + /** * Contains response data for the beginCreateUpdateMongoDBDatabase operation. */ @@ -5967,6 +6554,26 @@ export type MongoDBResourcesBeginMigrateMongoDBCollectionToManualThroughputRespo }; }; +/** + * Contains response data for the beginRetrieveContinuousBackupInformation operation. + */ +export type MongoDBResourcesBeginRetrieveContinuousBackupInformationResponse = BackupInformation & { + /** + * 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: BackupInformation; + }; +}; + /** * Contains response data for the listTables operation. */ @@ -7067,6 +7674,46 @@ export type GremlinResourcesBeginMigrateGremlinGraphToManualThroughputResponse = }; }; +/** + * Contains response data for the list operation. + */ +export type LocationsListResponse = LocationListResult & { + /** + * 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: LocationListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LocationsGetResponse = LocationGetResult & { + /** + * 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: LocationGetResult; + }; +}; + /** * Contains response data for the listByDatabaseAccount operation. */ @@ -7466,3 +8113,323 @@ export type RestorableMongodbResourcesListResponse = RestorableMongodbResourcesL parsedBody: RestorableMongodbResourcesListResult; }; }; + +/** + * Contains response data for the listBySubscription operation. + */ +export type CassandraClustersListBySubscriptionResponse = ListClusters & { + /** + * 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: ListClusters; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type CassandraClustersListByResourceGroupResponse = ListClusters & { + /** + * 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: ListClusters; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CassandraClustersGetResponse = ClusterResource & { + /** + * 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: ClusterResource; + }; +}; + +/** + * Contains response data for the createUpdate operation. + */ +export type CassandraClustersCreateUpdateResponse = ClusterResource & { + /** + * 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: ClusterResource; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type CassandraClustersUpdateResponse = ClusterResource & { + /** + * 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: ClusterResource; + }; +}; + +/** + * Contains response data for the invokeCommand operation. + */ +export type CassandraClustersInvokeCommandResponse = CommandOutput & { + /** + * 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: CommandOutput; + }; +}; + +/** + * Contains response data for the status operation. + */ +export type CassandraClustersStatusResponse = CassandraClusterPublicStatus & { + /** + * 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: CassandraClusterPublicStatus; + }; +}; + +/** + * Contains response data for the beginCreateUpdate operation. + */ +export type CassandraClustersBeginCreateUpdateResponse = ClusterResource & { + /** + * 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: ClusterResource; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type CassandraClustersBeginUpdateResponse = ClusterResource & { + /** + * 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: ClusterResource; + }; +}; + +/** + * Contains response data for the beginInvokeCommand operation. + */ +export type CassandraClustersBeginInvokeCommandResponse = CommandOutput & { + /** + * 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: CommandOutput; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type CassandraDataCentersListResponse = ListDataCenters & { + /** + * 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: ListDataCenters; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CassandraDataCentersGetResponse = DataCenterResource & { + /** + * 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: DataCenterResource; + }; +}; + +/** + * Contains response data for the createUpdate operation. + */ +export type CassandraDataCentersCreateUpdateResponse = DataCenterResource & { + /** + * 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: DataCenterResource; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type CassandraDataCentersUpdateResponse = DataCenterResource & { + /** + * 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: DataCenterResource; + }; +}; + +/** + * Contains response data for the beginCreateUpdate operation. + */ +export type CassandraDataCentersBeginCreateUpdateResponse = DataCenterResource & { + /** + * 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: DataCenterResource; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type CassandraDataCentersBeginUpdateResponse = DataCenterResource & { + /** + * 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: DataCenterResource; + }; +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/locationsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/locationsMappers.ts new file mode 100644 index 000000000000..a2e63068dd44 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/locationsMappers.ts @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + AnalyticalStorageConfiguration, + ApiProperties, + ARMProxyResource, + ARMResourceProperties, + AutoscaleSettings, + AutoscaleSettingsResource, + AutoUpgradePolicyResource, + AzureEntityResource, + BackupPolicy, + BackupPolicyMigrationState, + BaseResource, + Capability, + Capacity, + CassandraKeyspaceCreateUpdateParameters, + CassandraKeyspaceGetPropertiesOptions, + CassandraKeyspaceGetPropertiesResource, + CassandraKeyspaceGetResults, + CassandraKeyspaceResource, + CassandraPartitionKey, + CassandraSchema, + CassandraTableCreateUpdateParameters, + CassandraTableGetPropertiesOptions, + CassandraTableGetPropertiesResource, + CassandraTableGetResults, + CassandraTableResource, + Certificate, + CloudError, + ClusterKey, + ClusterResource, + ClusterResourceProperties, + Column, + CompositePath, + ConflictResolutionPolicy, + ConsistencyPolicy, + ContainerPartitionKey, + ContinuousModeBackupPolicy, + CorsPolicy, + CreateUpdateOptions, + DatabaseAccountCreateUpdateParameters, + DatabaseAccountGetResults, + DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, + ErrorResponse, + ExcludedPath, + FailoverPolicy, + GremlinDatabaseCreateUpdateParameters, + GremlinDatabaseGetPropertiesOptions, + GremlinDatabaseGetPropertiesResource, + GremlinDatabaseGetResults, + GremlinDatabaseResource, + GremlinGraphCreateUpdateParameters, + GremlinGraphGetPropertiesOptions, + GremlinGraphGetPropertiesResource, + GremlinGraphGetResults, + GremlinGraphResource, + IncludedPath, + Indexes, + IndexingPolicy, + IpAddressOrRange, + Location, + LocationGetResult, + LocationListResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, + ManagedServiceIdentity, + ManagedServiceIdentityUserAssignedIdentitiesValue, + MongoDBCollectionCreateUpdateParameters, + MongoDBCollectionGetPropertiesOptions, + MongoDBCollectionGetPropertiesResource, + MongoDBCollectionGetResults, + MongoDBCollectionResource, + MongoDBDatabaseCreateUpdateParameters, + MongoDBDatabaseGetPropertiesOptions, + MongoDBDatabaseGetPropertiesResource, + MongoDBDatabaseGetResults, + MongoDBDatabaseResource, + MongoIndex, + MongoIndexKeys, + MongoIndexOptions, + NotebookWorkspace, + NotebookWorkspaceCreateUpdateParameters, + OptionsResource, + PeriodicModeBackupPolicy, + PeriodicModeProperties, + Permission, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + RestoreParameters, + SeedNode, + SpatialSpec, + SqlContainerCreateUpdateParameters, + SqlContainerGetPropertiesOptions, + SqlContainerGetPropertiesResource, + SqlContainerGetResults, + SqlContainerResource, + SqlDatabaseCreateUpdateParameters, + SqlDatabaseGetPropertiesOptions, + SqlDatabaseGetPropertiesResource, + SqlDatabaseGetResults, + SqlDatabaseResource, + SqlRoleAssignmentGetResults, + SqlRoleDefinitionGetResults, + SqlStoredProcedureCreateUpdateParameters, + SqlStoredProcedureGetPropertiesResource, + SqlStoredProcedureGetResults, + SqlStoredProcedureResource, + SqlTriggerCreateUpdateParameters, + SqlTriggerGetPropertiesResource, + SqlTriggerGetResults, + SqlTriggerResource, + SqlUserDefinedFunctionCreateUpdateParameters, + SqlUserDefinedFunctionGetPropertiesResource, + SqlUserDefinedFunctionGetResults, + SqlUserDefinedFunctionResource, + SystemData, + TableCreateUpdateParameters, + TableGetPropertiesOptions, + TableGetPropertiesResource, + TableGetResults, + TableResource, + ThroughputPolicyResource, + ThroughputSettingsGetPropertiesResource, + ThroughputSettingsGetResults, + ThroughputSettingsResource, + ThroughputSettingsUpdateParameters, + TrackedResource, + UniqueKey, + UniqueKeyPolicy, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index 4d862a5d91bb..be2ec75e8001 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -590,6 +590,25 @@ export const CorsPolicy: msRest.CompositeMapper = { } }; +export const Capacity: msRest.CompositeMapper = { + serializedName: "Capacity", + type: { + name: "Composite", + className: "Capacity", + modelProperties: { + totalThroughputLimit: { + serializedName: "totalThroughputLimit", + constraints: { + InclusiveMinimum: -1 + }, + type: { + name: "Number" + } + } + } + } +}; + export const SystemData: msRest.CompositeMapper = { serializedName: "systemData", type: { @@ -983,6 +1002,13 @@ export const DatabaseAccountGetResults: msRest.CompositeMapper = { name: "Boolean" } }, + capacity: { + serializedName: "properties.capacity", + type: { + name: "Composite", + className: "Capacity" + } + }, systemData: { readOnly: true, serializedName: "systemData", @@ -3000,6 +3026,13 @@ export const DatabaseAccountCreateUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "RestoreParameters" } + }, + capacity: { + serializedName: "properties.capacity", + type: { + name: "Composite", + className: "Capacity" + } } } } @@ -3215,6 +3248,13 @@ export const DatabaseAccountUpdateParameters: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + capacity: { + serializedName: "properties.capacity", + type: { + name: "Composite", + className: "Capacity" + } } } } @@ -4597,6 +4637,12 @@ export const PeriodicModeProperties: msRest.CompositeMapper = { type: { name: "Number" } + }, + backupStorageRedundancy: { + serializedName: "backupStorageRedundancy", + type: { + name: "String" + } } } } @@ -4635,6 +4681,60 @@ export const ContinuousModeBackupPolicy: msRest.CompositeMapper = { } }; +export const LocationProperties: msRest.CompositeMapper = { + serializedName: "LocationProperties", + type: { + name: "Composite", + className: "LocationProperties", + modelProperties: { + supportsAvailabilityZone: { + readOnly: true, + serializedName: "supportsAvailabilityZone", + type: { + name: "Boolean" + } + }, + isResidencyRestricted: { + readOnly: true, + serializedName: "isResidencyRestricted", + type: { + name: "Boolean" + } + }, + backupStorageRedundancies: { + readOnly: true, + serializedName: "backupStorageRedundancies", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const LocationGetResult: msRest.CompositeMapper = { + serializedName: "LocationGetResult", + type: { + name: "Composite", + className: "LocationGetResult", + modelProperties: { + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "LocationProperties" + } + } + } + } +}; + export const TrackedResource: msRest.CompositeMapper = { serializedName: "TrackedResource", type: { @@ -5624,217 +5724,942 @@ export const BackupInformation: msRest.CompositeMapper = { } }; -export const DatabaseAccountsListResult: msRest.CompositeMapper = { - serializedName: "DatabaseAccountsListResult", +export const SeedNode: msRest.CompositeMapper = { + serializedName: "SeedNode", type: { name: "Composite", - className: "DatabaseAccountsListResult", + className: "SeedNode", modelProperties: { - value: { - readOnly: true, - serializedName: "", + ipAddress: { + serializedName: "ipAddress", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseAccountGetResults" - } - } + name: "String" } } } } }; -export const MetricListResult: msRest.CompositeMapper = { - serializedName: "MetricListResult", +export const Certificate: msRest.CompositeMapper = { + serializedName: "Certificate", type: { name: "Composite", - className: "MetricListResult", + className: "Certificate", modelProperties: { - value: { - readOnly: true, - serializedName: "", + pem: { + serializedName: "pem", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Metric" - } - } + name: "String" } } } } }; -export const UsagesResult: msRest.CompositeMapper = { - serializedName: "UsagesResult", +export const ClusterResourceProperties: msRest.CompositeMapper = { + serializedName: "ClusterResource_properties", type: { name: "Composite", - className: "UsagesResult", + className: "ClusterResourceProperties", modelProperties: { - value: { - readOnly: true, - serializedName: "", + provisioningState: { + serializedName: "provisioningState", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Usage" - } - } + name: "String" } - } - } - } -}; - -export const MetricDefinitionsListResult: msRest.CompositeMapper = { - serializedName: "MetricDefinitionsListResult", - type: { - name: "Composite", - className: "MetricDefinitionsListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + }, + restoreFromBackupId: { + serializedName: "restoreFromBackupId", + type: { + name: "String" + } + }, + delegatedManagementSubnetId: { + serializedName: "delegatedManagementSubnetId", + type: { + name: "String" + } + }, + cassandraVersion: { + serializedName: "cassandraVersion", + type: { + name: "String" + } + }, + clusterNameOverride: { + serializedName: "clusterNameOverride", + type: { + name: "String" + } + }, + authenticationMethod: { + serializedName: "authenticationMethod", + type: { + name: "String" + } + }, + initialCassandraAdminPassword: { + serializedName: "initialCassandraAdminPassword", + type: { + name: "String" + } + }, + prometheusEndpoint: { + serializedName: "prometheusEndpoint", + type: { + name: "Composite", + className: "SeedNode" + } + }, + repairEnabled: { + serializedName: "repairEnabled", + type: { + name: "Boolean" + } + }, + clientCertificates: { + serializedName: "clientCertificates", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricDefinition" + className: "Certificate" } } } - } - } - } -}; - -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "", + }, + externalGossipCertificates: { + serializedName: "externalGossipCertificates", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "Certificate" } } } }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const PercentileMetricListResult: msRest.CompositeMapper = { - serializedName: "PercentileMetricListResult", - type: { - name: "Composite", - className: "PercentileMetricListResult", - modelProperties: { - value: { + gossipCertificates: { readOnly: true, - serializedName: "", + serializedName: "gossipCertificates", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PercentileMetric" + className: "Certificate" } } } - } - } - } -}; - -export const PartitionMetricListResult: msRest.CompositeMapper = { - serializedName: "PartitionMetricListResult", - type: { - name: "Composite", - className: "PartitionMetricListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + }, + externalSeedNodes: { + serializedName: "externalSeedNodes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PartitionMetric" + className: "SeedNode" } } } - } - } - } -}; - -export const PartitionUsagesResult: msRest.CompositeMapper = { - serializedName: "PartitionUsagesResult", - type: { - name: "Composite", - className: "PartitionUsagesResult", - modelProperties: { - value: { + }, + seedNodes: { readOnly: true, - serializedName: "", + serializedName: "seedNodes", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PartitionUsage" + className: "SeedNode" } } } + }, + hoursBetweenBackups: { + serializedName: "hoursBetweenBackups", + type: { + name: "Number" + } + }, + deallocated: { + serializedName: "deallocated", + type: { + name: "Boolean" + } + }, + cassandraAuditLoggingEnabled: { + serializedName: "cassandraAuditLoggingEnabled", + type: { + name: "Boolean" + } } } } }; -export const SqlDatabaseListResult: msRest.CompositeMapper = { - serializedName: "SqlDatabaseListResult", +export const ManagedCassandraARMResourceProperties: msRest.CompositeMapper = { + serializedName: "ManagedCassandraARMResourceProperties", type: { name: "Composite", - className: "SqlDatabaseListResult", + className: "ManagedCassandraARMResourceProperties", modelProperties: { - value: { + id: { readOnly: true, - serializedName: "", + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SqlDatabaseGetResults" - } - } + name: "String" } - } - } - } -}; + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedCassandraManagedServiceIdentity" + } + } + } + } +}; + +export const ClusterResource: msRest.CompositeMapper = { + serializedName: "ClusterResource", + type: { + name: "Composite", + className: "ClusterResource", + modelProperties: { + ...ManagedCassandraARMResourceProperties.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClusterResourceProperties" + } + } + } + } +}; + +export const ManagedCassandraManagedServiceIdentity: msRest.CompositeMapper = { + serializedName: "ManagedCassandraManagedServiceIdentity", + type: { + name: "Composite", + className: "ManagedCassandraManagedServiceIdentity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCassandraReaperStatus: msRest.CompositeMapper = { + serializedName: "ManagedCassandraReaperStatus", + type: { + name: "Composite", + className: "ManagedCassandraReaperStatus", + modelProperties: { + healthy: { + serializedName: "healthy", + type: { + name: "Boolean" + } + }, + repairRunIds: { + serializedName: "repairRunIds", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + repairSchedules: { + serializedName: "repairSchedules", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ConnectionError: msRest.CompositeMapper = { + serializedName: "ConnectionError", + type: { + name: "Composite", + className: "ConnectionError", + modelProperties: { + connectionState: { + serializedName: "connectionState", + type: { + name: "String" + } + }, + iPFrom: { + serializedName: "iPFrom", + type: { + name: "String" + } + }, + iPTo: { + serializedName: "iPTo", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + exception: { + serializedName: "exception", + type: { + name: "String" + } + } + } + } +}; + +export const CassandraClusterPublicStatusDataCentersItemNodesItem: msRest.CompositeMapper = { + serializedName: "CassandraClusterPublicStatus_dataCentersItem_nodesItem", + type: { + name: "Composite", + className: "CassandraClusterPublicStatusDataCentersItemNodesItem", + modelProperties: { + address: { + serializedName: "address", + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + load: { + serializedName: "load", + type: { + name: "String" + } + }, + tokens: { + serializedName: "tokens", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + size: { + serializedName: "size", + type: { + name: "Number" + } + }, + hostID: { + serializedName: "hostID", + type: { + name: "String" + } + }, + rack: { + serializedName: "rack", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "String" + } + }, + diskUsedKB: { + serializedName: "diskUsedKB", + type: { + name: "Number" + } + }, + diskFreeKB: { + serializedName: "diskFreeKB", + type: { + name: "Number" + } + }, + memoryUsedKB: { + serializedName: "memoryUsedKB", + type: { + name: "Number" + } + }, + memoryBuffersAndCachedKB: { + serializedName: "memoryBuffersAndCachedKB", + type: { + name: "Number" + } + }, + memoryFreeKB: { + serializedName: "memoryFreeKB", + type: { + name: "Number" + } + }, + memoryTotalKB: { + serializedName: "memoryTotalKB", + type: { + name: "Number" + } + }, + cpuUsage: { + serializedName: "cpuUsage", + type: { + name: "Number" + } + } + } + } +}; + +export const CassandraClusterPublicStatusDataCentersItem: msRest.CompositeMapper = { + serializedName: "CassandraClusterPublicStatus_dataCentersItem", + type: { + name: "Composite", + className: "CassandraClusterPublicStatusDataCentersItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + seedNodes: { + serializedName: "seedNodes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nodes: { + serializedName: "nodes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraClusterPublicStatusDataCentersItemNodesItem" + } + } + } + } + } + } +}; + +export const CassandraClusterPublicStatus: msRest.CompositeMapper = { + serializedName: "CassandraClusterPublicStatus", + type: { + name: "Composite", + className: "CassandraClusterPublicStatus", + modelProperties: { + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + reaperStatus: { + serializedName: "reaperStatus", + type: { + name: "Composite", + className: "ManagedCassandraReaperStatus" + } + }, + connectionErrors: { + serializedName: "connectionErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectionError" + } + } + } + }, + dataCenters: { + serializedName: "dataCenters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraClusterPublicStatusDataCentersItem" + } + } + } + } + } + } +}; + +export const CommandPostBody: msRest.CompositeMapper = { + serializedName: "CommandPostBody", + type: { + name: "Composite", + className: "CommandPostBody", + modelProperties: { + command: { + required: true, + serializedName: "command", + type: { + name: "String" + } + }, + argumentsProperty: { + serializedName: "arguments", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + host: { + required: true, + serializedName: "host", + type: { + name: "String" + } + }, + cassandraStopStart: { + serializedName: "cassandra-stop-start", + type: { + name: "Boolean" + } + }, + readwrite: { + serializedName: "readwrite", + type: { + name: "Boolean" + } + } + } + } +}; + +export const CommandOutput: msRest.CompositeMapper = { + serializedName: "CommandOutput", + type: { + name: "Composite", + className: "CommandOutput", + modelProperties: { + commandOutput: { + serializedName: "commandOutput", + type: { + name: "String" + } + } + } + } +}; + +export const DataCenterResourceProperties: msRest.CompositeMapper = { + serializedName: "DataCenterResource_properties", + type: { + name: "Composite", + className: "DataCenterResourceProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + dataCenterLocation: { + serializedName: "dataCenterLocation", + type: { + name: "String" + } + }, + delegatedSubnetId: { + serializedName: "delegatedSubnetId", + type: { + name: "String" + } + }, + nodeCount: { + serializedName: "nodeCount", + type: { + name: "Number" + } + }, + seedNodes: { + readOnly: true, + serializedName: "seedNodes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SeedNode" + } + } + } + }, + base64EncodedCassandraYamlFragment: { + serializedName: "base64EncodedCassandraYamlFragment", + type: { + name: "String" + } + }, + managedDiskCustomerKeyUri: { + serializedName: "managedDiskCustomerKeyUri", + type: { + name: "String" + } + }, + backupStorageCustomerKeyUri: { + serializedName: "backupStorageCustomerKeyUri", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + diskSku: { + serializedName: "diskSku", + type: { + name: "String" + } + }, + diskCapacity: { + serializedName: "diskCapacity", + type: { + name: "Number" + } + }, + availabilityZone: { + serializedName: "availabilityZone", + type: { + name: "Boolean" + } + } + } + } +}; + +export const DataCenterResource: msRest.CompositeMapper = { + serializedName: "DataCenterResource", + type: { + name: "Composite", + className: "DataCenterResource", + modelProperties: { + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataCenterResourceProperties" + } + } + } + } +}; + +export const DatabaseAccountsListResult: msRest.CompositeMapper = { + serializedName: "DatabaseAccountsListResult", + type: { + name: "Composite", + className: "DatabaseAccountsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseAccountGetResults" + } + } + } + } + } + } +}; + +export const MetricListResult: msRest.CompositeMapper = { + serializedName: "MetricListResult", + type: { + name: "Composite", + className: "MetricListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Metric" + } + } + } + } + } + } +}; + +export const UsagesResult: msRest.CompositeMapper = { + serializedName: "UsagesResult", + type: { + name: "Composite", + className: "UsagesResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage" + } + } + } + } + } + } +}; + +export const MetricDefinitionsListResult: msRest.CompositeMapper = { + serializedName: "MetricDefinitionsListResult", + type: { + name: "Composite", + className: "MetricDefinitionsListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDefinition" + } + } + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PercentileMetricListResult: msRest.CompositeMapper = { + serializedName: "PercentileMetricListResult", + type: { + name: "Composite", + className: "PercentileMetricListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PercentileMetric" + } + } + } + } + } + } +}; + +export const PartitionMetricListResult: msRest.CompositeMapper = { + serializedName: "PartitionMetricListResult", + type: { + name: "Composite", + className: "PartitionMetricListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PartitionMetric" + } + } + } + } + } + } +}; + +export const PartitionUsagesResult: msRest.CompositeMapper = { + serializedName: "PartitionUsagesResult", + type: { + name: "Composite", + className: "PartitionUsagesResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PartitionUsage" + } + } + } + } + } + } +}; + +export const SqlDatabaseListResult: msRest.CompositeMapper = { + serializedName: "SqlDatabaseListResult", + type: { + name: "Composite", + className: "SqlDatabaseListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDatabaseGetResults" + } + } + } + } + } + } +}; export const SqlContainerListResult: msRest.CompositeMapper = { serializedName: "SqlContainerListResult", @@ -6135,6 +6960,29 @@ export const GremlinGraphListResult: msRest.CompositeMapper = { } }; +export const LocationListResult: msRest.CompositeMapper = { + serializedName: "LocationListResult", + type: { + name: "Composite", + className: "LocationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LocationGetResult" + } + } + } + } + } + } +}; + export const NotebookWorkspaceListResult: msRest.CompositeMapper = { serializedName: "NotebookWorkspaceListResult", type: { @@ -6362,6 +7210,51 @@ export const RestorableMongodbResourcesListResult: msRest.CompositeMapper = { } }; +export const ListClusters: msRest.CompositeMapper = { + serializedName: "ListClusters", + type: { + name: "Composite", + className: "ListClusters", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterResource" + } + } + } + } + } + } +}; + +export const ListDataCenters: msRest.CompositeMapper = { + serializedName: "ListDataCenters", + type: { + name: "Composite", + className: "ListDataCenters", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataCenterResource" + } + } + } + } + } + } +}; + export const discriminators = { 'BackupPolicy' : BackupPolicy, 'BackupPolicy.Periodic' : PeriodicModeBackupPolicy, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts index c73facb9d248..4a75ce525929 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mongoDBResourcesMappers.ts @@ -16,10 +16,12 @@ export { AutoscaleSettingsResource, AutoUpgradePolicyResource, AzureEntityResource, + BackupInformation, BackupPolicy, BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,19 +34,26 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, ConsistencyPolicy, ContainerPartitionKey, + ContinuousBackupInformation, + ContinuousBackupRestoreLocation, ContinuousModeBackupPolicy, CorsPolicy, CreateUpdateOptions, DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ExcludedPath, FailoverPolicy, GremlinDatabaseCreateUpdateParameters, @@ -62,6 +71,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -92,6 +105,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts index 45263a69395d..9f58cac40501 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/notebookWorkspacesMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,7 +33,10 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -44,6 +48,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ErrorResponse, ExcludedPath, FailoverPolicy, @@ -62,6 +68,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -92,6 +102,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index 4f855d9c9c7d..d0fc8cf3e0fb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -47,6 +47,21 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const clusterName: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/ + }, + type: { + name: "String" + } + } +}; export const collectionName: msRest.OperationURLParameter = { parameterPath: "collectionName", mapper: { @@ -97,6 +112,21 @@ export const databaseRid: msRest.OperationURLParameter = { } } }; +export const dataCenterName: msRest.OperationURLParameter = { + parameterPath: "dataCenterName", + mapper: { + required: true, + serializedName: "dataCenterName", + constraints: { + MaxLength: 100, + MinLength: 1, + Pattern: /^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/ + }, + type: { + name: "String" + } + } +}; export const endTime: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts index 500f1515fa90..0df260353a2a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/privateEndpointConnectionsMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,8 +33,11 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -45,6 +49,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ErrorResponse, ExcludedPath, FailoverPolicy, @@ -63,6 +69,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -92,6 +102,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts index c8112dbedc58..42c6ef43051d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/privateLinkResourcesMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,8 +33,11 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -45,6 +49,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ExcludedPath, FailoverPolicy, GremlinDatabaseCreateUpdateParameters, @@ -62,6 +68,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -91,6 +101,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts index 3f3a227e7c40..7878decdd7f0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/sqlResourcesMappers.ts @@ -21,6 +21,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -33,8 +34,11 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -48,6 +52,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ExcludedPath, FailoverPolicy, GremlinDatabaseCreateUpdateParameters, @@ -65,6 +71,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -93,6 +103,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts index 5637ba10e4b3..3c5d7c089412 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/tableResourcesMappers.ts @@ -20,6 +20,7 @@ export { BackupPolicyMigrationState, BaseResource, Capability, + Capacity, CassandraKeyspaceCreateUpdateParameters, CassandraKeyspaceGetPropertiesOptions, CassandraKeyspaceGetPropertiesResource, @@ -32,8 +33,11 @@ export { CassandraTableGetPropertiesResource, CassandraTableGetResults, CassandraTableResource, + Certificate, CloudError, ClusterKey, + ClusterResource, + ClusterResourceProperties, Column, CompositePath, ConflictResolutionPolicy, @@ -45,6 +49,8 @@ export { DatabaseAccountCreateUpdateParameters, DatabaseAccountGetResults, DatabaseRestoreResource, + DataCenterResource, + DataCenterResourceProperties, ExcludedPath, FailoverPolicy, GremlinDatabaseCreateUpdateParameters, @@ -62,6 +68,10 @@ export { IndexingPolicy, IpAddressOrRange, Location, + LocationGetResult, + LocationProperties, + ManagedCassandraARMResourceProperties, + ManagedCassandraManagedServiceIdentity, ManagedServiceIdentity, ManagedServiceIdentityUserAssignedIdentitiesValue, MongoDBCollectionCreateUpdateParameters, @@ -90,6 +100,7 @@ export { ProxyResource, Resource, RestoreParameters, + SeedNode, SpatialSpec, SqlContainerCreateUpdateParameters, SqlContainerGetPropertiesOptions, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts new file mode 100644 index 000000000000..c4dc50dca6d9 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts @@ -0,0 +1,614 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/cassandraClustersMappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext"; + +/** Class representing a CassandraClusters. */ +export class CassandraClusters { + private readonly client: CosmosDBManagementClientContext; + + /** + * Create a CassandraClusters. + * @param {CosmosDBManagementClientContext} client Reference to the service client. + */ + constructor(client: CosmosDBManagementClientContext) { + this.client = client; + } + + /** + * List all managed Cassandra clusters in this subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * List all managed Cassandra clusters in this resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Get the properties of a managed Cassandra cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes a managed Cassandra cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a managed Cassandra cluster. When updating, you must specify all writable + * properties. To update only some properties, use PATCH. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body The properties specifying the desired state of the managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdate(resourceGroupName: string, clusterName: string, body: Models.ClusterResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdate(resourceGroupName,clusterName,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates some of the properties of a managed Cassandra cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Parameters to provide for specifying the managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterName: string, body: Models.ClusterResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,clusterName,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Invoke a command like nodetool for cassandra maintenance + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param [options] The optional parameters + * @returns Promise + */ + invokeCommand(resourceGroupName: string, clusterName: string, body: Models.CommandPostBody, options?: msRest.RequestOptionsBase): Promise { + return this.beginInvokeCommand(resourceGroupName,clusterName,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will + * deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do + * anything on an already deallocated cluster. Use Start to restart the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + deallocate(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeallocate(resourceGroupName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host + * virtual machine of this cluster with reserved data disk. This won't do anything on an already + * running cluster. Use Deallocate to deallocate the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + status(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param callback The callback + */ + status(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The optional parameters + * @param callback The callback + */ + status(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + status(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + statusOperationSpec, + callback) as Promise; + } + + /** + * Deletes a managed Cassandra cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Create or update a managed Cassandra cluster. When updating, you must specify all writable + * properties. To update only some properties, use PATCH. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body The properties specifying the desired state of the managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdate(resourceGroupName: string, clusterName: string, body: Models.ClusterResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + body, + options + }, + beginCreateUpdateOperationSpec, + options); + } + + /** + * Updates some of the properties of a managed Cassandra cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Parameters to provide for specifying the managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, clusterName: string, body: Models.ClusterResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + body, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Invoke a command like nodetool for cassandra maintenance + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param [options] The optional parameters + * @returns Promise + */ + beginInvokeCommand(resourceGroupName: string, clusterName: string, body: Models.CommandPostBody, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + body, + options + }, + beginInvokeCommandOperationSpec, + options); + } + + /** + * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will + * deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do + * anything on an already deallocated cluster. Use Start to restart the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeallocate(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + options + }, + beginDeallocateOperationSpec, + options); + } + + /** + * Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host + * virtual machine of this cluster with reserved data disk. This won't do anything on an already + * running cluster. Use Deallocate to deallocate the cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + options + }, + beginStartOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListClusters + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListClusters + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const statusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CassandraClusterPublicStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ClusterResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ClusterResource + }, + 201: { + bodyMapper: Mappers.ClusterResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.ClusterResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ClusterResource + }, + 202: { + bodyMapper: Mappers.ClusterResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginInvokeCommandOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.CommandPostBody, + required: true + } + }, + responses: { + 202: { + bodyMapper: Mappers.CommandOutput + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeallocateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts new file mode 100644 index 000000000000..3356998a5e46 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraDataCenters.ts @@ -0,0 +1,353 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/cassandraDataCentersMappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext"; + +/** Class representing a CassandraDataCenters. */ +export class CassandraDataCenters { + private readonly client: CosmosDBManagementClientContext; + + /** + * Create a CassandraDataCenters. + * @param {CosmosDBManagementClientContext} client Reference to the service client. + */ + constructor(client: CosmosDBManagementClientContext) { + this.client = client; + } + + /** + * List all data centers in a particular managed Cassandra cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param callback The callback + */ + list(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the properties of a managed Cassandra data center. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, dataCenterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, dataCenterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, dataCenterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, dataCenterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + dataCenterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Delete a managed Cassandra data center. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterName: string, dataCenterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterName,dataCenterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a managed Cassandra data center. When updating, overwrite all properties. To + * update only some properties, use PATCH. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param body Parameters specifying the managed Cassandra data center. + * @param [options] The optional parameters + * @returns Promise + */ + createUpdate(resourceGroupName: string, clusterName: string, dataCenterName: string, body: Models.DataCenterResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateUpdate(resourceGroupName,clusterName,dataCenterName,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update some of the properties of a managed Cassandra data center. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param body Parameters to provide for specifying the managed Cassandra data center. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterName: string, dataCenterName: string, body: Models.DataCenterResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,clusterName,dataCenterName,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete a managed Cassandra data center. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, clusterName: string, dataCenterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + dataCenterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Create or update a managed Cassandra data center. When updating, overwrite all properties. To + * update only some properties, use PATCH. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param body Parameters specifying the managed Cassandra data center. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateUpdate(resourceGroupName: string, clusterName: string, dataCenterName: string, body: Models.DataCenterResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + dataCenterName, + body, + options + }, + beginCreateUpdateOperationSpec, + options); + } + + /** + * Update some of the properties of a managed Cassandra data center. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param dataCenterName Data center name in a managed Cassandra cluster. + * @param body Parameters to provide for specifying the managed Cassandra data center. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, clusterName: string, dataCenterName: string, body: Models.DataCenterResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + dataCenterName, + body, + options + }, + beginUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListDataCenters + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.dataCenterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataCenterResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.dataCenterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.dataCenterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.DataCenterResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataCenterResource + }, + 201: { + bodyMapper: Mappers.DataCenterResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.dataCenterName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.DataCenterResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataCenterResource + }, + 202: { + bodyMapper: Mappers.DataCenterResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts index 3641d33ef32a..3f30bdf4ddda 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts @@ -25,6 +25,7 @@ export * from "./mongoDBResources"; export * from "./tableResources"; export * from "./cassandraResources"; export * from "./gremlinResources"; +export * from "./locations"; export * from "./notebookWorkspaces"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; @@ -35,3 +36,5 @@ export * from "./restorableSqlResources"; export * from "./restorableMongodbDatabases"; export * from "./restorableMongodbCollections"; export * from "./restorableMongodbResources"; +export * from "./cassandraClusters"; +export * from "./cassandraDataCenters"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts new file mode 100644 index 000000000000..b23f3d89033b --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/locations.ts @@ -0,0 +1,128 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/locationsMappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClientContext } from "../cosmosDBManagementClientContext"; + +/** Class representing a Locations. */ +export class Locations { + private readonly client: CosmosDBManagementClientContext; + + /** + * Create a Locations. + * @param {CosmosDBManagementClientContext} client Reference to the service client. + */ + constructor(client: CosmosDBManagementClientContext) { + this.client = client; + } + + /** + * List Cosmos DB locations and their properties + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Get the properties of an existing Cosmos DB location + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param callback The callback + */ + get(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LocationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LocationGetResult + }, + 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 11847cee69eb..c1cec9dd1fa2 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -392,6 +392,21 @@ export class MongoDBResources { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Retrieves continuous backup information for a Mongodb collection. + * @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 location The name of the continuous backup restore location. + * @param [options] The optional parameters + * @returns Promise + */ + retrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, location: Models.ContinuousBackupRestoreLocation, options?: msRest.RequestOptionsBase): Promise { + return this.beginRetrieveContinuousBackupInformation(resourceGroupName,accountName,databaseName,collectionName,location,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. @@ -613,6 +628,30 @@ export class MongoDBResources { beginMigrateMongoDBCollectionToManualThroughputOperationSpec, options); } + + /** + * Retrieves continuous backup information for a Mongodb collection. + * @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 location The name of the continuous backup restore location. + * @param [options] The optional parameters + * @returns Promise + */ + beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, location: Models.ContinuousBackupRestoreLocation, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + accountName, + databaseName, + collectionName, + location, + options + }, + beginRetrieveContinuousBackupInformationOperationSpec, + options); + } } // Operation Specifications @@ -1072,3 +1111,38 @@ const beginMigrateMongoDBCollectionToManualThroughputOperationSpec: msRest.Opera }, serializer }; + +const beginRetrieveContinuousBackupInformationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "location", + mapper: { + ...Mappers.ContinuousBackupRestoreLocation, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupInformation + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};