diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9c7c36f4cd7d..2ea0191386ab 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -11970,7 +11970,7 @@ packages: dev: false file:projects/arm-cosmosdb.tgz: - resolution: {integrity: sha512-PhhkTfEGOcVHn8TxZmFq8iU3YLpa11S8WAc2gihkTgBlXIE1ufWXaDnHgqlg6IEE5AnyvUIGlRn0ikcquSExAg==, tarball: file:projects/arm-cosmosdb.tgz} + resolution: {integrity: sha512-Ot/hLRQyc9yup2QE48tpJ5KnVuD+/uAQab/iJf6I4vNYqYX/t52Qed9VVKrEBm3IDR37//sMaC3GtPMfJIV6mA==, tarball: file:projects/arm-cosmosdb.tgz} name: '@rush-temp/arm-cosmosdb' version: 0.0.0 dependencies: @@ -11987,7 +11987,7 @@ packages: dotenv: 16.3.1 mkdirp: 2.1.6 mocha: 7.2.0 - rimraf: 3.0.2 + rimraf: 5.0.1 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3(@types/node@14.18.56)(rollup@2.79.1) ts-node: 10.9.1(@types/node@14.18.56)(typescript@5.0.4) diff --git a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md index dc43251188a3..8c07813db8ae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md +++ b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md @@ -1,16 +1,6 @@ # Release History - -## 16.0.0-beta.7 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 16.0.0-beta.6 (2023-06-13) + +## 15.6.0-beta.1 (2023-09-21) **Features** @@ -58,7 +48,8 @@ - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait - Added Interface AzureBlobDataTransferDataSourceSink - Added Interface BackupResource - - Added Interface BackupResourceProperties + - Added Interface BackupSchedule + - Added Interface BaseCosmosDataTransferDataSourceSink - Added Interface CassandraClustersGetBackupOptionalParams - Added Interface CassandraClustersListBackupsOptionalParams - Added Interface CassandraResourcesCreateUpdateCassandraViewHeaders @@ -184,6 +175,7 @@ - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams - Added Interface TrackedResource + - Added Type Alias BackupState - Added Type Alias CassandraClustersGetBackupResponse - Added Type Alias CassandraClustersListBackupsResponse - Added Type Alias CassandraResourcesCreateUpdateCassandraViewResponse @@ -194,6 +186,8 @@ - Added Type Alias CassandraResourcesMigrateCassandraViewToManualThroughputResponse - Added Type Alias CassandraResourcesUpdateCassandraViewThroughputResponse - Added Type Alias CheckNameAvailabilityReason + - Added Type Alias ClusterType + - Added Type Alias CustomerManagedKeyStatus - Added Type Alias DataTransferComponent - Added Type Alias DataTransferDataSourceSinkUnion - Added Type Alias DataTransferJobsCancelResponse @@ -203,6 +197,7 @@ - Added Type Alias DataTransferJobsListByDatabaseAccountResponse - Added Type Alias DataTransferJobsPauseResponse - Added Type Alias DataTransferJobsResumeResponse + - Added Type Alias DefaultPriorityLevel - Added Type Alias EnableFullTextQuery - Added Type Alias GraphResourcesCreateUpdateGraphResponse - Added Type Alias GraphResourcesGetGraphResponse @@ -239,15 +234,29 @@ - Added Type Alias SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse - Added Type Alias ThroughputPolicyType - Interface ARMResourceProperties has a new optional parameter identity + - Interface CassandraClustersDeallocateOptionalParams has a new optional parameter xMsForceDeallocate + - Interface ClusterResourceProperties has a new optional parameter backupSchedules + - Interface ClusterResourceProperties has a new optional parameter clusterType + - Interface ClusterResourceProperties has a new optional parameter extensions + - Interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems has a new optional parameter isLatestModel + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter customerManagedKeyStatus + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter defaultPriorityLevel - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter diagnosticLogSettings - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enableBurstCapacity - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enablePriorityBasedExecution + - Interface DatabaseAccountGetResults has a new optional parameter customerManagedKeyStatus + - Interface DatabaseAccountGetResults has a new optional parameter defaultPriorityLevel - Interface DatabaseAccountGetResults has a new optional parameter diagnosticLogSettings - Interface DatabaseAccountGetResults has a new optional parameter enableBurstCapacity - Interface DatabaseAccountGetResults has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountGetResults has a new optional parameter enablePriorityBasedExecution + - Interface DatabaseAccountUpdateParameters has a new optional parameter customerManagedKeyStatus + - Interface DatabaseAccountUpdateParameters has a new optional parameter defaultPriorityLevel - Interface DatabaseAccountUpdateParameters has a new optional parameter diagnosticLogSettings - Interface DatabaseAccountUpdateParameters has a new optional parameter enableBurstCapacity - Interface DatabaseAccountUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountUpdateParameters has a new optional parameter enablePriorityBasedExecution - Interface GremlinDatabaseResource has a new optional parameter createMode - Interface GremlinDatabaseResource has a new optional parameter restoreParameters - Interface GremlinGraphResource has a new optional parameter createMode @@ -264,20 +273,18 @@ - Interface SqlDatabaseResource has a new optional parameter restoreParameters - Interface TableResource has a new optional parameter createMode - Interface TableResource has a new optional parameter restoreParameters + - Added Enum KnownBackupState - Added Enum KnownCheckNameAvailabilityReason + - Added Enum KnownClusterType + - Added Enum KnownCustomerManagedKeyStatus - Added Enum KnownDataTransferComponent + - Added Enum KnownDefaultPriorityLevel - Added Enum KnownMongoClusterStatus - Added Enum KnownNodeKind - Added Enum KnownProvisioningState - Added Enum KnownThroughputPolicyType - Enum KnownCreateMode has a new value PointInTimeRestore - Enum KnownOperationType has a new value Recreate - -**Breaking Changes** - - - Interface ThroughputSettingsResource no longer has parameter instantMaximumThroughput - - Interface ThroughputSettingsResource no longer has parameter softAllowedMaximumThroughput - - Enum KnownPublicNetworkAccess no longer has value SecuredByPerimeter ## 15.5.0 (2023-05-11) diff --git a/sdk/cosmosdb/arm-cosmosdb/_meta.json b/sdk/cosmosdb/arm-cosmosdb/_meta.json index 4cf354c6b987..ba552dd2a825 100644 --- a/sdk/cosmosdb/arm-cosmosdb/_meta.json +++ b/sdk/cosmosdb/arm-cosmosdb/_meta.json @@ -1,8 +1,8 @@ { - "commit": "ac98588da3cf3c3e043568adc8a6cc122ad8d6a7", + "commit": "21b281384e77fa876fc670e4c9de7dd036111753", "readme": "specification/cosmos-db/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\readme.md --use=@autorest/typescript@6.0.2 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.2" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.2", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 163a5fffa44b..7e04d7d3ed11 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CosmosDBManagementClient.", - "version": "16.0.0-beta.7", + "version": "15.6.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.3", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -38,7 +38,7 @@ "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", @@ -48,8 +48,8 @@ "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^14.0.0", - "@azure/dev-tool": "^1.0.0", - "ts-node": "^10.0.0" + "ts-node": "^10.0.0", + "@azure/dev-tool": "^1.0.0" }, "repository": { "type": "git", @@ -84,7 +84,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -112,13 +112,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb" +} \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md index 4424abf7c57a..d695d81d7ca0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md +++ b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md @@ -120,19 +120,33 @@ export type BackupPolicyType = string; export type BackupPolicyUnion = BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; // @public -export interface BackupResource extends ARMProxyResource { - // (undocumented) - properties?: BackupResourceProperties; +export interface BackupResource { + backupExpiryTimestamp?: Date; + backupId?: string; + backupStartTimestamp?: Date; + backupState?: BackupState; + backupStopTimestamp?: Date; } // @public (undocumented) -export interface BackupResourceProperties { - timestamp?: Date; +export interface BackupSchedule { + cronExpression?: string; + retentionInHours?: number; + scheduleName?: string; } +// @public +export type BackupState = string; + // @public export type BackupStorageRedundancy = string; +// @public +export interface BaseCosmosDataTransferDataSourceSink { + // (undocumented) + remoteAccountName?: string; +} + // @public export interface Capability { name?: string; @@ -197,6 +211,7 @@ export type CassandraClustersCreateUpdateResponse = ClusterResource; export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; + xMsForceDeallocate?: boolean; } // @public @@ -851,12 +866,15 @@ export interface ClusterResource extends ManagedCassandraARMResourceProperties { // @public export interface ClusterResourceProperties { authenticationMethod?: AuthenticationMethod; + backupSchedules?: BackupSchedule[]; cassandraAuditLoggingEnabled?: boolean; cassandraVersion?: string; clientCertificates?: Certificate[]; clusterNameOverride?: string; + clusterType?: ClusterType; deallocated?: boolean; delegatedManagementSubnetId?: string; + extensions?: string[]; externalGossipCertificates?: Certificate[]; externalSeedNodes?: SeedNode[]; readonly gossipCertificates?: Certificate[]; @@ -870,6 +888,9 @@ export interface ClusterResourceProperties { readonly seedNodes?: SeedNode[]; } +// @public +export type ClusterType = string; + // @public export interface Collection { listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: CollectionListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator; @@ -980,6 +1001,7 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa diskFreeKB?: number; diskUsedKB?: number; hostID?: string; + isLatestModel?: boolean; load?: string; memoryBuffersAndCachedKB?: number; memoryFreeKB?: number; @@ -1084,7 +1106,7 @@ export interface CorsPolicy { } // @public -export interface CosmosCassandraDataTransferDataSourceSink extends DataTransferDataSourceSink { +export interface CosmosCassandraDataTransferDataSourceSink extends DataTransferDataSourceSink, BaseCosmosDataTransferDataSourceSink { component: "CosmosDBCassandra"; // (undocumented) keyspaceName: string; @@ -1191,7 +1213,7 @@ export interface CosmosDBManagementClientOptionalParams extends coreClient.Servi } // @public -export interface CosmosMongoDataTransferDataSourceSink extends DataTransferDataSourceSink { +export interface CosmosMongoDataTransferDataSourceSink extends DataTransferDataSourceSink, BaseCosmosDataTransferDataSourceSink { // (undocumented) collectionName: string; component: "CosmosDBMongo"; @@ -1200,7 +1222,7 @@ export interface CosmosMongoDataTransferDataSourceSink extends DataTransferDataS } // @public -export interface CosmosSqlDataTransferDataSourceSink extends DataTransferDataSourceSink { +export interface CosmosSqlDataTransferDataSourceSink extends DataTransferDataSourceSink, BaseCosmosDataTransferDataSourceSink { component: "CosmosDBSql"; // (undocumented) containerName: string; @@ -1225,6 +1247,9 @@ export interface CreateUpdateOptions { throughput?: number; } +// @public +export type CustomerManagedKeyStatus = string; + // @public export interface Database { listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, options?: DatabaseListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator; @@ -1251,8 +1276,10 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; createMode?: CreateMode; + customerManagedKeyStatus?: CustomerManagedKeyStatus; databaseAccountOfferType: "Standard"; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; @@ -1264,6 +1291,7 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; + enablePriorityBasedExecution?: boolean; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; readonly keysMetadata?: DatabaseAccountKeysMetadata; @@ -1289,8 +1317,10 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; createMode?: CreateMode; + customerManagedKeyStatus?: CustomerManagedKeyStatus; readonly databaseAccountOfferType?: "Standard"; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; @@ -1303,6 +1333,7 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; + enablePriorityBasedExecution?: boolean; readonly failoverPolicies?: FailoverPolicy[]; readonly instanceId?: string; ipRules?: IpAddressOrRange[]; @@ -1577,7 +1608,9 @@ export interface DatabaseAccountUpdateParameters { connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; + customerManagedKeyStatus?: CustomerManagedKeyStatus; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; @@ -1589,6 +1622,7 @@ export interface DatabaseAccountUpdateParameters { enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; + enablePriorityBasedExecution?: boolean; identity?: ManagedServiceIdentity; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; @@ -1781,6 +1815,9 @@ export type DataType = string; // @public export type DefaultConsistencyLevel = "Eventual" | "Session" | "BoundedStaleness" | "Strong" | "ConsistentPrefix"; +// @public +export type DefaultPriorityLevel = string; + // @public export interface DiagnosticLogSettings { enableFullTextQuery?: EnableFullTextQuery; @@ -2353,6 +2390,14 @@ export enum KnownBackupPolicyType { Periodic = "Periodic" } +// @public +export enum KnownBackupState { + Failed = "Failed", + Initiated = "Initiated", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownBackupStorageRedundancy { Geo = "Geo", @@ -2366,6 +2411,12 @@ export enum KnownCheckNameAvailabilityReason { Invalid = "Invalid" } +// @public +export enum KnownClusterType { + NonProduction = "NonProduction", + Production = "Production" +} + // @public export enum KnownCompositePathSortOrder { Ascending = "ascending", @@ -2414,6 +2465,21 @@ export enum KnownCreateMode { Restore = "Restore" } +// @public +export enum KnownCustomerManagedKeyStatus { + AccessToTheConfiguredCustomerManagedKeyConfirmed = "Access to the configured customer managed key confirmed.", + AccessToYourAccountIsCurrentlyRevokedBecauseTheAccessRulesAreBlockingOutboundRequestsToTheAzureKeyVaultServiceForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuide4016 = "Access to your account is currently revoked because the access rules are blocking outbound requests to the Azure Key Vault service; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide (4016).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBAccountHasAnUndefinedDefaultIdentityForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideInvalidAzureCosmosDbDefaultIdentity4015 = "Access to your account is currently revoked because the Azure Cosmos DB account has an undefined default identity; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#invalid-azure-cosmos-db-default-identity (4015).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBAccountSKeyVaultKeyURIDoesNotFollowTheExpectedFormatForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideImproperSyntaxDetectedOnTheKeyVaultUriProperty4006 = "Access to your account is currently revoked because the Azure Cosmos DB account's key vault key URI does not follow the expected format; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#improper-syntax-detected-on-the-key-vault-uri-property (4006).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBServiceIsUnableToObtainTheAADAuthenticationTokenForTheAccountSDefaultIdentityForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureActiveDirectoryTokenAcquisitionError4000 = "Access to your account is currently revoked because the Azure Cosmos DB service is unable to obtain the AAD authentication token for the account's default identity; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-active-directory-token-acquisition-error (4000).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBServiceIsUnableToWrapOrUnwrapTheKeyForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideInternalUnwrappingProcedureError4005 = "Access to your account is currently revoked because the Azure Cosmos DB service is unable to wrap or unwrap the key; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#internal-unwrapping-procedure-error (4005).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureKeyVaultDNSNameSpecifiedByTheAccountSKeyvaultkeyuriPropertyCouldNotBeResolvedForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideUnableToResolveTheKeyVaultsDns4009 = "Access to your account is currently revoked because the Azure Key Vault DNS name specified by the account's keyvaultkeyuri property could not be resolved; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#unable-to-resolve-the-key-vaults-dns (4009).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheCorrespondentAzureKeyVaultWasNotFoundForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureKeyVaultResourceNotFound4017 = "Access to your account is currently revoked because the correspondent Azure Key Vault was not found; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4017).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheCorrespondentKeyIsNotFoundOnTheSpecifiedKeyVaultForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureKeyVaultResourceNotFound4003 = "Access to your account is currently revoked because the correspondent key is not found on the specified Key Vault; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4003).", + AccessToYourAccountIsCurrentlyRevokedBecauseTheCurrentDefaultIdentityNoLongerHasPermissionToTheAssociatedKeyVaultKeyForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideDefaultIdentityIsUnauthorizedToAccessTheAzureKeyVaultKey4002 = "Access to your account is currently revoked because the current default identity no longer has permission to the associated Key Vault key; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#default-identity-is-unauthorized-to-access-the-azure-key-vault-key (4002).", + AccessToYourAccountIsCurrentlyRevokedForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuide = "Access to your account is currently revoked; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide" +} + // @public export enum KnownDatabaseAccountKind { GlobalDocumentDB = "GlobalDocumentDB", @@ -2439,6 +2505,12 @@ export enum KnownDataType { String = "String" } +// @public +export enum KnownDefaultPriorityLevel { + High = "High", + Low = "Low" +} + // @public export enum KnownIndexingMode { Consistent = "consistent", @@ -2567,7 +2639,8 @@ export enum KnownProvisioningState { // @public export enum KnownPublicNetworkAccess { Disabled = "Disabled", - Enabled = "Enabled" + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" } // @public @@ -5678,8 +5751,10 @@ export interface ThroughputSettingsGetResults extends ARMResourceProperties { // @public export interface ThroughputSettingsResource { autoscaleSettings?: AutoscaleSettingsResource; + readonly instantMaximumThroughput?: string; readonly minimumThroughput?: string; readonly offerReplacePending?: string; + readonly softAllowedMaximumThroughput?: string; throughput?: number; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index 58a11e9d6b37..028c9f850fe4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -132,7 +132,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-cosmosdb/16.0.0-beta.7`; + const packageDetails = `azsdk-js-arm-cosmosdb/15.6.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -185,7 +185,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-03-15-preview"; + this.apiVersion = options.apiVersion || "2023-09-15-preview"; this.databaseAccounts = new DatabaseAccountsImpl(this); this.operations = new OperationsImpl(this); this.database = new DatabaseImpl(this); diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 78e6584d15b1..d047983c0d23 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -388,6 +388,12 @@ export interface DatabaseAccountUpdateParameters { enableBurstCapacity?: boolean; /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ minimalTlsVersion?: MinimalTlsVersion; + /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ + customerManagedKeyStatus?: CustomerManagedKeyStatus; + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; } /** The list of new failover policies for the failover priority change. */ @@ -771,7 +777,7 @@ export interface AutoscaleSettings { export interface CreateUpdateOptions { /** Request Units per second. For example, "throughput": 10000. */ throughput?: number; - /** Specifies the Autoscale settings. */ + /** Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. */ autoscaleSettings?: AutoscaleSettings; } @@ -829,6 +835,16 @@ export interface ThroughputSettingsResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly offerReplacePending?: string; + /** + * The offer throughput value to instantly scale up without triggering splits + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instantMaximumThroughput?: string; + /** + * The maximum throughput value or the maximum maxThroughput value (for autoscale) that can be specified + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly softAllowedMaximumThroughput?: string; } /** Cosmos DB provisioned throughput settings object */ @@ -1575,8 +1591,14 @@ export interface ClusterResourceProperties { deallocated?: boolean; /** Whether Cassandra audit logging is enabled */ cassandraAuditLoggingEnabled?: boolean; + /** Type of the cluster. If set to Production, some operations might not be permitted on cluster. */ + clusterType?: ClusterType; /** Error related to resource provisioning. */ provisionError?: CassandraError; + /** Extensions to be added or updated on cluster. */ + extensions?: string[]; + /** List of backup schedules that define when you want to back up your data. */ + backupSchedules?: BackupSchedule[]; } export interface SeedNode { @@ -1600,6 +1622,15 @@ export interface CassandraError { additionalErrorInfo?: string; } +export interface BackupSchedule { + /** The unique identifier of backup schedule. */ + scheduleName?: string; + /** The cron expression that defines when you want to back up your data. */ + cronExpression?: string; + /** The retention period (hours) of the backups. If you want to retain data forever, set retention to 0. */ + retentionInHours?: number; +} + /** The core properties of ARM resources. */ export interface ManagedCassandraARMResourceProperties { /** @@ -1670,9 +1701,18 @@ export interface ListBackups { readonly value?: BackupResource[]; } -export interface BackupResourceProperties { - /** The time this backup was taken, formatted like 2021-01-21T17:35:21 */ - timestamp?: Date; +/** A restorable backup of a Cassandra cluster. */ +export interface BackupResource { + /** The unique identifier of backup. */ + backupId?: string; + /** The current state of the backup. */ + backupState?: BackupState; + /** The time at which the backup process begins. */ + backupStartTimestamp?: Date; + /** The time at which the backup process ends. */ + backupStopTimestamp?: Date; + /** The time at which the backup will expire. */ + backupExpiryTimestamp?: Date; } /** List of managed Cassandra data centers and their properties. */ @@ -1814,6 +1854,8 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa memoryTotalKB?: number; /** A float representing the current system-wide CPU utilization as a percentage. */ cpuUsage?: number; + /** If node has been updated to latest model */ + isLatestModel?: boolean; } /** A list of mongo clusters. */ @@ -2858,6 +2900,11 @@ export interface ContinuousModeProperties { tier?: ContinuousTier; } +/** A base CosmosDB data source/sink */ +export interface BaseCosmosDataTransferDataSourceSink { + remoteAccountName?: string; +} + /** Describes the service response property. */ export interface DataTransferServiceResource { /** Properties for DataTransferServiceResource. */ @@ -3056,6 +3103,12 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { enableBurstCapacity?: boolean; /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ minimalTlsVersion?: MinimalTlsVersion; + /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ + customerManagedKeyStatus?: CustomerManagedKeyStatus; + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; } /** Parameters to create and update Cosmos DB database accounts. */ @@ -3132,6 +3185,12 @@ export interface DatabaseAccountCreateUpdateParameters enableBurstCapacity?: boolean; /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ minimalTlsVersion?: MinimalTlsVersion; + /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ + customerManagedKeyStatus?: CustomerManagedKeyStatus; + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; } /** An Azure Cosmos DB Graph resource. */ @@ -3635,11 +3694,6 @@ export interface DataTransferJobGetResults extends ARMProxyResource { readonly error?: ErrorResponse; } -/** A restorable backup of a Cassandra cluster. */ -export interface BackupResource extends ARMProxyResource { - properties?: BackupResourceProperties; -} - /** A managed Cassandra data center. */ export interface DataCenterResource extends ARMProxyResource { /** Properties of a managed Cassandra data center. */ @@ -3747,25 +3801,28 @@ export interface PhysicalPartitionThroughputInfoResultPropertiesResource /** A CosmosDB Cassandra API data source/sink */ export interface CosmosCassandraDataTransferDataSourceSink - extends DataTransferDataSourceSink { + extends DataTransferDataSourceSink, + BaseCosmosDataTransferDataSourceSink { /** Polymorphic discriminator, which specifies the different types this object can be */ component: "CosmosDBCassandra"; keyspaceName: string; tableName: string; } -/** A CosmosDB Cassandra API data source/sink */ +/** A CosmosDB Mongo API data source/sink */ export interface CosmosMongoDataTransferDataSourceSink - extends DataTransferDataSourceSink { + extends DataTransferDataSourceSink, + BaseCosmosDataTransferDataSourceSink { /** Polymorphic discriminator, which specifies the different types this object can be */ component: "CosmosDBMongo"; databaseName: string; collectionName: string; } -/** A CosmosDB Cassandra API data source/sink */ +/** A CosmosDB No Sql API data source/sink */ export interface CosmosSqlDataTransferDataSourceSink - extends DataTransferDataSourceSink { + extends DataTransferDataSourceSink, + BaseCosmosDataTransferDataSourceSink { /** Polymorphic discriminator, which specifies the different types this object can be */ component: "CosmosDBSql"; databaseName: string; @@ -4622,7 +4679,9 @@ export enum KnownPublicNetworkAccess { /** Enabled */ Enabled = "Enabled", /** Disabled */ - Disabled = "Disabled" + Disabled = "Disabled", + /** SecuredByPerimeter */ + SecuredByPerimeter = "SecuredByPerimeter" } /** @@ -4631,7 +4690,8 @@ export enum KnownPublicNetworkAccess { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Enabled** \ - * **Disabled** + * **Disabled** \ + * **SecuredByPerimeter** */ export type PublicNetworkAccess = string; @@ -4776,6 +4836,69 @@ export enum KnownMinimalTlsVersion { */ export type MinimalTlsVersion = string; +/** Known values of {@link CustomerManagedKeyStatus} that the service accepts. */ +export enum KnownCustomerManagedKeyStatus { + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBServiceIsUnableToObtainTheAADAuthenticationTokenForTheAccountSDefaultIdentityForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureActiveDirectoryTokenAcquisitionError4000 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBServiceIsUnableToObtainTheAADAuthenticationTokenForTheAccountSDefaultIdentityForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureActiveDirectoryTokenAcquisitionError4000 = "Access to your account is currently revoked because the Azure Cosmos DB service is unable to obtain the AAD authentication token for the account's default identity; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-active-directory-token-acquisition-error (4000).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBAccountSKeyVaultKeyURIDoesNotFollowTheExpectedFormatForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideImproperSyntaxDetectedOnTheKeyVaultUriProperty4006 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBAccountSKeyVaultKeyURIDoesNotFollowTheExpectedFormatForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideImproperSyntaxDetectedOnTheKeyVaultUriProperty4006 = "Access to your account is currently revoked because the Azure Cosmos DB account's key vault key URI does not follow the expected format; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#improper-syntax-detected-on-the-key-vault-uri-property (4006).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheCurrentDefaultIdentityNoLongerHasPermissionToTheAssociatedKeyVaultKeyForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideDefaultIdentityIsUnauthorizedToAccessTheAzureKeyVaultKey4002 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheCurrentDefaultIdentityNoLongerHasPermissionToTheAssociatedKeyVaultKeyForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideDefaultIdentityIsUnauthorizedToAccessTheAzureKeyVaultKey4002 = "Access to your account is currently revoked because the current default identity no longer has permission to the associated Key Vault key; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#default-identity-is-unauthorized-to-access-the-azure-key-vault-key (4002).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureKeyVaultDNSNameSpecifiedByTheAccountSKeyvaultkeyuriPropertyCouldNotBeResolvedForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideUnableToResolveTheKeyVaultsDns4009 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureKeyVaultDNSNameSpecifiedByTheAccountSKeyvaultkeyuriPropertyCouldNotBeResolvedForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideUnableToResolveTheKeyVaultsDns4009 = "Access to your account is currently revoked because the Azure Key Vault DNS name specified by the account's keyvaultkeyuri property could not be resolved; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#unable-to-resolve-the-key-vaults-dns (4009).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheCorrespondentKeyIsNotFoundOnTheSpecifiedKeyVaultForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureKeyVaultResourceNotFound4003 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheCorrespondentKeyIsNotFoundOnTheSpecifiedKeyVaultForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureKeyVaultResourceNotFound4003 = "Access to your account is currently revoked because the correspondent key is not found on the specified Key Vault; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4003).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBServiceIsUnableToWrapOrUnwrapTheKeyForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideInternalUnwrappingProcedureError4005 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBServiceIsUnableToWrapOrUnwrapTheKeyForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideInternalUnwrappingProcedureError4005 = "Access to your account is currently revoked because the Azure Cosmos DB service is unable to wrap or unwrap the key; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#internal-unwrapping-procedure-error (4005).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBAccountHasAnUndefinedDefaultIdentityForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideInvalidAzureCosmosDbDefaultIdentity4015 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheAzureCosmosDBAccountHasAnUndefinedDefaultIdentityForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideInvalidAzureCosmosDbDefaultIdentity4015 = "Access to your account is currently revoked because the Azure Cosmos DB account has an undefined default identity; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#invalid-azure-cosmos-db-default-identity (4015).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheAccessRulesAreBlockingOutboundRequestsToTheAzureKeyVaultServiceForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuide4016 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheAccessRulesAreBlockingOutboundRequestsToTheAzureKeyVaultServiceForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuide4016 = "Access to your account is currently revoked because the access rules are blocking outbound requests to the Azure Key Vault service; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide (4016).", + /** AccessToYourAccountIsCurrentlyRevokedBecauseTheCorrespondentAzureKeyVaultWasNotFoundForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureKeyVaultResourceNotFound4017 */ + AccessToYourAccountIsCurrentlyRevokedBecauseTheCorrespondentAzureKeyVaultWasNotFoundForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuideAzureKeyVaultResourceNotFound4017 = "Access to your account is currently revoked because the correspondent Azure Key Vault was not found; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4017).", + /** AccessToYourAccountIsCurrentlyRevokedForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuide */ + AccessToYourAccountIsCurrentlyRevokedForMoreDetailsAboutThisErrorAndHowToRestoreAccessToYourAccountPleaseVisitHttpsLearnMicrosoftComEnUsAzureCosmosDbCmkTroubleshootingGuide = "Access to your account is currently revoked; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide", + /** AccessToTheConfiguredCustomerManagedKeyConfirmed */ + AccessToTheConfiguredCustomerManagedKeyConfirmed = "Access to the configured customer managed key confirmed." +} + +/** + * Defines values for CustomerManagedKeyStatus. \ + * {@link KnownCustomerManagedKeyStatus} can be used interchangeably with CustomerManagedKeyStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Access to your account is currently revoked because the Azure Cosmos DB service is unable to obtain the AAD authentication token for the account's default identity; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#azure-active-directory-token-acquisition-error (4000).** \ + * **Access to your account is currently revoked because the Azure Cosmos DB account's key vault key URI does not follow the expected format; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#improper-syntax-detected-on-the-key-vault-uri-property (4006).** \ + * **Access to your account is currently revoked because the current default identity no longer has permission to the associated Key Vault key; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#default-identity-is-unauthorized-to-access-the-azure-key-vault-key (4002).** \ + * **Access to your account is currently revoked because the Azure Key Vault DNS name specified by the account's keyvaultkeyuri property could not be resolved; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#unable-to-resolve-the-key-vaults-dns (4009).** \ + * **Access to your account is currently revoked because the correspondent key is not found on the specified Key Vault; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4003).** \ + * **Access to your account is currently revoked because the Azure Cosmos DB service is unable to wrap or unwrap the key; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#internal-unwrapping-procedure-error (4005).** \ + * **Access to your account is currently revoked because the Azure Cosmos DB account has an undefined default identity; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#invalid-azure-cosmos-db-default-identity (4015).** \ + * **Access to your account is currently revoked because the access rules are blocking outbound requests to the Azure Key Vault service; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide (4016).** \ + * **Access to your account is currently revoked because the correspondent Azure Key Vault was not found; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4017).** \ + * **Access to your account is currently revoked; for more details about this error and how to restore access to your account please visit https:\//learn.microsoft.com\/en-us\/azure\/cosmos-db\/cmk-troubleshooting-guide** \ + * **Access to the configured customer managed key confirmed.** + */ +export type CustomerManagedKeyStatus = string; + +/** Known values of {@link DefaultPriorityLevel} that the service accepts. */ +export enum KnownDefaultPriorityLevel { + /** High */ + High = "High", + /** Low */ + Low = "Low" +} + +/** + * Defines values for DefaultPriorityLevel. \ + * {@link KnownDefaultPriorityLevel} can be used interchangeably with DefaultPriorityLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **High** \ + * **Low** + */ +export type DefaultPriorityLevel = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -5292,6 +5415,24 @@ export enum KnownAuthenticationMethod { */ export type AuthenticationMethod = string; +/** Known values of {@link ClusterType} that the service accepts. */ +export enum KnownClusterType { + /** Production */ + Production = "Production", + /** NonProduction */ + NonProduction = "NonProduction" +} + +/** + * Defines values for ClusterType. \ + * {@link KnownClusterType} can be used interchangeably with ClusterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Production** \ + * **NonProduction** + */ +export type ClusterType = string; + /** Known values of {@link ManagedCassandraResourceIdentityType} that the service accepts. */ export enum KnownManagedCassandraResourceIdentityType { /** SystemAssigned */ @@ -5310,6 +5451,30 @@ export enum KnownManagedCassandraResourceIdentityType { */ export type ManagedCassandraResourceIdentityType = string; +/** Known values of {@link BackupState} that the service accepts. */ +export enum KnownBackupState { + /** Initiated */ + Initiated = "Initiated", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for BackupState. \ + * {@link KnownBackupState} can be used interchangeably with BackupState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Initiated** \ + * **InProgress** \ + * **Succeeded** \ + * **Failed** + */ +export type BackupState = string; + /** Known values of {@link ConnectionState} that the service accepts. */ export enum KnownConnectionState { /** Unknown */ @@ -7419,6 +7584,8 @@ export type CassandraClustersGetBackupResponse = BackupResource; /** Optional parameters. */ export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { + /** Force to deallocate a cluster of Cluster Type Production. Force to deallocate a cluster of Cluster Type Production might cause data loss */ + xMsForceDeallocate?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index cbe5a40cd9b2..a9a49bc007f8 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -960,6 +960,24 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { type: { name: "String" } + }, + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String" + } + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", + type: { + name: "Boolean" + } + }, + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", + type: { + name: "String" + } } } } @@ -1871,6 +1889,20 @@ export const ThroughputSettingsResource: coreClient.CompositeMapper = { type: { name: "String" } + }, + instantMaximumThroughput: { + serializedName: "instantMaximumThroughput", + readOnly: true, + type: { + name: "String" + } + }, + softAllowedMaximumThroughput: { + serializedName: "softAllowedMaximumThroughput", + readOnly: true, + type: { + name: "String" + } } } } @@ -3922,12 +3954,41 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { name: "Boolean" } }, + clusterType: { + serializedName: "clusterType", + type: { + name: "String" + } + }, provisionError: { serializedName: "provisionError", type: { name: "Composite", className: "CassandraError" } + }, + extensions: { + serializedName: "extensions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + backupSchedules: { + serializedName: "backupSchedules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupSchedule" + } + } + } } } } @@ -3996,6 +4057,33 @@ export const CassandraError: coreClient.CompositeMapper = { } }; +export const BackupSchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupSchedule", + modelProperties: { + scheduleName: { + serializedName: "scheduleName", + type: { + name: "String" + } + }, + cronExpression: { + serializedName: "cronExpression", + type: { + name: "String" + } + }, + retentionInHours: { + serializedName: "retentionInHours", + type: { + name: "Number" + } + } + } + } +}; + export const ManagedCassandraARMResourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4154,13 +4242,37 @@ export const ListBackups: coreClient.CompositeMapper = { } }; -export const BackupResourceProperties: coreClient.CompositeMapper = { +export const BackupResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupResourceProperties", + className: "BackupResource", modelProperties: { - timestamp: { - serializedName: "timestamp", + backupId: { + serializedName: "backupId", + type: { + name: "String" + } + }, + backupState: { + serializedName: "backupState", + type: { + name: "String" + } + }, + backupStartTimestamp: { + serializedName: "backupStartTimestamp", + type: { + name: "DateTime" + } + }, + backupStopTimestamp: { + serializedName: "backupStopTimestamp", + type: { + name: "DateTime" + } + }, + backupExpiryTimestamp: { + serializedName: "backupExpiryTimestamp", type: { name: "DateTime" } @@ -4639,6 +4751,12 @@ export const ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatace type: { name: "Number" } + }, + isLatestModel: { + serializedName: "isLatestModel", + type: { + name: "Boolean" + } } } } @@ -6844,6 +6962,21 @@ export const ContinuousModeProperties: coreClient.CompositeMapper = { } }; +export const BaseCosmosDataTransferDataSourceSink: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BaseCosmosDataTransferDataSourceSink", + modelProperties: { + remoteAccountName: { + serializedName: "remoteAccountName", + type: { + name: "String" + } + } + } + } +}; + export const DataTransferServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7391,6 +7524,24 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { type: { name: "String" } + }, + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String" + } + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", + type: { + name: "Boolean" + } + }, + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", + type: { + name: "String" + } } } } @@ -7652,6 +7803,24 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = type: { name: "String" } + }, + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String" + } + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", + type: { + name: "Boolean" + } + }, + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", + type: { + name: "String" + } } } } @@ -8997,23 +9166,6 @@ export const DataTransferJobGetResults: coreClient.CompositeMapper = { } }; -export const BackupResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackupResource", - modelProperties: { - ...ARMProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "BackupResourceProperties" - } - } - } - } -}; - export const DataCenterResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -9322,6 +9474,7 @@ export const CosmosCassandraDataTransferDataSourceSink: coreClient.CompositeMapp DataTransferDataSourceSink.type.polymorphicDiscriminator, modelProperties: { ...DataTransferDataSourceSink.type.modelProperties, + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, keyspaceName: { serializedName: "keyspaceName", required: true, @@ -9350,6 +9503,7 @@ export const CosmosMongoDataTransferDataSourceSink: coreClient.CompositeMapper = DataTransferDataSourceSink.type.polymorphicDiscriminator, modelProperties: { ...DataTransferDataSourceSink.type.modelProperties, + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, databaseName: { serializedName: "databaseName", required: true, @@ -9378,6 +9532,7 @@ export const CosmosSqlDataTransferDataSourceSink: coreClient.CompositeMapper = { DataTransferDataSourceSink.type.polymorphicDiscriminator, modelProperties: { ...DataTransferDataSourceSink.type.modelProperties, + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, databaseName: { serializedName: "databaseName", required: true, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index c05f5770553b..c65c02a1e263 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -126,7 +126,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-03-15-preview", + defaultValue: "2023-09-15-preview", isConstant: true, serializedName: "api-version", type: { @@ -630,6 +630,16 @@ export const backupId: OperationURLParameter = { } }; +export const xMsForceDeallocate: OperationParameter = { + parameterPath: ["options", "xMsForceDeallocate"], + mapper: { + serializedName: "x-ms-force-deallocate", + type: { + name: "Boolean" + } + } +}; + export const dataCenterName: OperationURLParameter = { parameterPath: "dataCenterName", mapper: { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts index fcb1d9561a58..cb3372566e22 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts @@ -1102,7 +1102,7 @@ const deallocateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.clusterName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.xMsForceDeallocate], serializer }; const startOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts b/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json index bbcdce662fee..3e6ae96443f3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-cosmosdb": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"