diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2a21ccf9010c..1560bd58fd9e 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1306,6 +1306,10 @@ packages: resolution: {integrity: sha512-+BsxHcFzJH28hMAsyI+bbAYVw79d12WagttmFvoidXXq76/5KpNCA2NWTGSV0AlJ+QaCF6+7I7P91PRYnJsr+w==} engines: {node: '>=14.0.0'} + '@azure/arm-storage@18.3.0': + resolution: {integrity: sha512-iba1BroEL/PY1ZZg8SiqFkjB/NsXbgBCOIkOzp9pfWrukyuh96IDZCbRL+ASN2lWkXrZgbg9uuZ4zlX28xMYTQ==} + engines: {node: '>=18.0.0'} + '@azure/communication-common@2.3.1': resolution: {integrity: sha512-6ZQt20iMZbyckQn4m1TDwiDv3Fzyt1h4lnQ1szBBns2x3VQY9XHbnskPtvUdwK/HT+c/1PoUwof3toy1AIznbQ==} engines: {node: '>=18.0.0'} @@ -2612,7 +2616,7 @@ packages: version: 0.0.0 '@rush-temp/arm-batch@file:projects/arm-batch.tgz': - resolution: {integrity: sha512-hoilBPbg1zn0QZHbNNpOo/cOlibJ6b10j/3qUyUX9+MXToxYG82ncoLN149qGbxpkaqjQQcpnxAI7ZmPp4NLoQ==, tarball: file:projects/arm-batch.tgz} + resolution: {integrity: sha512-BuF6iw34UkZR5HT5h76kFAyikuKeicg1Xx64VE+iwMMP3Tah2KQype/N+4Ue2dWsVqhlkkMmvmmqFfN2lmr5lA==, tarball: file:projects/arm-batch.tgz} version: 0.0.0 '@rush-temp/arm-billing@file:projects/arm-billing.tgz': @@ -2884,7 +2888,7 @@ packages: version: 0.0.0 '@rush-temp/arm-eventhub@file:projects/arm-eventhub.tgz': - resolution: {integrity: sha512-ri2+qZVF92tZRkr8jIA9Z2M0cDH4IY4N02eweD9VkuMy7ljbUgOEfQPyBODwgayzEZTTypkWfYPHPkMd5cjAgQ==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-oOkuouq4ccfptS2+RTPhqGqlJeBBgCMI5B3j6iytyV45BveMlsN0G+NayEoIeeCqrO8P8nc72QBw8uP9cZ0Nfw==, tarball: file:projects/arm-eventhub.tgz} version: 0.0.0 '@rush-temp/arm-extendedlocation@file:projects/arm-extendedlocation.tgz': @@ -3080,7 +3084,7 @@ packages: version: 0.0.0 '@rush-temp/arm-mediaservices@file:projects/arm-mediaservices.tgz': - resolution: {integrity: sha512-1FVu8PRCGKH2QqyiQ42d3SCxjcSpBtgEpT6y2G0HPd9MqMwmWx+GZqKCEWWN0sTzzmHrZOO9GEAuv0dRxuL4Ug==, tarball: file:projects/arm-mediaservices.tgz} + resolution: {integrity: sha512-AikwlJzMNsJTpzBNAqHmYkDayyxHsVRAPo8L65DSDNvTmjSZjC9/Udcpey6xIQqnq8we0H7fPPxa+h0OBisPoA==, tarball: file:projects/arm-mediaservices.tgz} version: 0.0.0 '@rush-temp/arm-migrate@file:projects/arm-migrate.tgz': @@ -3108,7 +3112,7 @@ packages: version: 0.0.0 '@rush-temp/arm-monitor@file:projects/arm-monitor.tgz': - resolution: {integrity: sha512-M+9Vl69s/OYxdMGIxHpf3nWXrop324ZKiBi6SCycDLTo/sPmPLaeYPN/IWo6ezxTdXEkdmbz9x2/3Q0ObsicVg==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-HTGh4Gvys11vDPzrJXIbXQoMAF9FZOHhM3K1VhUNQeBGrfeyEhl4WofE3P43gMQ2jGoI7iGchqzGJ9Ix7r4juA==, tarball: file:projects/arm-monitor.tgz} version: 0.0.0 '@rush-temp/arm-msi@file:projects/arm-msi.tgz': @@ -3408,7 +3412,7 @@ packages: version: 0.0.0 '@rush-temp/arm-storage@file:projects/arm-storage.tgz': - resolution: {integrity: sha512-wvvO57WHgf2fwzobLBLO7aUgVvxrJBub5pMckND8IpvYw9awqfdhP7V0kV+keZrPxhcygK2XnY32nsCPunj8sQ==, tarball: file:projects/arm-storage.tgz} + resolution: {integrity: sha512-FJ3EdhKm9lkAAdGvS1FXJQGiu6LjS3LBGwNG8AQwcDY6uIdN9B2choMwE/abWBItfQqZYkGu1pAxdACzGy0eEw==, tarball: file:projects/arm-storage.tgz} version: 0.0.0 '@rush-temp/arm-storageactions@file:projects/arm-storageactions.tgz': @@ -6622,6 +6626,11 @@ packages: engines: {node: '>=10'} hasBin: true + mocha@10.8.2: + resolution: {integrity: sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==} + engines: {node: '>= 14.0.0'} + hasBin: true + mocha@11.0.2: resolution: {integrity: sha512-IpLqigxxL825rKCce2hlJL6qiUNgxbjhpS79SA6NN+Quzrf6wzLezwk4LcfIJp/OUD5BVWTM/nCYc3oQ5uqmfw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -8394,6 +8403,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@azure/arm-storage@18.3.0': + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.9.0 + '@azure/core-client': 1.9.2 + '@azure/core-lro': 2.7.2 + '@azure/core-paging': 1.6.2 + '@azure/core-rest-pipeline': 1.18.1 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + '@azure/communication-common@2.3.1': dependencies: '@azure/abort-controller': 1.1.0 @@ -10862,6 +10883,7 @@ snapshots: dependencies: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 + '@azure/arm-storage': 18.3.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 @@ -12315,6 +12337,7 @@ snapshots: '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/arm-network': 32.2.0 + '@azure/arm-storage': 18.3.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 @@ -13308,6 +13331,7 @@ snapshots: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 + '@azure/arm-storage': 18.3.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 @@ -13455,6 +13479,7 @@ snapshots: '@azure-tools/test-credential': 1.3.1 '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 + '@azure/arm-storage': 18.3.0 '@azure/core-lro': 2.7.2 '@types/chai': 4.3.20 '@types/mocha': 10.0.10 @@ -15009,11 +15034,11 @@ snapshots: '@types/node': 18.19.68 chai: 4.5.0 dotenv: 16.4.7 - mocha: 11.0.2 - ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2) + mocha: 10.8.2 + ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.6.3) tslib: 2.8.1 tsx: 4.19.2 - typescript: 5.7.2 + typescript: 5.6.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -22767,6 +22792,29 @@ snapshots: mkdirp@3.0.1: {} + mocha@10.8.2: + dependencies: + ansi-colors: 4.1.3 + browser-stdout: 1.3.1 + chokidar: 3.6.0 + debug: 4.4.0(supports-color@8.1.1) + diff: 5.2.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 8.1.0 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 5.1.6 + ms: 2.1.3 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.5.1 + yargs: 16.2.0 + yargs-parser: 20.2.9 + yargs-unparser: 2.0.0 + mocha@11.0.2: dependencies: ansi-colors: 4.1.3 diff --git a/sdk/storage/arm-storage/CHANGELOG.md b/sdk/storage/arm-storage/CHANGELOG.md index 1d29b387388c..c9d32f87e4d6 100644 --- a/sdk/storage/arm-storage/CHANGELOG.md +++ b/sdk/storage/arm-storage/CHANGELOG.md @@ -1,15 +1,53 @@ # Release History - -## 18.3.1 (Unreleased) - + +## 18.4.0 (2024-12-18) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation FileServices.getServiceUsage + - Added operation FileServices.listServiceUsages + - Added Interface AccountLimits + - Added Interface AccountUsage + - Added Interface AccountUsageElements + - Added Interface BurstingConstants + - Added Interface FileServicesGetServiceUsageOptionalParams + - Added Interface FileServicesListServiceUsagesNextOptionalParams + - Added Interface FileServicesListServiceUsagesOptionalParams + - Added Interface FileServiceUsage + - Added Interface FileServiceUsageProperties + - Added Interface FileServiceUsages + - Added Interface FileShareLimits + - Added Interface FileSharePropertiesFileSharePaidBursting + - Added Interface FileShareRecommendations + - Added Interface ObjectReplicationPolicyPropertiesMetrics + - Added Type Alias FileServicesGetServiceUsageResponse + - Added Type Alias FileServicesListServiceUsagesNextResponse + - Added Type Alias FileServicesListServiceUsagesResponse + - Interface FileShare has a new optional parameter fileSharePaidBursting + - Interface FileShare has a new optional parameter includedBurstIops + - Interface FileShare has a new optional parameter maxBurstCreditsForIops + - Interface FileShare has a new optional parameter nextAllowedProvisionedBandwidthDowngradeTime + - Interface FileShare has a new optional parameter nextAllowedProvisionedIopsDowngradeTime + - Interface FileShare has a new optional parameter nextAllowedQuotaDowngradeTime + - Interface FileShare has a new optional parameter provisionedBandwidthMibps + - Interface FileShare has a new optional parameter provisionedIops + - Interface FileShareItem has a new optional parameter fileSharePaidBursting + - Interface FileShareItem has a new optional parameter includedBurstIops + - Interface FileShareItem has a new optional parameter maxBurstCreditsForIops + - Interface FileShareItem has a new optional parameter nextAllowedProvisionedBandwidthDowngradeTime + - Interface FileShareItem has a new optional parameter nextAllowedProvisionedIopsDowngradeTime + - Interface FileShareItem has a new optional parameter nextAllowedQuotaDowngradeTime + - Interface FileShareItem has a new optional parameter provisionedBandwidthMibps + - Interface FileShareItem has a new optional parameter provisionedIops + - Interface ObjectReplicationPolicy has a new optional parameter metrics + - Enum KnownSkuName has a new value PremiumV2LRS + - Enum KnownSkuName has a new value PremiumV2ZRS + - Enum KnownSkuName has a new value StandardV2GRS + - Enum KnownSkuName has a new value StandardV2Gzrs + - Enum KnownSkuName has a new value StandardV2LRS + - Enum KnownSkuName has a new value StandardV2ZRS + + ## 18.3.0 (2024-06-27) ### Features Added diff --git a/sdk/storage/arm-storage/README.md b/sdk/storage/arm-storage/README.md index 22a08ed4502e..5185a083c59d 100644 --- a/sdk/storage/arm-storage/README.md +++ b/sdk/storage/arm-storage/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure StorageManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). diff --git a/sdk/storage/arm-storage/_meta.json b/sdk/storage/arm-storage/_meta.json index fe2525b00223..2395cb8d0e8b 100644 --- a/sdk/storage/arm-storage/_meta.json +++ b/sdk/storage/arm-storage/_meta.json @@ -1,8 +1,8 @@ { - "commit": "43f10d3b8bacd5fc6b01254b5050c613f26c3573", + "commit": "52d2386ed3773247e361964f7573593ed7c36e33", "readme": "specification/storage/resource-manager/readme.md", - "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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storage\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --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/storage/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.10", - "use": "@autorest/typescript@6.0.23" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index bcb6bb662b30..bb5f4292c42d 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageManagementClient.", - "version": "18.3.1", + "version": "18.4.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -28,19 +28,19 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-storage.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.1.0", - "@azure-tools/test-recorder": "^3.0.0", + "typescript": "~5.6.2", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", - "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", "tsx": "^4.7.1", - "typescript": "~5.7.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -68,28 +68,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -102,13 +102,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/arm-storage", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storage?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/arm-storage" +} \ 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 752160f8f4db..64600f32a934 100644 --- a/sdk/storage/arm-storage/review/arm-storage.api.md +++ b/sdk/storage/arm-storage/review/arm-storage.api.md @@ -30,6 +30,14 @@ export interface AccountImmutabilityPolicyProperties { // @public export type AccountImmutabilityPolicyState = string; +// @public +export interface AccountLimits { + readonly maxFileShares?: number; + readonly maxProvisionedBandwidthMiBPerSec?: number; + readonly maxProvisionedIops?: number; + readonly maxProvisionedStorageGiB?: number; +} + // @public export interface AccountSasParameters { iPAddressOrRange?: string; @@ -48,6 +56,20 @@ export type AccountStatus = "available" | "unavailable"; // @public export type AccountType = string; +// @public +export interface AccountUsage { + readonly liveShares?: AccountUsageElements; + readonly softDeletedShares?: AccountUsageElements; +} + +// @public +export interface AccountUsageElements { + readonly fileShareCount?: number; + readonly provisionedBandwidthMiBPerSec?: number; + readonly provisionedIops?: number; + readonly provisionedStorageGiB?: number; +} + // @public export interface ActiveDirectoryProperties { accountType?: AccountType; @@ -410,6 +432,13 @@ export interface BlobServicesSetServicePropertiesOptionalParams extends coreClie // @public export type BlobServicesSetServicePropertiesResponse = BlobServiceProperties; +// @public +export interface BurstingConstants { + readonly burstFloorIops?: number; + readonly burstIOScalar?: number; + readonly burstTimeframeSeconds?: number; +} + // @public export type Bypass = string; @@ -746,7 +775,9 @@ export interface FileServiceProperties extends Resource { // @public export interface FileServices { getServiceProperties(resourceGroupName: string, accountName: string, options?: FileServicesGetServicePropertiesOptionalParams): Promise; + getServiceUsage(resourceGroupName: string, accountName: string, options?: FileServicesGetServiceUsageOptionalParams): Promise; list(resourceGroupName: string, accountName: string, options?: FileServicesListOptionalParams): Promise; + listServiceUsages(resourceGroupName: string, accountName: string, options?: FileServicesListServiceUsagesOptionalParams): PagedAsyncIterableIterator; setServiceProperties(resourceGroupName: string, accountName: string, parameters: FileServiceProperties, options?: FileServicesSetServicePropertiesOptionalParams): Promise; } @@ -757,6 +788,13 @@ export interface FileServicesGetServicePropertiesOptionalParams extends coreClie // @public export type FileServicesGetServicePropertiesResponse = FileServiceProperties; +// @public +export interface FileServicesGetServiceUsageOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FileServicesGetServiceUsageResponse = FileServiceUsage; + // @public export interface FileServicesListOptionalParams extends coreClient.OperationOptions { } @@ -764,6 +802,21 @@ export interface FileServicesListOptionalParams extends coreClient.OperationOpti // @public export type FileServicesListResponse = FileServiceItems; +// @public +export interface FileServicesListServiceUsagesNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FileServicesListServiceUsagesNextResponse = FileServiceUsages; + +// @public +export interface FileServicesListServiceUsagesOptionalParams extends coreClient.OperationOptions { + maxpagesize?: number; +} + +// @public +export type FileServicesListServiceUsagesResponse = FileServiceUsages; + // @public export interface FileServicesSetServicePropertiesOptionalParams extends coreClient.OperationOptions { } @@ -771,6 +824,26 @@ export interface FileServicesSetServicePropertiesOptionalParams extends coreClie // @public export type FileServicesSetServicePropertiesResponse = FileServiceProperties; +// @public +export interface FileServiceUsage extends Resource { + readonly properties?: FileServiceUsageProperties; +} + +// @public +export interface FileServiceUsageProperties { + readonly burstingConstants?: BurstingConstants; + readonly fileShareLimits?: FileShareLimits; + readonly fileShareRecommendations?: FileShareRecommendations; + readonly storageAccountLimits?: AccountLimits; + readonly storageAccountUsage?: AccountUsage; +} + +// @public +export interface FileServiceUsages { + readonly nextLink?: string; + readonly value?: FileServiceUsage[]; +} + // @public export interface FileShare extends AzureEntityResource { accessTier?: ShareAccessTier; @@ -779,13 +852,21 @@ export interface FileShare extends AzureEntityResource { readonly deleted?: boolean; readonly deletedTime?: Date; enabledProtocols?: EnabledProtocols; + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; + readonly includedBurstIops?: number; readonly lastModifiedTime?: Date; readonly leaseDuration?: LeaseDuration; readonly leaseState?: LeaseState; readonly leaseStatus?: LeaseStatus; + readonly maxBurstCreditsForIops?: number; metadata?: { [propertyName: string]: string; }; + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + readonly nextAllowedQuotaDowngradeTime?: Date; + provisionedBandwidthMibps?: number; + provisionedIops?: number; readonly remainingRetentionDays?: number; rootSquash?: RootSquashType; shareQuota?: number; @@ -803,13 +884,21 @@ export interface FileShareItem extends AzureEntityResource { readonly deleted?: boolean; readonly deletedTime?: Date; enabledProtocols?: EnabledProtocols; + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; + readonly includedBurstIops?: number; readonly lastModifiedTime?: Date; readonly leaseDuration?: LeaseDuration; readonly leaseState?: LeaseState; readonly leaseStatus?: LeaseStatus; + readonly maxBurstCreditsForIops?: number; metadata?: { [propertyName: string]: string; }; + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + readonly nextAllowedQuotaDowngradeTime?: Date; + provisionedBandwidthMibps?: number; + provisionedIops?: number; readonly remainingRetentionDays?: number; rootSquash?: RootSquashType; shareQuota?: number; @@ -825,6 +914,31 @@ export interface FileShareItems { readonly value?: FileShareItem[]; } +// @public +export interface FileShareLimits { + readonly maxProvisionedBandwidthMiBPerSec?: number; + readonly maxProvisionedIops?: number; + readonly maxProvisionedStorageGiB?: number; + readonly minProvisionedBandwidthMiBPerSec?: number; + readonly minProvisionedIops?: number; + readonly minProvisionedStorageGiB?: number; +} + +// @public +export interface FileSharePropertiesFileSharePaidBursting { + paidBurstingEnabled?: boolean; + paidBurstingMaxBandwidthMibps?: number; + paidBurstingMaxIops?: number; +} + +// @public +export interface FileShareRecommendations { + readonly bandwidthScalar?: number; + readonly baseBandwidthMiBPerSec?: number; + readonly baseIops?: number; + readonly ioScalar?: number; +} + // @public export interface FileShares { create(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options?: FileSharesCreateOptionalParams): Promise; @@ -1483,12 +1597,18 @@ export enum KnownSkuConversionStatus { // @public export enum KnownSkuName { PremiumLRS = "Premium_LRS", + PremiumV2LRS = "PremiumV2_LRS", + PremiumV2ZRS = "PremiumV2_ZRS", PremiumZRS = "Premium_ZRS", StandardGRS = "Standard_GRS", StandardGzrs = "Standard_GZRS", StandardLRS = "Standard_LRS", StandardRagrs = "Standard_RAGRS", StandardRagzrs = "Standard_RAGZRS", + StandardV2GRS = "StandardV2_GRS", + StandardV2Gzrs = "StandardV2_GZRS", + StandardV2LRS = "StandardV2_LRS", + StandardV2ZRS = "StandardV2_ZRS", StandardZRS = "Standard_ZRS" } @@ -2020,6 +2140,7 @@ export interface ObjectReplicationPoliciesOperations { export interface ObjectReplicationPolicy extends Resource { destinationAccount?: string; readonly enabledTime?: Date; + metrics?: ObjectReplicationPolicyPropertiesMetrics; readonly policyId?: string; rules?: ObjectReplicationPolicyRule[]; sourceAccount?: string; @@ -2031,6 +2152,11 @@ export interface ObjectReplicationPolicyFilter { prefixMatch?: string[]; } +// @public +export interface ObjectReplicationPolicyPropertiesMetrics { + enabled?: boolean; +} + // @public export interface ObjectReplicationPolicyRule { destinationContainer: string; diff --git a/sdk/storage/arm-storage/sample.env b/sdk/storage/arm-storage/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/storage/arm-storage/sample.env +++ b/sdk/storage/arm-storage/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/storage/arm-storage/src/models/index.ts b/sdk/storage/arm-storage/src/models/index.ts index 4d090a450b09..6c3aba07ced1 100644 --- a/sdk/storage/arm-storage/src/models/index.ts +++ b/sdk/storage/arm-storage/src/models/index.ts @@ -347,6 +347,188 @@ export interface Multichannel { enabled?: boolean; } +/** List file service usages schema. */ +export interface FileServiceUsages { + /** + * List of file service usages returned. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: FileServiceUsage[]; + /** + * Request URL that can be used to query next page of file service usages. Returned when total number of requested file service usages exceed maximum page size. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** File service usage in storage account including account limits, file share limits and constants used in recommendations and bursting formula. */ +export interface FileServiceUsageProperties { + /** + * Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageAccountLimits?: AccountLimits; + /** + * Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareLimits?: FileShareLimits; + /** + * Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareRecommendations?: FileShareRecommendations; + /** + * Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstingConstants?: BurstingConstants; + /** + * Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted shares in the account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageAccountUsage?: AccountUsage; +} + +/** Maximum provisioned storage, IOPS, bandwidth and number of file shares limits for the storage account. */ +export interface AccountLimits { + /** + * The maximum number of file shares limit for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxFileShares?: number; + /** + * The maximum provisioned storage quota limit in gibibytes for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedStorageGiB?: number; + /** + * The maximum provisioned IOPS limit for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedIops?: number; + /** + * The maximum provisioned bandwidth limit in mebibytes per second for the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedBandwidthMiBPerSec?: number; +} + +/** Minimum and maximum provisioned storage, IOPS and bandwidth limits for a file share in the storage account. */ +export interface FileShareLimits { + /** + * The minimum provisioned storage quota limit in gibibytes for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minProvisionedStorageGiB?: number; + /** + * The maximum provisioned storage quota limit in gibibytes for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedStorageGiB?: number; + /** + * The minimum provisioned IOPS limit for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minProvisionedIops?: number; + /** + * The maximum provisioned IOPS limit for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedIops?: number; + /** + * The minimum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minProvisionedBandwidthMiBPerSec?: number; + /** + * The maximum provisioned bandwidth limit in mebibytes per second for a file share in the storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxProvisionedBandwidthMiBPerSec?: number; +} + +/** Constants used for calculating recommended provisioned IOPS and bandwidth for a file share in the storage account. */ +export interface FileShareRecommendations { + /** + * The base IOPS in the file share provisioned IOPS recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly baseIops?: number; + /** + * The scalar for IO in the file share provisioned IOPS recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ioScalar?: number; + /** + * The base bandwidth in the file share provisioned bandwidth recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly baseBandwidthMiBPerSec?: number; + /** + * The scalar for bandwidth in the file share provisioned bandwidth recommendation formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bandwidthScalar?: number; +} + +/** Constants used for calculating included burst IOPS and maximum burst credits for IOPS for a file share in the storage account. */ +export interface BurstingConstants { + /** + * The guaranteed floor of burst IOPS for small file shares. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstFloorIops?: number; + /** + * The scalar against provisioned IOPS in the file share included burst IOPS formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstIOScalar?: number; + /** + * The time frame for bursting in seconds in the file share maximum burst credits for IOPS formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly burstTimeframeSeconds?: number; +} + +/** Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares and soft-deleted shares in the account. */ +export interface AccountUsage { + /** + * Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted shares in the account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly liveShares?: AccountUsageElements; + /** + * Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted shares in the account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly softDeletedShares?: AccountUsageElements; +} + +/** Usage of provisioned storage, IOPS, bandwidth and number of file shares across all live shares or soft-deleted shares in the account. */ +export interface AccountUsageElements { + /** + * The total number of file shares. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fileShareCount?: number; + /** + * The total provisioned storage quota in gibibytes. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisionedStorageGiB?: number; + /** + * The total provisioned IOPS. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisionedIops?: number; + /** + * The total provisioned bandwidth in mebibytes per second. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisionedBandwidthMiBPerSec?: number; +} + /** Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares. */ export interface FileShareItems { /** @@ -377,6 +559,16 @@ export interface AccessPolicy { permission?: string; } +/** File Share Paid Bursting properties. */ +export interface FileSharePropertiesFileSharePaidBursting { + /** Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. */ + paidBurstingEnabled?: boolean; + /** The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 102400 which is the maximum allowed IOPS for a share. */ + paidBurstingMaxIops?: number; + /** The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 10340 which is the maximum allowed bandwidth for a share. */ + paidBurstingMaxBandwidthMibps?: number; +} + /** The deleted share to be restored. */ export interface DeletedShare { /** Required. Identify the name of the deleted share that will be restored. */ @@ -1692,6 +1884,12 @@ export interface ObjectReplicationPolicyFilter { minCreationTime?: string; } +/** Optional. The object replication policy metrics feature options. */ +export interface ObjectReplicationPolicyPropertiesMetrics { + /** Indicates whether object replication metrics feature is enabled for the policy. */ + enabled?: boolean; +} + /** List of local users requested, and if paging is required, a URL to the next page of local users. */ export interface LocalUsers { /** The list of local users associated with the storage account. */ @@ -2218,6 +2416,15 @@ export interface FileServiceProperties extends Resource { protocolSettings?: ProtocolSettings; } +/** The usage of file service in storage account. */ +export interface FileServiceUsage extends Resource { + /** + * File service usage in storage account including account limits, file share limits and constants used in recommendations and bursting formula. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly properties?: FileServiceUsageProperties; +} + /** The properties of a storage account’s Queue service. */ export interface QueueServiceProperties extends Resource { /** Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service. */ @@ -2324,6 +2531,8 @@ export interface ObjectReplicationPolicy extends Resource { destinationAccount?: string; /** The storage account object replication rules. */ rules?: ObjectReplicationPolicyRule[]; + /** Optional. The object replication policy metrics feature options. */ + metrics?: ObjectReplicationPolicyPropertiesMetrics; } /** The local user associated with the storage accounts. */ @@ -2593,8 +2802,37 @@ export interface FileShareItem extends AzureEntityResource { readonly lastModifiedTime?: Date; /** A name-value pair to associate with the share as metadata. */ metadata?: { [propertyName: string]: string }; - /** The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. */ + /** The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size. */ shareQuota?: number; + /** The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS. */ + provisionedIops?: number; + /** The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth. */ + provisionedBandwidthMibps?: number; + /** + * The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly includedBurstIops?: number; + /** + * The calculated maximum burst credits for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxBurstCreditsForIops?: number; + /** + * Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedQuotaDowngradeTime?: Date; + /** + * Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + /** + * Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; /** The authentication protocol that is used for the file share. Can only be specified when creating a share. */ enabledProtocols?: EnabledProtocols; /** The property is for NFS share only. The default is NoRootSquash. */ @@ -2658,6 +2896,8 @@ export interface FileShareItem extends AzureEntityResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly snapshotTime?: Date; + /** File Share Paid Bursting properties. */ + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; } /** Properties of the file share, including Id, resource name, resource type, Etag. */ @@ -2669,8 +2909,37 @@ export interface FileShare extends AzureEntityResource { readonly lastModifiedTime?: Date; /** A name-value pair to associate with the share as metadata. */ metadata?: { [propertyName: string]: string }; - /** The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. */ + /** The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size. */ shareQuota?: number; + /** The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS. */ + provisionedIops?: number; + /** The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth. */ + provisionedBandwidthMibps?: number; + /** + * The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly includedBurstIops?: number; + /** + * The calculated maximum burst credits for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly maxBurstCreditsForIops?: number; + /** + * Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedQuotaDowngradeTime?: Date; + /** + * Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedIopsDowngradeTime?: Date; + /** + * Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextAllowedProvisionedBandwidthDowngradeTime?: Date; /** The authentication protocol that is used for the file share. Can only be specified when creating a share. */ enabledProtocols?: EnabledProtocols; /** The property is for NFS share only. The default is NoRootSquash. */ @@ -2734,6 +3003,8 @@ export interface FileShare extends AzureEntityResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly snapshotTime?: Date; + /** File Share Paid Bursting properties. */ + fileSharePaidBursting?: FileSharePropertiesFileSharePaidBursting; } /** The storage account. */ @@ -3103,6 +3374,18 @@ export enum KnownSkuName { StandardGzrs = "Standard_GZRS", /** StandardRagzrs */ StandardRagzrs = "Standard_RAGZRS", + /** StandardV2LRS */ + StandardV2LRS = "StandardV2_LRS", + /** StandardV2GRS */ + StandardV2GRS = "StandardV2_GRS", + /** StandardV2ZRS */ + StandardV2ZRS = "StandardV2_ZRS", + /** StandardV2Gzrs */ + StandardV2Gzrs = "StandardV2_GZRS", + /** PremiumV2LRS */ + PremiumV2LRS = "PremiumV2_LRS", + /** PremiumV2ZRS */ + PremiumV2ZRS = "PremiumV2_ZRS", } /** @@ -3117,7 +3400,13 @@ export enum KnownSkuName { * **Premium_LRS** \ * **Premium_ZRS** \ * **Standard_GZRS** \ - * **Standard_RAGZRS** + * **Standard_RAGZRS** \ + * **StandardV2_LRS** \ + * **StandardV2_GRS** \ + * **StandardV2_ZRS** \ + * **StandardV2_GZRS** \ + * **PremiumV2_LRS** \ + * **PremiumV2_ZRS** */ export type SkuName = string; @@ -4528,7 +4817,7 @@ export interface BlobContainersCreateOrUpdateImmutabilityPolicyOptionalParams extends coreClient.OperationOptions { /** The ImmutabilityPolicy Properties that will be created or updated to a blob container. */ parameters?: ImmutabilityPolicy; - /** The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. */ + /** The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service. */ ifMatch?: string; } @@ -4539,7 +4828,7 @@ export type BlobContainersCreateOrUpdateImmutabilityPolicyResponse = /** Optional parameters. */ export interface BlobContainersGetImmutabilityPolicyOptionalParams extends coreClient.OperationOptions { - /** The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. */ + /** The entity state (ETag) version of the immutability policy to update must be returned to the server for all update operations. The ETag value must include the leading and trailing double quotes as returned by the service. */ ifMatch?: string; } @@ -4621,6 +4910,30 @@ export interface FileServicesGetServicePropertiesOptionalParams /** Contains response data for the getServiceProperties operation. */ export type FileServicesGetServicePropertiesResponse = FileServiceProperties; +/** Optional parameters. */ +export interface FileServicesListServiceUsagesOptionalParams + extends coreClient.OperationOptions { + /** Optional, specifies the maximum number of file service usages to be included in the list response. */ + maxpagesize?: number; +} + +/** Contains response data for the listServiceUsages operation. */ +export type FileServicesListServiceUsagesResponse = FileServiceUsages; + +/** Optional parameters. */ +export interface FileServicesGetServiceUsageOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getServiceUsage operation. */ +export type FileServicesGetServiceUsageResponse = FileServiceUsage; + +/** Optional parameters. */ +export interface FileServicesListServiceUsagesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listServiceUsagesNext operation. */ +export type FileServicesListServiceUsagesNextResponse = FileServiceUsages; + /** Optional parameters. */ export interface FileSharesListOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/storage/arm-storage/src/models/mappers.ts b/sdk/storage/arm-storage/src/models/mappers.ts index 06fc765945b5..6f1ebbd7157f 100644 --- a/sdk/storage/arm-storage/src/models/mappers.ts +++ b/sdk/storage/arm-storage/src/models/mappers.ts @@ -827,6 +827,294 @@ export const Multichannel: coreClient.CompositeMapper = { }, }; +export const FileServiceUsages: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileServiceUsages", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FileServiceUsage", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const FileServiceUsageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileServiceUsageProperties", + modelProperties: { + storageAccountLimits: { + serializedName: "storageAccountLimits", + type: { + name: "Composite", + className: "AccountLimits", + }, + }, + fileShareLimits: { + serializedName: "fileShareLimits", + type: { + name: "Composite", + className: "FileShareLimits", + }, + }, + fileShareRecommendations: { + serializedName: "fileShareRecommendations", + type: { + name: "Composite", + className: "FileShareRecommendations", + }, + }, + burstingConstants: { + serializedName: "burstingConstants", + type: { + name: "Composite", + className: "BurstingConstants", + }, + }, + storageAccountUsage: { + serializedName: "storageAccountUsage", + type: { + name: "Composite", + className: "AccountUsage", + }, + }, + }, + }, +}; + +export const AccountLimits: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountLimits", + modelProperties: { + maxFileShares: { + serializedName: "maxFileShares", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedStorageGiB: { + serializedName: "maxProvisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedIops: { + serializedName: "maxProvisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedBandwidthMiBPerSec: { + serializedName: "maxProvisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FileShareLimits: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileShareLimits", + modelProperties: { + minProvisionedStorageGiB: { + serializedName: "minProvisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedStorageGiB: { + serializedName: "maxProvisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + minProvisionedIops: { + serializedName: "minProvisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedIops: { + serializedName: "maxProvisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + minProvisionedBandwidthMiBPerSec: { + serializedName: "minProvisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + maxProvisionedBandwidthMiBPerSec: { + serializedName: "maxProvisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const FileShareRecommendations: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileShareRecommendations", + modelProperties: { + baseIops: { + serializedName: "baseIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + ioScalar: { + serializedName: "ioScalar", + readOnly: true, + type: { + name: "Number", + }, + }, + baseBandwidthMiBPerSec: { + serializedName: "baseBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + bandwidthScalar: { + serializedName: "bandwidthScalar", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const BurstingConstants: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BurstingConstants", + modelProperties: { + burstFloorIops: { + serializedName: "burstFloorIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + burstIOScalar: { + serializedName: "burstIOScalar", + readOnly: true, + type: { + name: "Number", + }, + }, + burstTimeframeSeconds: { + serializedName: "burstTimeframeSeconds", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const AccountUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountUsage", + modelProperties: { + liveShares: { + serializedName: "liveShares", + type: { + name: "Composite", + className: "AccountUsageElements", + }, + }, + softDeletedShares: { + serializedName: "softDeletedShares", + type: { + name: "Composite", + className: "AccountUsageElements", + }, + }, + }, + }, +}; + +export const AccountUsageElements: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountUsageElements", + modelProperties: { + fileShareCount: { + serializedName: "fileShareCount", + readOnly: true, + type: { + name: "Number", + }, + }, + provisionedStorageGiB: { + serializedName: "provisionedStorageGiB", + readOnly: true, + type: { + name: "Number", + }, + }, + provisionedIops: { + serializedName: "provisionedIOPS", + readOnly: true, + type: { + name: "Number", + }, + }, + provisionedBandwidthMiBPerSec: { + serializedName: "provisionedBandwidthMiBPerSec", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + export const FileShareItems: coreClient.CompositeMapper = { type: { name: "Composite", @@ -905,6 +1193,34 @@ export const AccessPolicy: coreClient.CompositeMapper = { }, }; +export const FileSharePropertiesFileSharePaidBursting: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "FileSharePropertiesFileSharePaidBursting", + modelProperties: { + paidBurstingEnabled: { + serializedName: "paidBurstingEnabled", + type: { + name: "Boolean", + }, + }, + paidBurstingMaxIops: { + serializedName: "paidBurstingMaxIops", + type: { + name: "Number", + }, + }, + paidBurstingMaxBandwidthMibps: { + serializedName: "paidBurstingMaxBandwidthMibps", + type: { + name: "Number", + }, + }, + }, + }, + }; + export const DeletedShare: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4296,6 +4612,22 @@ export const ObjectReplicationPolicyFilter: coreClient.CompositeMapper = { }, }; +export const ObjectReplicationPolicyPropertiesMetrics: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ObjectReplicationPolicyPropertiesMetrics", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + export const LocalUsers: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5590,6 +5922,23 @@ export const FileServiceProperties: coreClient.CompositeMapper = { }, }; +export const FileServiceUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileServiceUsage", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "FileServiceUsageProperties", + }, + }, + }, + }, +}; + export const QueueServiceProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5852,6 +6201,13 @@ export const ObjectReplicationPolicy: coreClient.CompositeMapper = { }, }, }, + metrics: { + serializedName: "properties.metrics", + type: { + name: "Composite", + className: "ObjectReplicationPolicyPropertiesMetrics", + }, + }, }, }, }; @@ -6420,15 +6776,59 @@ export const FileShareItem: coreClient.CompositeMapper = { }, }, shareQuota: { - constraints: { - InclusiveMaximum: 102400, - InclusiveMinimum: 1, - }, serializedName: "properties.shareQuota", type: { name: "Number", }, }, + provisionedIops: { + serializedName: "properties.provisionedIops", + type: { + name: "Number", + }, + }, + provisionedBandwidthMibps: { + serializedName: "properties.provisionedBandwidthMibps", + type: { + name: "Number", + }, + }, + includedBurstIops: { + serializedName: "properties.includedBurstIops", + readOnly: true, + type: { + name: "Number", + }, + }, + maxBurstCreditsForIops: { + serializedName: "properties.maxBurstCreditsForIops", + readOnly: true, + type: { + name: "Number", + }, + }, + nextAllowedQuotaDowngradeTime: { + serializedName: "properties.nextAllowedQuotaDowngradeTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + nextAllowedProvisionedIopsDowngradeTime: { + serializedName: "properties.nextAllowedProvisionedIopsDowngradeTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + nextAllowedProvisionedBandwidthDowngradeTime: { + serializedName: + "properties.nextAllowedProvisionedBandwidthDowngradeTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, enabledProtocols: { serializedName: "properties.enabledProtocols", type: { @@ -6536,6 +6936,13 @@ export const FileShareItem: coreClient.CompositeMapper = { name: "DateTime", }, }, + fileSharePaidBursting: { + serializedName: "properties.fileSharePaidBursting", + type: { + name: "Composite", + className: "FileSharePropertiesFileSharePaidBursting", + }, + }, }, }, }; @@ -6561,15 +6968,59 @@ export const FileShare: coreClient.CompositeMapper = { }, }, shareQuota: { - constraints: { - InclusiveMaximum: 102400, - InclusiveMinimum: 1, - }, serializedName: "properties.shareQuota", type: { name: "Number", }, }, + provisionedIops: { + serializedName: "properties.provisionedIops", + type: { + name: "Number", + }, + }, + provisionedBandwidthMibps: { + serializedName: "properties.provisionedBandwidthMibps", + type: { + name: "Number", + }, + }, + includedBurstIops: { + serializedName: "properties.includedBurstIops", + readOnly: true, + type: { + name: "Number", + }, + }, + maxBurstCreditsForIops: { + serializedName: "properties.maxBurstCreditsForIops", + readOnly: true, + type: { + name: "Number", + }, + }, + nextAllowedQuotaDowngradeTime: { + serializedName: "properties.nextAllowedQuotaDowngradeTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + nextAllowedProvisionedIopsDowngradeTime: { + serializedName: "properties.nextAllowedProvisionedIopsDowngradeTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + nextAllowedProvisionedBandwidthDowngradeTime: { + serializedName: + "properties.nextAllowedProvisionedBandwidthDowngradeTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, enabledProtocols: { serializedName: "properties.enabledProtocols", type: { @@ -6677,6 +7128,13 @@ export const FileShare: coreClient.CompositeMapper = { name: "DateTime", }, }, + fileSharePaidBursting: { + serializedName: "properties.fileSharePaidBursting", + type: { + name: "Composite", + className: "FileSharePropertiesFileSharePaidBursting", + }, + }, }, }, }; diff --git a/sdk/storage/arm-storage/src/models/parameters.ts b/sdk/storage/arm-storage/src/models/parameters.ts index 2a869b998544..d55ec9331c53 100644 --- a/sdk/storage/arm-storage/src/models/parameters.ts +++ b/sdk/storage/arm-storage/src/models/parameters.ts @@ -101,7 +101,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-01", + defaultValue: "2024-01-01", isConstant: true, serializedName: "api-version", type: { @@ -280,6 +280,28 @@ export const fileServicesName: OperationURLParameter = { }, }; +export const maxpagesize1: OperationQueryParameter = { + parameterPath: ["options", "maxpagesize"], + mapper: { + serializedName: "$maxpagesize", + type: { + name: "Number", + }, + }, +}; + +export const fileServiceUsagesName: OperationURLParameter = { + parameterPath: "fileServiceUsagesName", + mapper: { + defaultValue: "default", + isConstant: true, + serializedName: "fileServiceUsagesName", + type: { + name: "String", + }, + }, +}; + export const expand: OperationQueryParameter = { parameterPath: ["options", "expand"], mapper: { @@ -583,7 +605,7 @@ export const properties3: OperationParameter = { mapper: ObjectReplicationPolicyMapper, }; -export const maxpagesize1: OperationQueryParameter = { +export const maxpagesize2: OperationQueryParameter = { parameterPath: ["options", "maxpagesize"], mapper: { constraints: { @@ -735,13 +757,3 @@ export const parameters15: OperationParameter = { parameterPath: "parameters", mapper: StorageTaskAssignmentUpdateParametersMapper, }; - -export const maxpagesize2: OperationQueryParameter = { - parameterPath: ["options", "maxpagesize"], - mapper: { - serializedName: "$maxpagesize", - type: { - name: "Number", - }, - }, -}; diff --git a/sdk/storage/arm-storage/src/operations/blobContainers.ts b/sdk/storage/arm-storage/src/operations/blobContainers.ts index 425d6c3c317d..e7eda9bb6c21 100644 --- a/sdk/storage/arm-storage/src/operations/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operations/blobContainers.ts @@ -396,9 +396,9 @@ export class BlobContainersImpl implements BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ deleteImmutabilityPolicy( @@ -426,9 +426,9 @@ export class BlobContainersImpl implements BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ lockImmutabilityPolicy( @@ -456,9 +456,9 @@ export class BlobContainersImpl implements BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ extendImmutabilityPolicy( diff --git a/sdk/storage/arm-storage/src/operations/encryptionScopes.ts b/sdk/storage/arm-storage/src/operations/encryptionScopes.ts index ef0243630849..19be82fa12b9 100644 --- a/sdk/storage/arm-storage/src/operations/encryptionScopes.ts +++ b/sdk/storage/arm-storage/src/operations/encryptionScopes.ts @@ -342,7 +342,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize1, + Parameters.maxpagesize2, Parameters.include3, ], urlParameters: [ diff --git a/sdk/storage/arm-storage/src/operations/fileServices.ts b/sdk/storage/arm-storage/src/operations/fileServices.ts index 4a6ae9432e3d..912cbf506d7a 100644 --- a/sdk/storage/arm-storage/src/operations/fileServices.ts +++ b/sdk/storage/arm-storage/src/operations/fileServices.ts @@ -6,12 +6,18 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { FileServices } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { StorageManagementClient } from "../storageManagementClient"; import { + FileServiceUsage, + FileServicesListServiceUsagesNextOptionalParams, + FileServicesListServiceUsagesOptionalParams, + FileServicesListServiceUsagesResponse, FileServicesListOptionalParams, FileServicesListResponse, FileServiceProperties, @@ -19,8 +25,12 @@ import { FileServicesSetServicePropertiesResponse, FileServicesGetServicePropertiesOptionalParams, FileServicesGetServicePropertiesResponse, + FileServicesGetServiceUsageOptionalParams, + FileServicesGetServiceUsageResponse, + FileServicesListServiceUsagesNextResponse, } from "../models"; +/// /** Class containing FileServices operations. */ export class FileServicesImpl implements FileServices { private readonly client: StorageManagementClient; @@ -33,6 +43,93 @@ export class FileServicesImpl implements FileServices { this.client = client; } + /** + * Gets the usages of file service in storage account. + * @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 + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + public listServiceUsages( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listServiceUsagesPagingAll( + resourceGroupName, + accountName, + 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.listServiceUsagesPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listServiceUsagesPagingPage( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: FileServicesListServiceUsagesResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listServiceUsages( + resourceGroupName, + accountName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listServiceUsagesNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listServiceUsagesPagingAll( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listServiceUsagesPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + /** * List all file services in storage accounts * @param resourceGroupName The name of the resource group within the user's subscription. The name is @@ -97,6 +194,69 @@ export class FileServicesImpl implements FileServices { getServicePropertiesOperationSpec, ); } + + /** + * Gets the usages of file service in storage account. + * @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 + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + private _listServiceUsages( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listServiceUsagesOperationSpec, + ); + } + + /** + * Gets the usage of file service in storage account including account limits, file share limits and + * constants used in recommendations and bursting formula. + * @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 + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + getServiceUsage( + resourceGroupName: string, + accountName: string, + options?: FileServicesGetServiceUsageOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + getServiceUsageOperationSpec, + ); + } + + /** + * ListServiceUsagesNext + * @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 + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param nextLink The nextLink from the previous successful call to the ListServiceUsages method. + * @param options The options parameters. + */ + private _listServiceUsagesNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: FileServicesListServiceUsagesNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listServiceUsagesNextOperationSpec, + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -168,3 +328,70 @@ const getServicePropertiesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const listServiceUsagesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileServiceUsages, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.maxpagesize1], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.fileServicesName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getServiceUsageOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}/usages/{fileServiceUsagesName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileServiceUsage, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.fileServicesName, + Parameters.fileServiceUsagesName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listServiceUsagesNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FileServiceUsages, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.fileServicesName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/storage/arm-storage/src/operations/localUsersOperations.ts b/sdk/storage/arm-storage/src/operations/localUsersOperations.ts index d334ae87fd7d..50b12f278be3 100644 --- a/sdk/storage/arm-storage/src/operations/localUsersOperations.ts +++ b/sdk/storage/arm-storage/src/operations/localUsersOperations.ts @@ -256,7 +256,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize1, + Parameters.maxpagesize2, Parameters.include2, ], urlParameters: [ diff --git a/sdk/storage/arm-storage/src/operations/storageAccounts.ts b/sdk/storage/arm-storage/src/operations/storageAccounts.ts index 0e65b45e2650..3aaec52736cb 100644 --- a/sdk/storage/arm-storage/src/operations/storageAccounts.ts +++ b/sdk/storage/arm-storage/src/operations/storageAccounts.ts @@ -523,7 +523,7 @@ export class StorageAccountsImpl implements StorageAccounts { * 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/azure/storage/common/storage-disaster-recovery-guidance + * 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 @@ -598,7 +598,7 @@ export class StorageAccountsImpl implements StorageAccounts { * 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/azure/storage/common/storage-disaster-recovery-guidance + * 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 @@ -1323,28 +1323,28 @@ const hierarchicalNamespaceMigrationOperationSpec: coreClient.OperationSpec = { serializer, }; const abortHierarchicalNamespaceMigrationOperationSpec: coreClient.OperationSpec = -{ - path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, + { + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.subscriptionId, - ], - headerParameters: [Parameters.accept], - serializer, -}; + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.subscriptionId, + ], + headerParameters: [Parameters.accept], + serializer, + }; const customerInitiatedMigrationOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", httpMethod: "POST", diff --git a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts index f167eab22199..bf427ac73712 100644 --- a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts +++ b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentInstancesReport.ts @@ -204,7 +204,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize2, + Parameters.maxpagesize1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts b/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts index 387c7b7699c2..ee3f230a07ff 100644 --- a/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts +++ b/sdk/storage/arm-storage/src/operations/storageTaskAssignments.ts @@ -667,7 +667,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponseAutoGenerated, }, }, - queryParameters: [Parameters.apiVersion, Parameters.maxpagesize2], + queryParameters: [Parameters.apiVersion, Parameters.maxpagesize1], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts index 443735281940..52839ef5adac 100644 --- a/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts +++ b/sdk/storage/arm-storage/src/operations/storageTaskAssignmentsInstancesReport.ts @@ -171,7 +171,7 @@ const listOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.filter, - Parameters.maxpagesize2, + Parameters.maxpagesize1, ], urlParameters: [ Parameters.$host, diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts b/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts index 22558e3cf89d..c19c3f34ac27 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/blobContainers.ts @@ -238,9 +238,9 @@ export interface BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ deleteImmutabilityPolicy( @@ -262,9 +262,9 @@ export interface BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ lockImmutabilityPolicy( @@ -286,9 +286,9 @@ export interface BlobContainers { * container names must be between 3 and 63 characters in length and use numbers, lower-case letters * and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or * number. - * @param ifMatch The entity state (ETag) version of the immutability policy to update. A value of "*" - * can be used to apply the operation only if the immutability policy already exists. If omitted, this - * operation will always be applied. + * @param ifMatch The entity state (ETag) version of the immutability policy to update must be returned + * to the server for all update operations. The ETag value must include the leading and trailing double + * quotes as returned by the service. * @param options The options parameters. */ extendImmutabilityPolicy( diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts b/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts index 62b836960ed4..3449188fb41f 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/fileServices.ts @@ -6,7 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { + FileServiceUsage, + FileServicesListServiceUsagesOptionalParams, FileServicesListOptionalParams, FileServicesListResponse, FileServiceProperties, @@ -14,10 +17,27 @@ import { FileServicesSetServicePropertiesResponse, FileServicesGetServicePropertiesOptionalParams, FileServicesGetServicePropertiesResponse, + FileServicesGetServiceUsageOptionalParams, + FileServicesGetServiceUsageResponse, } from "../models"; +/// /** Interface representing a FileServices. */ export interface FileServices { + /** + * Gets the usages of file service in storage account. + * @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 + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + listServiceUsages( + resourceGroupName: string, + accountName: string, + options?: FileServicesListServiceUsagesOptionalParams, + ): PagedAsyncIterableIterator; /** * List all file services in storage accounts * @param resourceGroupName The name of the resource group within the user's subscription. The name is @@ -65,4 +85,19 @@ export interface FileServices { accountName: string, options?: FileServicesGetServicePropertiesOptionalParams, ): Promise; + /** + * Gets the usage of file service in storage account including account limits, file share limits and + * constants used in recommendations and bursting formula. + * @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 + * account names must be between 3 and 24 characters in length and use numbers and lower-case letters + * only. + * @param options The options parameters. + */ + getServiceUsage( + resourceGroupName: string, + accountName: string, + options?: FileServicesGetServiceUsageOptionalParams, + ): Promise; } diff --git a/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts b/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts index 067fe78cf9be..4d2f8782ab51 100644 --- a/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts +++ b/sdk/storage/arm-storage/src/operationsInterfaces/storageAccounts.ts @@ -250,7 +250,7 @@ export interface StorageAccounts { * 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/azure/storage/common/storage-disaster-recovery-guidance + * 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 @@ -273,7 +273,7 @@ export interface StorageAccounts { * 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/azure/storage/common/storage-disaster-recovery-guidance + * 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 c2d48d67c3bd..393a910e1235 100644 --- a/sdk/storage/arm-storage/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage/src/storageManagementClient.ts @@ -100,7 +100,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-storage/18.3.1`; + const packageDetails = `azsdk-js-arm-storage/18.4.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -154,7 +154,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-05-01"; + this.apiVersion = options.apiVersion || "2024-01-01"; this.blobServices = new BlobServicesImpl(this); this.blobContainers = new BlobContainersImpl(this); this.fileServices = new FileServicesImpl(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..d64be981b694 --- /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..b35d05ad6e9d 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" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules"