diff --git a/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md b/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md index ba0ef7b6c8ee..048c72de7403 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/CHANGELOG.md @@ -1,49 +1,23 @@ # Release History - -## 2.3.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.3.0-beta.1 (2023-03-27) + +## 3.0.0 (2023-09-05) **Features** - - Added operation group Skus - Added operation Databases.beginFlush - Added operation Databases.beginFlushAndWait - - Added Interface Capability - - Added Interface ClusterPropertiesEncryption - - Added Interface ClusterPropertiesEncryptionCustomerManagedKeyEncryption - - Added Interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity + - Added operation PrivateEndpointConnections.beginDelete + - Added operation PrivateEndpointConnections.beginDeleteAndWait - Added Interface DatabasesFlushHeaders - Added Interface DatabasesFlushOptionalParams - Added Interface FlushParameters - - Added Interface LocationInfo - - Added Interface ManagedServiceIdentity - - Added Interface RegionSkuDetail - - Added Interface RegionSkuDetails - - Added Interface SkuDetail - - Added Interface SkusListOptionalParams - - Added Interface SystemData - - Added Interface UserAssignedIdentity - - Added Type Alias CmkIdentityType - - Added Type Alias CreatedByType - - Added Type Alias ManagedServiceIdentityType - - Added Type Alias SkusListResponse - - Interface Cluster has a new optional parameter encryption - - Interface Cluster has a new optional parameter identity - - Interface ClusterUpdate has a new optional parameter encryption - - Interface ClusterUpdate has a new optional parameter identity - - Interface Resource has a new optional parameter systemData - - Added Enum KnownCmkIdentityType - - Added Enum KnownCreatedByType - - Added Enum KnownManagedServiceIdentityType + - Added Interface PrivateEndpointConnectionsDeleteHeaders + - Interface PrivateEndpointConnectionsDeleteOptionalParams has a new optional parameter resumeFrom + - Interface PrivateEndpointConnectionsDeleteOptionalParams has a new optional parameter updateIntervalInMs + +**Breaking Changes** + + - Removed operation PrivateEndpointConnections.delete ## 2.2.0 (2022-12-07) diff --git a/sdk/redisenterprise/arm-redisenterprisecache/README.md b/sdk/redisenterprise/arm-redisenterprisecache/README.md index dafc2f91a1b8..06757599b3f5 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/README.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/README.md @@ -6,7 +6,7 @@ REST API for managing Redis Enterprise resources in Azure. [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-redisenterprisecache) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/redisenterprise/arm-redisenterprisecache/_meta.json b/sdk/redisenterprise/arm-redisenterprisecache/_meta.json index c4bd8b66a7c3..b1db53ecc099 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/_meta.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/_meta.json @@ -1,8 +1,8 @@ { - "commit": "72484575017c59f6eac35b75806055b76c569b19", + "commit": "60818fc41949189bba28772e764d7633c4bb35b9", "readme": "specification/redisenterprise/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\\redisenterprise\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --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/redisenterprise/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.6.2", - "use": "@autorest/typescript@6.0.0-rc.10" + "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/redisenterprise/arm-redisenterprisecache/package.json b/sdk/redisenterprise/arm-redisenterprisecache/package.json index b936812baac2..28edb5f5d077 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/package.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for RedisEnterpriseManagementClient.", - "version": "2.3.0-beta.2", + "version": "3.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@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": [ @@ -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", @@ -112,13 +112,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-redisenterprisecache?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache" +} \ No newline at end of file diff --git a/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md b/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md index 34b51a7a3031..f061eb206731 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md +++ b/sdk/redisenterprise/arm-redisenterprisecache/review/arm-redisenterprisecache.api.md @@ -25,17 +25,9 @@ export type ActionType = string; // @public export type AofFrequency = string; -// @public -export interface Capability { - name?: string; - value?: boolean; -} - // @public export interface Cluster extends TrackedResource { - encryption?: ClusterPropertiesEncryption; readonly hostName?: string; - identity?: ManagedServiceIdentity; minimumTlsVersion?: TlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -54,28 +46,9 @@ export interface ClusterList { value?: Cluster[]; } -// @public -export interface ClusterPropertiesEncryption { - customerManagedKeyEncryption?: ClusterPropertiesEncryptionCustomerManagedKeyEncryption; -} - -// @public -export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryption { - keyEncryptionKeyIdentity?: ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity; - keyEncryptionKeyUrl?: string; -} - -// @public -export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity { - identityType?: CmkIdentityType; - userAssignedIdentityResourceId?: string; -} - // @public export interface ClusterUpdate { - encryption?: ClusterPropertiesEncryption; readonly hostName?: string; - identity?: ManagedServiceIdentity; minimumTlsVersion?: TlsVersion; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -87,12 +60,6 @@ export interface ClusterUpdate { }; } -// @public -export type CmkIdentityType = string; - -// @public -export type CreatedByType = string; - // @public export interface Database extends ProxyResource { clientProtocol?: Protocol; @@ -308,20 +275,6 @@ export enum KnownClusteringPolicy { OSSCluster = "OSSCluster" } -// @public -export enum KnownCmkIdentityType { - SystemAssignedIdentity = "systemAssignedIdentity", - UserAssignedIdentity = "userAssignedIdentity" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - // @public export enum KnownEvictionPolicy { AllKeysLFU = "AllKeysLFU", @@ -343,14 +296,6 @@ export enum KnownLinkState { Unlinking = "Unlinking" } -// @public -export enum KnownManagedServiceIdentityType { - None = "None", - SystemAssigned = "SystemAssigned", - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", - UserAssigned = "UserAssigned" -} - // @public export enum KnownOrigin { System = "system", @@ -439,25 +384,6 @@ export interface LinkedDatabase { // @public export type LinkState = string; -// @public -export interface LocationInfo { - capabilities?: Capability[]; - location?: string; -} - -// @public -export interface ManagedServiceIdentity { - readonly principalId?: string; - readonly tenantId?: string; - type: ManagedServiceIdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentity; - }; -} - -// @public -export type ManagedServiceIdentityType = string; - // @public export interface Module { args?: string; @@ -562,15 +488,24 @@ export type PrivateEndpointConnectionProvisioningState = string; // @public export interface PrivateEndpointConnections { + beginDelete(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; beginPut(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise, PrivateEndpointConnectionsPutResponse>>; beginPutAndWait(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise; - delete(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; list(resourceGroupName: string, clusterName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface PrivateEndpointConnectionsDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + // @public export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -726,8 +661,6 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { // (undocumented) redisEnterprise: RedisEnterprise; // (undocumented) - skus: Skus; - // (undocumented) subscriptionId: string; } @@ -752,23 +685,10 @@ export interface RegenerateKeyParameters { keyType: AccessKeyType; } -// @public -export interface RegionSkuDetail { - locationInfo?: LocationInfo; - resourceType?: string; - skuDetails?: SkuDetail; -} - -// @public -export interface RegionSkuDetails { - value?: RegionSkuDetail[]; -} - // @public export interface Resource { readonly id?: string; readonly name?: string; - readonly systemData?: SystemData; readonly type?: string; } @@ -781,36 +701,9 @@ export interface Sku { name: SkuName; } -// @public -export interface SkuDetail { - name?: SkuName; -} - // @public export type SkuName = string; -// @public -export interface Skus { - list(location: string, options?: SkusListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SkusListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SkusListResponse = RegionSkuDetails; - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - // @public export type TlsVersion = string; @@ -822,12 +715,6 @@ export interface TrackedResource extends Resource { }; } -// @public -export interface UserAssignedIdentity { - readonly clientId?: string; - readonly principalId?: string; -} - // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts index 46e2213020cf..a9046effd6e3 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts @@ -145,60 +145,6 @@ export interface Sku { capacity?: number; } -/** Managed service identity (system assigned and/or user assigned identities) */ -export interface ManagedServiceIdentity { - /** - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ - type: ManagedServiceIdentityType; - /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; -} - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - -/** Encryption-at-rest configuration for the cluster. */ -export interface ClusterPropertiesEncryption { - /** All Customer-managed key encryption properties for the resource. Set this to an empty object to use Microsoft-managed key encryption. */ - customerManagedKeyEncryption?: ClusterPropertiesEncryptionCustomerManagedKeyEncryption; -} - -/** All Customer-managed key encryption properties for the resource. Set this to an empty object to use Microsoft-managed key encryption. */ -export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryption { - /** All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. */ - keyEncryptionKeyIdentity?: ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity; - /** Key encryption key Url, versioned only. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 */ - keyEncryptionKeyUrl?: string; -} - -/** All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. */ -export interface ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity { - /** User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions//resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. */ - userAssignedIdentityResourceId?: string; - /** Only userAssignedIdentity is supported in this API version; other types may be supported in the future */ - identityType?: CmkIdentityType; -} - /** The Private Endpoint resource. */ export interface PrivateEndpoint { /** @@ -235,41 +181,16 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; } /** A partial update to the RedisEnterprise cluster */ export interface ClusterUpdate { /** The SKU to create, which affects price, performance, and features. */ sku?: Sku; - /** The identity of the resource. */ - identity?: ManagedServiceIdentity; /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The minimum TLS version for the cluster to support, e.g. '1.2' */ minimumTlsVersion?: TlsVersion; - /** Encryption-at-rest configuration for the cluster. */ - encryption?: ClusterPropertiesEncryption; /** * DNS name of the cluster endpoint * NOTE: This property will not be serialized. It can only be populated by the server. @@ -441,50 +362,12 @@ export interface ForceUnlinkParameters { ids: string[]; } -/** Parameters for a Redis Enterprise active geo-replication flush operation. */ +/** Parameters for a Redis Enterprise active geo-replication flush operation */ export interface FlushParameters { - /** The resource identifiers of all the other database resources in the georeplication group to be flushed */ + /** The identifiers of all the other database resources in the georeplication group to be flushed. */ ids?: string[]; } -/** List of details about all the available SKUs */ -export interface RegionSkuDetails { - /** List of Sku Detail */ - value?: RegionSkuDetail[]; -} - -/** Details about the location requested and the available skus in the location */ -export interface RegionSkuDetail { - /** Resource type which has the SKU, such as Microsoft.Cache/redisEnterprise */ - resourceType?: string; - /** Details about location and its capabilities */ - locationInfo?: LocationInfo; - /** Details about available skus */ - skuDetails?: SkuDetail; -} - -/** Information about location (for example: features that it supports) */ -export interface LocationInfo { - /** Location name */ - location?: string; - /** List of capabilities */ - capabilities?: Capability[]; -} - -/** Information about the features the location supports */ -export interface Capability { - /** Feature name */ - name?: string; - /** Indicates whether feature is supported or not */ - value?: boolean; -} - -/** Information about Sku */ -export interface SkuDetail { - /** The type of RedisEnterprise cluster to deploy. Possible values: (Enterprise_E10, EnterpriseFlash_F300 etc.) */ - name?: SkuName; -} - /** The Private Endpoint Connection resource. */ export interface PrivateEndpointConnection extends Resource { /** The resource of private end point. */ @@ -531,12 +414,8 @@ export interface Cluster extends TrackedResource { sku: Sku; /** The Availability Zones where this cluster will be deployed. */ zones?: string[]; - /** The identity of the resource. */ - identity?: ManagedServiceIdentity; /** The minimum TLS version for the cluster to support, e.g. '1.2' */ minimumTlsVersion?: TlsVersion; - /** Encryption-at-rest configuration for the cluster. */ - encryption?: ClusterPropertiesEncryption; /** * DNS name of the cluster endpoint * NOTE: This property will not be serialized. It can only be populated by the server. @@ -600,6 +479,14 @@ export interface DatabasesFlushHeaders { azureAsyncOperation?: string; } +/** Defines headers for PrivateEndpointConnections_delete operation. */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** Location URI to poll for result */ + location?: string; + /** URI to poll for the operation status */ + azureAsyncOperation?: string; +} + /** Known values of {@link Origin} that the service accepts. */ export enum KnownOrigin { /** User */ @@ -669,30 +556,6 @@ export enum KnownSkuName { */ export type SkuName = string; -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned" -} - -/** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned, UserAssigned** - */ -export type ManagedServiceIdentityType = string; - /** Known values of {@link TlsVersion} that the service accepts. */ export enum KnownTlsVersion { /** One0 */ @@ -714,24 +577,6 @@ export enum KnownTlsVersion { */ export type TlsVersion = string; -/** Known values of {@link CmkIdentityType} that the service accepts. */ -export enum KnownCmkIdentityType { - /** SystemAssignedIdentity */ - SystemAssignedIdentity = "systemAssignedIdentity", - /** UserAssignedIdentity */ - UserAssignedIdentity = "userAssignedIdentity" -} - -/** - * Defines values for CmkIdentityType. \ - * {@link KnownCmkIdentityType} can be used interchangeably with CmkIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **systemAssignedIdentity** \ - * **userAssignedIdentity** - */ -export type CmkIdentityType = string; - /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { /** Succeeded */ @@ -855,30 +700,6 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - /** Known values of {@link Protocol} that the service accepts. */ export enum KnownProtocol { /** Encrypted */ @@ -1245,7 +1066,12 @@ export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionsDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** 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. */ + resumeFrom?: string; +} /** Optional parameters. */ export interface PrivateLinkResourcesListByClusterOptionalParams @@ -1254,12 +1080,6 @@ export interface PrivateLinkResourcesListByClusterOptionalParams /** Contains response data for the listByCluster operation. */ export type PrivateLinkResourcesListByClusterResponse = PrivateLinkResourceListResult; -/** Optional parameters. */ -export interface SkusListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SkusListResponse = RegionSkuDetails; - /** Optional parameters. */ export interface RedisEnterpriseManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts index dadd34de972f..5f3942c5cd4a 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts @@ -282,129 +282,6 @@ export const Sku: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedServiceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "Uuid" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "String" - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } - } - } - } - } -}; - -export const UserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "Uuid" - } - } - } - } -}; - -export const ClusterPropertiesEncryption: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPropertiesEncryption", - modelProperties: { - customerManagedKeyEncryption: { - serializedName: "customerManagedKeyEncryption", - type: { - name: "Composite", - className: "ClusterPropertiesEncryptionCustomerManagedKeyEncryption" - } - } - } - } -}; - -export const ClusterPropertiesEncryptionCustomerManagedKeyEncryption: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPropertiesEncryptionCustomerManagedKeyEncryption", - modelProperties: { - keyEncryptionKeyIdentity: { - serializedName: "keyEncryptionKeyIdentity", - type: { - name: "Composite", - className: - "ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity" - } - }, - keyEncryptionKeyUrl: { - serializedName: "keyEncryptionKeyUrl", - type: { - name: "String" - } - } - } - } -}; - -export const ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: - "ClusterPropertiesEncryptionCustomerManagedKeyEncryptionKeyIdentity", - modelProperties: { - userAssignedIdentityResourceId: { - serializedName: "userAssignedIdentityResourceId", - type: { - name: "String" - } - }, - identityType: { - serializedName: "identityType", - type: { - name: "String" - } - } - } - } -}; - export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", @@ -473,58 +350,6 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - } - } - } -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String" - } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } } } } @@ -542,13 +367,6 @@ export const ClusterUpdate: coreClient.CompositeMapper = { className: "Sku" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, tags: { serializedName: "tags", type: { @@ -562,13 +380,6 @@ export const ClusterUpdate: coreClient.CompositeMapper = { name: "String" } }, - encryption: { - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "ClusterPropertiesEncryption" - } - }, hostName: { serializedName: "properties.hostName", readOnly: true, @@ -1014,119 +825,6 @@ export const FlushParameters: coreClient.CompositeMapper = { } }; -export const RegionSkuDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RegionSkuDetails", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegionSkuDetail" - } - } - } - } - } - } -}; - -export const RegionSkuDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RegionSkuDetail", - modelProperties: { - resourceType: { - serializedName: "resourceType", - type: { - name: "String" - } - }, - locationInfo: { - serializedName: "locationInfo", - type: { - name: "Composite", - className: "LocationInfo" - } - }, - skuDetails: { - serializedName: "skuDetails", - type: { - name: "Composite", - className: "SkuDetail" - } - } - } - } -}; - -export const LocationInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocationInfo", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - }, - capabilities: { - serializedName: "capabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Capability" - } - } - } - } - } - } -}; - -export const Capability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Capability", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "Boolean" - } - } - } - } -}; - -export const SkuDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkuDetail", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1256,26 +954,12 @@ export const Cluster: coreClient.CompositeMapper = { } } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, minimumTlsVersion: { serializedName: "properties.minimumTlsVersion", type: { name: "String" } }, - encryption: { - serializedName: "properties.encryption", - type: { - name: "Composite", - className: "ClusterPropertiesEncryption" - } - }, hostName: { serializedName: "properties.hostName", readOnly: true, @@ -1415,3 +1099,24 @@ export const DatabasesFlushHeaders: coreClient.CompositeMapper = { } } }; + +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts index 62beffee0ad5..be2309544566 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts @@ -51,7 +51,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-03-01-preview", + defaultValue: "2023-07-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts index ccda045aff72..481d9ba80959 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts @@ -578,7 +578,7 @@ export class DatabasesImpl implements Databases { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts index 408ae886b779..cb8946c7cbcc 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/index.ts @@ -12,4 +12,3 @@ export * from "./redisEnterprise"; export * from "./databases"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; -export * from "./skus"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts index bdb956040c53..4651141c1206 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/privateEndpointConnections.ts @@ -261,21 +261,91 @@ export class PrivateEndpointConnectionsImpl * Azure resource * @param options The options parameters. */ - delete( + async beginDelete( resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, privateEndpointConnectionName, options }, - deleteOperationSpec + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the RedisEnterprise cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + clusterName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + clusterName, + privateEndpointConnectionName, + options ); + return poller.pollUntilDone(); } } // Operation Specifications @@ -366,6 +436,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { httpMethod: "DELETE", responses: { 200: {}, + 201: {}, + 202: {}, 204: {}, default: { bodyMapper: Mappers.ErrorResponse diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/skus.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operations/skus.ts deleted file mode 100644 index 4319549326a6..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operations/skus.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Skus } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { RedisEnterpriseManagementClient } from "../redisEnterpriseManagementClient"; -import { - RegionSkuDetail, - SkusListOptionalParams, - SkusListResponse -} from "../models"; - -/// -/** Class containing Skus operations. */ -export class SkusImpl implements Skus { - private readonly client: RedisEnterpriseManagementClient; - - /** - * Initialize a new instance of the class Skus class. - * @param client Reference to the service client - */ - constructor(client: RedisEnterpriseManagementClient) { - this.client = client; - } - - /** - * Gets information about skus in specified location for the given subscription id - * @param location The name of Azure region. - * @param options The options parameters. - */ - public list( - location: string, - options?: SkusListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(location, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(location, options, settings); - } - }; - } - - private async *listPagingPage( - location: string, - options?: SkusListOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: SkusListResponse; - result = await this._list(location, options); - yield result.value || []; - } - - private async *listPagingAll( - location: string, - options?: SkusListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(location, options)) { - yield* page; - } - } - - /** - * Gets information about skus in specified location for the given subscription id - * @param location The name of Azure region. - * @param options The options parameters. - */ - private _list( - location: string, - options?: SkusListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.RegionSkuDetails - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.location, - Parameters.subscriptionId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts index 408ae886b779..cb8946c7cbcc 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/index.ts @@ -12,4 +12,3 @@ export * from "./redisEnterprise"; export * from "./databases"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; -export * from "./skus"; diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts index d1bbfe987bd8..36d2c2214a4f 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/privateEndpointConnections.ts @@ -93,7 +93,21 @@ export interface PrivateEndpointConnections { * Azure resource * @param options The options parameters. */ - delete( + beginDelete( + resourceGroupName: string, + clusterName: string, + privateEndpointConnectionName: string, + options?: PrivateEndpointConnectionsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the RedisEnterprise cluster. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource + * @param options The options parameters. + */ + beginDeleteAndWait( resourceGroupName: string, clusterName: string, privateEndpointConnectionName: string, diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/skus.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/skus.ts deleted file mode 100644 index 34c27cc834a1..000000000000 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/operationsInterfaces/skus.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { RegionSkuDetail, SkusListOptionalParams } from "../models"; - -/// -/** Interface representing a Skus. */ -export interface Skus { - /** - * Gets information about skus in specified location for the given subscription id - * @param location The name of Azure region. - * @param options The options parameters. - */ - list( - location: string, - options?: SkusListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts index e1bfcf4dae7c..9c136b54c076 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts +++ b/sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClient.ts @@ -20,8 +20,7 @@ import { RedisEnterpriseImpl, DatabasesImpl, PrivateEndpointConnectionsImpl, - PrivateLinkResourcesImpl, - SkusImpl + PrivateLinkResourcesImpl } from "./operations"; import { Operations, @@ -29,8 +28,7 @@ import { RedisEnterprise, Databases, PrivateEndpointConnections, - PrivateLinkResources, - Skus + PrivateLinkResources } from "./operationsInterfaces"; import { RedisEnterpriseManagementClientOptionalParams } from "./models"; @@ -66,7 +64,7 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-redisenterprisecache/2.3.0-beta.2`; + const packageDetails = `azsdk-js-arm-redisenterprisecache/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -119,14 +117,13 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-03-01-preview"; + this.apiVersion = options.apiVersion || "2023-07-01"; this.operations = new OperationsImpl(this); this.operationsStatus = new OperationsStatusImpl(this); this.redisEnterprise = new RedisEnterpriseImpl(this); this.databases = new DatabasesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); - this.skus = new SkusImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -164,5 +161,4 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient { databases: Databases; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; - skus: Skus; } diff --git a/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json b/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json index b929ba4f3f0f..3e6ae96443f3 100644 --- a/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json +++ b/sdk/redisenterprise/arm-redisenterprisecache/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-redisenterprisecache": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"