From 985064d06350db7e08bb0d089004553906d02a81 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 11 Nov 2022 20:09:38 +0000 Subject: [PATCH] CodeGen from PR 21500 in Azure/azure-rest-api-specs Merge fb7cb60f0179a83aabc5fa0d6081e3806a47b196 into 7f67f12515a8d572569c4257aebed850240598b9 --- sdk/storage/arm-storage/CHANGELOG.md | 30 ++++--- sdk/storage/arm-storage/_meta.json | 10 +-- sdk/storage/arm-storage/package.json | 14 +-- .../arm-storage/review/arm-storage.api.md | 22 +++++ sdk/storage/arm-storage/src/models/index.ts | 87 ++++++++++++++----- sdk/storage/arm-storage/src/models/mappers.ts | 42 +++++++++ .../arm-storage/src/models/parameters.ts | 64 +++++++++++--- .../src/operations/blobContainers.ts | 8 +- .../src/operations/encryptionScopes.ts | 14 ++- .../arm-storage/src/operations/fileShares.ts | 6 +- .../arm-storage/src/operations/queue.ts | 8 +- .../src/operations/storageAccounts.ts | 28 ++++-- .../operationsInterfaces/storageAccounts.ts | 26 ++++-- .../src/storageManagementClient.ts | 4 +- sdk/storage/arm-storage/test/sampleTest.ts | 43 +++++++++ sdk/storage/arm-storage/tsconfig.json | 10 +-- 16 files changed, 320 insertions(+), 96 deletions(-) create mode 100644 sdk/storage/arm-storage/test/sampleTest.ts diff --git a/sdk/storage/arm-storage/CHANGELOG.md b/sdk/storage/arm-storage/CHANGELOG.md index 5508f49e2d3e..1e3c431aadd2 100644 --- a/sdk/storage/arm-storage/CHANGELOG.md +++ b/sdk/storage/arm-storage/CHANGELOG.md @@ -1,15 +1,25 @@ # Release History + +## 18.1.0 (2022-11-11) + +**Features** -## 18.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Type Alias ListEncryptionScopesInclude + - Interface EncryptionScopesListNextOptionalParams has a new optional parameter filter + - Interface EncryptionScopesListNextOptionalParams has a new optional parameter include + - Interface EncryptionScopesListNextOptionalParams has a new optional parameter maxpagesize + - Interface EncryptionScopesListOptionalParams has a new optional parameter filter + - Interface EncryptionScopesListOptionalParams has a new optional parameter include + - Interface EncryptionScopesListOptionalParams has a new optional parameter maxpagesize + - Interface ManagementPolicyBaseBlob has a new optional parameter tierToCold + - Interface ManagementPolicyBaseBlob has a new optional parameter tierToHot + - Interface ManagementPolicySnapShot has a new optional parameter tierToCold + - Interface ManagementPolicySnapShot has a new optional parameter tierToHot + - Interface ManagementPolicyVersion has a new optional parameter tierToCold + - Interface ManagementPolicyVersion has a new optional parameter tierToHot + - Added Enum KnownListEncryptionScopesInclude + + ## 18.0.0 (2022-08-16) **Features** diff --git a/sdk/storage/arm-storage/_meta.json b/sdk/storage/arm-storage/_meta.json index 28dcc5b5eb55..e5669ca2c693 100644 --- a/sdk/storage/arm-storage/_meta.json +++ b/sdk/storage/arm-storage/_meta.json @@ -1,8 +1,8 @@ { - "commit": "3ccabd5f8eb0b3db0c18d21ade484e42ebd1f554", + "commit": "16d5f13e2bbfb60b08951742d1ce35becbbcab3d", "readme": "specification/storage/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --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\\storage\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220727.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --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/storage/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.1", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" +} \ No newline at end of file diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index dfa56c5dd412..b5774f240cdc 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageManagementClient.", - "version": "18.0.1", + "version": "18.1.0", "engines": { "node": ">=14.0.0" }, @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storage?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/storage/arm-storage/review/arm-storage.api.md b/sdk/storage/arm-storage/review/arm-storage.api.md index 79ffeaff05ee..22a88b785b4a 100644 --- a/sdk/storage/arm-storage/review/arm-storage.api.md +++ b/sdk/storage/arm-storage/review/arm-storage.api.md @@ -604,6 +604,9 @@ export type EncryptionScopesGetResponse = EncryptionScope; // @public export interface EncryptionScopesListNextOptionalParams extends coreClient.OperationOptions { + filter?: string; + include?: ListEncryptionScopesInclude; + maxpagesize?: number; } // @public @@ -611,6 +614,9 @@ export type EncryptionScopesListNextResponse = EncryptionScopeListResult; // @public export interface EncryptionScopesListOptionalParams extends coreClient.OperationOptions { + filter?: string; + include?: ListEncryptionScopesInclude; + maxpagesize?: number; } // @public @@ -1190,6 +1196,13 @@ export enum KnownListContainersInclude { Deleted = "deleted" } +// @public +export enum KnownListEncryptionScopesInclude { + All = "All", + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownManagementPolicyName { Default = "default" @@ -1474,6 +1487,9 @@ export interface ListContainerItems { // @public export type ListContainersInclude = string; +// @public +export type ListEncryptionScopesInclude = string; + // @public (undocumented) export interface ListQueue extends Resource { metadata?: { @@ -1628,7 +1644,9 @@ export interface ManagementPolicyBaseBlob { delete?: DateAfterModification; enableAutoTierToHotFromCool?: boolean; tierToArchive?: DateAfterModification; + tierToCold?: DateAfterModification; tierToCool?: DateAfterModification; + tierToHot?: DateAfterModification; } // @public @@ -1664,14 +1682,18 @@ export interface ManagementPolicySchema { export interface ManagementPolicySnapShot { delete?: DateAfterCreation; tierToArchive?: DateAfterCreation; + tierToCold?: DateAfterCreation; tierToCool?: DateAfterCreation; + tierToHot?: DateAfterCreation; } // @public export interface ManagementPolicyVersion { delete?: DateAfterCreation; tierToArchive?: DateAfterCreation; + tierToCold?: DateAfterCreation; tierToCool?: DateAfterCreation; + tierToHot?: DateAfterCreation; } // @public diff --git a/sdk/storage/arm-storage/src/models/index.ts b/sdk/storage/arm-storage/src/models/index.ts index 987a9ceb41e7..a744442d9d61 100644 --- a/sdk/storage/arm-storage/src/models/index.ts +++ b/sdk/storage/arm-storage/src/models/index.ts @@ -993,10 +993,14 @@ export interface ManagementPolicyAction { /** Management policy action for base blob. */ export interface ManagementPolicyBaseBlob { - /** The function to tier blobs to cool storage. Support blobs currently at Hot tier */ + /** The function to tier blobs to cool storage. */ tierToCool?: DateAfterModification; - /** The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier */ + /** The function to tier blobs to archive storage. */ tierToArchive?: DateAfterModification; + /** The function to tier blobs to cold storage. */ + tierToCold?: DateAfterModification; + /** The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts */ + tierToHot?: DateAfterModification; /** The function to delete the blob */ delete?: DateAfterModification; /** This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan. */ @@ -1017,10 +1021,14 @@ export interface DateAfterModification { /** Management policy action for snapshot. */ export interface ManagementPolicySnapShot { - /** The function to tier blob snapshot to cool storage. Support blob snapshot currently at Hot tier */ + /** The function to tier blob snapshot to cool storage. */ tierToCool?: DateAfterCreation; - /** The function to tier blob snapshot to archive storage. Support blob snapshot currently at Hot or Cool tier */ + /** The function to tier blob snapshot to archive storage. */ tierToArchive?: DateAfterCreation; + /** The function to tier blobs to cold storage. */ + tierToCold?: DateAfterCreation; + /** The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts */ + tierToHot?: DateAfterCreation; /** The function to delete the blob snapshot */ delete?: DateAfterCreation; } @@ -1035,10 +1043,14 @@ export interface DateAfterCreation { /** Management policy action for blob version. */ export interface ManagementPolicyVersion { - /** The function to tier blob version to cool storage. Support blob version currently at Hot tier */ + /** The function to tier blob version to cool storage. */ tierToCool?: DateAfterCreation; - /** The function to tier blob version to archive storage. Support blob version currently at Hot or Cool tier */ + /** The function to tier blob version to archive storage. */ tierToArchive?: DateAfterCreation; + /** The function to tier blobs to cold storage. */ + tierToCold?: DateAfterCreation; + /** The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts */ + tierToHot?: DateAfterCreation; /** The function to delete the blob version */ delete?: DateAfterCreation; } @@ -3259,6 +3271,27 @@ export enum KnownEncryptionScopeState { */ export type EncryptionScopeState = string; +/** Known values of {@link ListEncryptionScopesInclude} that the service accepts. */ +export enum KnownListEncryptionScopesInclude { + /** All */ + All = "All", + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for ListEncryptionScopesInclude. \ + * {@link KnownListEncryptionScopesInclude} can be used interchangeably with ListEncryptionScopesInclude, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All** \ + * **Enabled** \ + * **Disabled** + */ +export type ListEncryptionScopesInclude = string; + /** Known values of {@link AllowedMethods} that the service accepts. */ export enum KnownAllowedMethods { /** Delete */ @@ -3932,14 +3965,28 @@ export type EncryptionScopesGetResponse = EncryptionScope; /** Optional parameters. */ export interface EncryptionScopesListOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Optional, specifies the maximum number of encryption scopes that will be included in the list response. */ + maxpagesize?: number; + /** Optional. When specified, only encryption scope names starting with the filter will be listed. */ + filter?: string; + /** Optional, when specified, will list encryption scopes with the specific state. Defaults to All */ + include?: ListEncryptionScopesInclude; +} /** Contains response data for the list operation. */ export type EncryptionScopesListResponse = EncryptionScopeListResult; /** Optional parameters. */ export interface EncryptionScopesListNextOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Optional, specifies the maximum number of encryption scopes that will be included in the list response. */ + maxpagesize?: number; + /** Optional. When specified, only encryption scope names starting with the filter will be listed. */ + filter?: string; + /** Optional, when specified, will list encryption scopes with the specific state. Defaults to All */ + include?: ListEncryptionScopesInclude; +} /** Contains response data for the listNext operation. */ export type EncryptionScopesListNextResponse = EncryptionScopeListResult; @@ -3968,10 +4015,10 @@ export type BlobServicesGetServicePropertiesResponse = BlobServiceProperties; /** Optional parameters. */ export interface BlobContainersListOptionalParams extends coreClient.OperationOptions { - /** Optional. Specified maximum number of containers that can be included in the list. */ - maxpagesize?: string; /** Optional. When specified, only container names starting with the filter will be listed. */ filter?: string; + /** Optional. Specified maximum number of containers that can be included in the list. */ + maxpagesize?: string; /** Optional, used to include the properties for soft deleted blob containers. */ include?: ListContainersInclude; } @@ -4091,10 +4138,10 @@ export interface BlobContainersObjectLevelWormOptionalParams /** Optional parameters. */ export interface BlobContainersListNextOptionalParams extends coreClient.OperationOptions { - /** Optional. Specified maximum number of containers that can be included in the list. */ - maxpagesize?: string; /** Optional. When specified, only container names starting with the filter will be listed. */ filter?: string; + /** Optional. Specified maximum number of containers that can be included in the list. */ + maxpagesize?: string; /** Optional, used to include the properties for soft deleted blob containers. */ include?: ListContainersInclude; } @@ -4126,10 +4173,10 @@ export type FileServicesGetServicePropertiesResponse = FileServiceProperties; /** Optional parameters. */ export interface FileSharesListOptionalParams extends coreClient.OperationOptions { - /** Optional. Specified maximum number of shares that can be included in the list. */ - maxpagesize?: string; /** Optional. When specified, only share names starting with the filter will be listed. */ filter?: string; + /** Optional. Specified maximum number of shares that can be included in the list. */ + maxpagesize?: string; /** Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ',' */ expand?: string; } @@ -4195,10 +4242,10 @@ export type FileSharesLeaseResponse = FileSharesLeaseHeaders & /** Optional parameters. */ export interface FileSharesListNextOptionalParams extends coreClient.OperationOptions { - /** Optional. Specified maximum number of shares that can be included in the list. */ - maxpagesize?: string; /** Optional. When specified, only share names starting with the filter will be listed. */ filter?: string; + /** Optional. Specified maximum number of shares that can be included in the list. */ + maxpagesize?: string; /** Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ',' */ expand?: string; } @@ -4253,10 +4300,10 @@ export interface QueueDeleteOptionalParams /** Optional parameters. */ export interface QueueListOptionalParams extends coreClient.OperationOptions { - /** Optional, a maximum number of queues that should be included in a list queue response */ - maxpagesize?: string; /** Optional, When specified, only the queues with a name starting with the given filter will be listed. */ filter?: string; + /** Optional, a maximum number of queues that should be included in a list queue response */ + maxpagesize?: string; } /** Contains response data for the list operation. */ @@ -4265,10 +4312,10 @@ export type QueueListResponse = ListQueueResource; /** Optional parameters. */ export interface QueueListNextOptionalParams extends coreClient.OperationOptions { - /** Optional, a maximum number of queues that should be included in a list queue response */ - maxpagesize?: string; /** Optional, When specified, only the queues with a name starting with the given filter will be listed. */ filter?: string; + /** Optional, a maximum number of queues that should be included in a list queue response */ + maxpagesize?: string; } /** Contains response data for the listNext operation. */ diff --git a/sdk/storage/arm-storage/src/models/mappers.ts b/sdk/storage/arm-storage/src/models/mappers.ts index a24c763b7d83..d6b222ac1a81 100644 --- a/sdk/storage/arm-storage/src/models/mappers.ts +++ b/sdk/storage/arm-storage/src/models/mappers.ts @@ -2444,6 +2444,20 @@ export const ManagementPolicyBaseBlob: coreClient.CompositeMapper = { className: "DateAfterModification" } }, + tierToCold: { + serializedName: "tierToCold", + type: { + name: "Composite", + className: "DateAfterModification" + } + }, + tierToHot: { + serializedName: "tierToHot", + type: { + name: "Composite", + className: "DateAfterModification" + } + }, delete: { serializedName: "delete", type: { @@ -2529,6 +2543,20 @@ export const ManagementPolicySnapShot: coreClient.CompositeMapper = { className: "DateAfterCreation" } }, + tierToCold: { + serializedName: "tierToCold", + type: { + name: "Composite", + className: "DateAfterCreation" + } + }, + tierToHot: { + serializedName: "tierToHot", + type: { + name: "Composite", + className: "DateAfterCreation" + } + }, delete: { serializedName: "delete", type: { @@ -2589,6 +2617,20 @@ export const ManagementPolicyVersion: coreClient.CompositeMapper = { className: "DateAfterCreation" } }, + tierToCold: { + serializedName: "tierToCold", + type: { + name: "Composite", + className: "DateAfterCreation" + } + }, + tierToHot: { + serializedName: "tierToHot", + type: { + name: "Composite", + className: "DateAfterCreation" + } + }, delete: { serializedName: "delete", type: { diff --git a/sdk/storage/arm-storage/src/models/parameters.ts b/sdk/storage/arm-storage/src/models/parameters.ts index ccd80e0e79c6..24bb129810b2 100644 --- a/sdk/storage/arm-storage/src/models/parameters.ts +++ b/sdk/storage/arm-storage/src/models/parameters.ts @@ -67,7 +67,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2022-09-01", isConstant: true, serializedName: "api-version", type: { @@ -185,6 +185,18 @@ export const parameters3: OperationParameter = { mapper: ServiceSasParametersMapper }; +export const failoverType: OperationQueryParameter = { + parameterPath: ["options", "failoverType"], + mapper: { + defaultValue: "Planned", + isConstant: true, + serializedName: "failoverType", + type: { + name: "String" + } + } +}; + export const requestType: OperationQueryParameter = { parameterPath: "requestType", mapper: { @@ -346,6 +358,40 @@ export const encryptionScopeName: OperationURLParameter = { } }; +export const maxpagesize: OperationQueryParameter = { + parameterPath: ["options", "maxpagesize"], + mapper: { + constraints: { + InclusiveMaximum: 5000, + InclusiveMinimum: 1 + }, + serializedName: "$maxpagesize", + type: { + name: "Number" + } + } +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const include: OperationQueryParameter = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "$include", + type: { + name: "String" + } + } +}; + export const parameters5: OperationParameter = { parameterPath: "parameters", mapper: BlobServicePropertiesMapper @@ -363,7 +409,7 @@ export const blobServicesName: OperationURLParameter = { } }; -export const maxpagesize: OperationQueryParameter = { +export const maxpagesize1: OperationQueryParameter = { parameterPath: ["options", "maxpagesize"], mapper: { serializedName: "$maxpagesize", @@ -373,17 +419,7 @@ export const maxpagesize: OperationQueryParameter = { } }; -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - type: { - name: "String" - } - } -}; - -export const include: OperationQueryParameter = { +export const include1: OperationQueryParameter = { parameterPath: ["options", "include"], mapper: { serializedName: "$include", @@ -518,7 +554,7 @@ export const xMsSnapshot: OperationParameter = { } }; -export const include1: OperationQueryParameter = { +export const include2: OperationQueryParameter = { parameterPath: ["options", "include"], mapper: { serializedName: "$include", diff --git a/sdk/storage/arm-storage/src/operations/blobContainers.ts b/sdk/storage/arm-storage/src/operations/blobContainers.ts index d73574500c99..3fa89e6bd968 100644 --- a/sdk/storage/arm-storage/src/operations/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operations/blobContainers.ts @@ -620,9 +620,9 @@ const listOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.maxpagesize, Parameters.filter, - Parameters.include + Parameters.maxpagesize1, + Parameters.include1 ], urlParameters: [ Parameters.$host, @@ -936,9 +936,9 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.maxpagesize, Parameters.filter, - Parameters.include + Parameters.maxpagesize1, + Parameters.include1 ], urlParameters: [ Parameters.$host, diff --git a/sdk/storage/arm-storage/src/operations/encryptionScopes.ts b/sdk/storage/arm-storage/src/operations/encryptionScopes.ts index d2157321d555..92688f43cb65 100644 --- a/sdk/storage/arm-storage/src/operations/encryptionScopes.ts +++ b/sdk/storage/arm-storage/src/operations/encryptionScopes.ts @@ -325,7 +325,12 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.EncryptionScopeListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxpagesize, + Parameters.filter, + Parameters.include + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -343,7 +348,12 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.EncryptionScopeListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.maxpagesize, + Parameters.filter, + Parameters.include + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/storage/arm-storage/src/operations/fileShares.ts b/sdk/storage/arm-storage/src/operations/fileShares.ts index e8623c585d23..dc1ff9a90d01 100644 --- a/sdk/storage/arm-storage/src/operations/fileShares.ts +++ b/sdk/storage/arm-storage/src/operations/fileShares.ts @@ -320,8 +320,8 @@ const listOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.maxpagesize, Parameters.filter, + Parameters.maxpagesize1, Parameters.expand2 ], urlParameters: [ @@ -420,7 +420,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion, Parameters.include1], + queryParameters: [Parameters.apiVersion, Parameters.include2], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -497,8 +497,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.maxpagesize, Parameters.filter, + Parameters.maxpagesize1, Parameters.expand2 ], urlParameters: [ diff --git a/sdk/storage/arm-storage/src/operations/queue.ts b/sdk/storage/arm-storage/src/operations/queue.ts index 2996dabcd38f..cdb9eb085e3d 100644 --- a/sdk/storage/arm-storage/src/operations/queue.ts +++ b/sdk/storage/arm-storage/src/operations/queue.ts @@ -356,8 +356,8 @@ const listOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.maxpagesize, - Parameters.filter + Parameters.filter, + Parameters.maxpagesize1 ], urlParameters: [ Parameters.$host, @@ -381,8 +381,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, - Parameters.maxpagesize, - Parameters.filter + Parameters.filter, + Parameters.maxpagesize1 ], urlParameters: [ Parameters.$host, diff --git a/sdk/storage/arm-storage/src/operations/storageAccounts.ts b/sdk/storage/arm-storage/src/operations/storageAccounts.ts index 24ac28279480..9cacec18f467 100644 --- a/sdk/storage/arm-storage/src/operations/storageAccounts.ts +++ b/sdk/storage/arm-storage/src/operations/storageAccounts.ts @@ -474,9 +474,16 @@ export class StorageAccountsImpl implements StorageAccounts { } /** - * Failover request can be triggered for a storage account in case of availability issues. The failover - * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The - * secondary cluster will become primary after failover. + * A failover request can be triggered for a storage account in the event a primary endpoint becomes + * unavailable for any reason. The failover occurs from the storage account's primary cluster to the + * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and + * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary + * clusters are swapped after failover and the account remains geo-replicated. Failover should continue + * to be used in the event of availability issues as Planned failover is only available while the + * primary and secondary endpoints are available. The primary use case of a Planned Failover is + * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter + * to 'Planned'. Learn more about the failover options here- + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage @@ -543,9 +550,16 @@ export class StorageAccountsImpl implements StorageAccounts { } /** - * Failover request can be triggered for a storage account in case of availability issues. The failover - * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The - * secondary cluster will become primary after failover. + * A failover request can be triggered for a storage account in the event a primary endpoint becomes + * unavailable for any reason. The failover occurs from the storage account's primary cluster to the + * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and + * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary + * clusters are swapped after failover and the account remains geo-replicated. Failover should continue + * to be used in the event of availability issues as Planned failover is only available while the + * primary and secondary endpoints are available. The primary use case of a Planned Failover is + * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter + * to 'Planned'. Learn more about the failover options here- + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage @@ -1129,7 +1143,7 @@ const failoverOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.failoverType], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts b/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts index efb27d605b7a..644e4d7a669d 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts @@ -236,9 +236,16 @@ export interface StorageAccounts { options?: StorageAccountsListServiceSASOptionalParams ): Promise; /** - * Failover request can be triggered for a storage account in case of availability issues. The failover - * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The - * secondary cluster will become primary after failover. + * A failover request can be triggered for a storage account in the event a primary endpoint becomes + * unavailable for any reason. The failover occurs from the storage account's primary cluster to the + * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and + * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary + * clusters are swapped after failover and the account remains geo-replicated. Failover should continue + * to be used in the event of availability issues as Planned failover is only available while the + * primary and secondary endpoints are available. The primary use case of a Planned Failover is + * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter + * to 'Planned'. Learn more about the failover options here- + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage @@ -252,9 +259,16 @@ export interface StorageAccounts { options?: StorageAccountsFailoverOptionalParams ): Promise, void>>; /** - * Failover request can be triggered for a storage account in case of availability issues. The failover - * occurs from the storage account's primary cluster to secondary cluster for RA-GRS accounts. The - * secondary cluster will become primary after failover. + * A failover request can be triggered for a storage account in the event a primary endpoint becomes + * unavailable for any reason. The failover occurs from the storage account's primary cluster to the + * secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and + * the account is converted to LRS. In the case of a Planned Failover, the primary and secondary + * clusters are swapped after failover and the account remains geo-replicated. Failover should continue + * to be used in the event of availability issues as Planned failover is only available while the + * primary and secondary endpoints are available. The primary use case of a Planned Failover is + * disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter + * to 'Planned'. Learn more about the failover options here- + * https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Storage diff --git a/sdk/storage/arm-storage/src/storageManagementClient.ts b/sdk/storage/arm-storage/src/storageManagementClient.ts index cdddbde634ba..c94b57821812 100644 --- a/sdk/storage/arm-storage/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage/src/storageManagementClient.ts @@ -92,7 +92,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-storage/18.0.1`; + const packageDetails = `azsdk-js-arm-storage/18.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -146,7 +146,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; + this.apiVersion = options.apiVersion || "2022-09-01"; this.operations = new OperationsImpl(this); this.skus = new SkusImpl(this); this.storageAccounts = new StorageAccountsImpl(this); diff --git a/sdk/storage/arm-storage/test/sampleTest.ts b/sdk/storage/arm-storage/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/storage/arm-storage/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/storage/arm-storage/tsconfig.json b/sdk/storage/arm-storage/tsconfig.json index 2792c048bc1f..3e6ae96443f3 100644 --- a/sdk/storage/arm-storage/tsconfig.json +++ b/sdk/storage/arm-storage/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-storage": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"