diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5e7232cbac4f..b5d0345e8fa7 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3120,7 +3120,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3381,7 +3381,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3531,7 +3531,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3669,7 +3669,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3732,7 +3732,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3834,7 +3834,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.0: @@ -4115,11 +4115,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.199: @@ -5001,7 +5001,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -5141,7 +5141,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6582,7 +6582,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6592,7 +6592,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -7017,7 +7017,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -9207,7 +9207,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -14881,7 +14881,7 @@ packages: dev: false file:projects/arm-storagesync.tgz: - resolution: {integrity: sha512-KBRVQ/GuekNR6Vd19pFXlqelJqLFaS+2s6+M5WQBvrPFzPBKXOok6oGG6c10l+LufU0ZlA9M7GanKvKs6go6Nw==, tarball: file:projects/arm-storagesync.tgz} + resolution: {integrity: sha512-sM0A0zm77Cnv8GUGgA2fkG/FZKiD8VpgxWhIUzbu0O8Ivmq229ceqE3ACnCqryVuI4HjESMv6mqz5zeg9hWDog==, tarball: file:projects/arm-storagesync.tgz} name: '@rush-temp/arm-storagesync' version: 0.0.0 dependencies: @@ -14893,6 +14893,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.79.0 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.0 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.0 + '@types/chai': 4.3.1 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -14904,7 +14906,6 @@ packages: uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/storagesync/arm-storagesync/CHANGELOG.md b/sdk/storagesync/arm-storagesync/CHANGELOG.md index 892e0e5e3b9f..dc86a243b3fa 100644 --- a/sdk/storagesync/arm-storagesync/CHANGELOG.md +++ b/sdk/storagesync/arm-storagesync/CHANGELOG.md @@ -1,15 +1,43 @@ # Release History + +## 10.0.0 (2022-09-01) + +**Features** -## 9.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation CloudEndpoints.afsShareMetadataCertificatePublicKeys + - Added Interface CloudEndpoint + - Added Interface CloudEndpointAfsShareMetadataCertificatePublicKeys + - Added Interface CloudEndpointCreateParameters + - Added Interface CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders + - Added Interface CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams + - Added Interface CloudTieringLowDiskMode + - Added Interface PrivateEndpointConnection + - Added Interface PrivateLinkResource + - Added Interface ProxyResource + - Added Interface RegisteredServer + - Added Interface RegisteredServerCreateParameters + - Added Interface ServerEndpoint + - Added Interface ServerEndpointCreateParameters + - Added Interface StorageSyncService + - Added Interface SyncGroup + - Added Interface SyncGroupCreateParameters + - Added Interface SystemData + - Added Interface TrackedResource + - Added Interface Workflow + - Added Type Alias CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse + - Added Type Alias CloudTieringLowDiskModeState + - Added Type Alias CreatedByType + - Interface OperationResourceMetricSpecification has a new optional parameter supportedAggregationTypes + - Interface Resource has a new optional parameter systemData + - Interface ServerEndpointCloudTieringStatus has a new optional parameter lowDiskMode + - Interface StorageSyncApiError has a new optional parameter innererror + - Added Enum KnownCloudTieringLowDiskModeState + - Added Enum KnownCreatedByType + +**Breaking Changes** + + - Interface StorageSyncApiError no longer has parameter innerError + ## 9.0.1 (2022-05-01) **Features** diff --git a/sdk/storagesync/arm-storagesync/README.md b/sdk/storagesync/arm-storagesync/README.md index 094209d02289..1454e5317687 100644 --- a/sdk/storagesync/arm-storagesync/README.md +++ b/sdk/storagesync/arm-storagesync/README.md @@ -1,6 +1,6 @@ -# Azure Service client library for JavaScript +# Azure MicrosoftStorageSync client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Service client. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure MicrosoftStorageSync client. Microsoft Storage Sync Service API @@ -24,7 +24,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP ### Install the `@azure/arm-storagesync` package -Install the Azure Service client library for JavaScript with `npm`: +Install the Azure MicrosoftStorageSync client library for JavaScript with `npm`: ```bash npm install @azure/arm-storagesync @@ -32,8 +32,8 @@ npm install @azure/arm-storagesync ### Create and authenticate a `MicrosoftStorageSync` -To create a client object to access the Azure Service API, you will need the `endpoint` of your Azure Service resource and a `credential`. The Azure Service client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure Service resource in the [Azure Portal][azure_portal]. +To create a client object to access the Azure MicrosoftStorageSync API, you will need the `endpoint` of your Azure MicrosoftStorageSync resource and a `credential`. The Azure MicrosoftStorageSync client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure MicrosoftStorageSync resource in the [Azure Portal][azure_portal]. You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). @@ -43,7 +43,7 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below npm install @azure/identity ``` -You will also need to **register a new AAD application and grant access to Azure Service** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +You will also need to **register a new AAD application and grant access to Azure MicrosoftStorageSync** 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). @@ -72,7 +72,7 @@ To use this client library in the browser, first you need to use a bundler. For ### MicrosoftStorageSync -`MicrosoftStorageSync` is the primary interface for developers using the Azure Service client library. Explore the methods on this client object to understand the different features of the Azure Service service that you can access. +`MicrosoftStorageSync` is the primary interface for developers using the Azure MicrosoftStorageSync client library. Explore the methods on this client object to understand the different features of the Azure MicrosoftStorageSync service that you can access. ## Troubleshooting diff --git a/sdk/storagesync/arm-storagesync/_meta.json b/sdk/storagesync/arm-storagesync/_meta.json index 48b560aa7907..450c1783f575 100644 --- a/sdk/storagesync/arm-storagesync/_meta.json +++ b/sdk/storagesync/arm-storagesync/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", - "readme": "specification\\storagesync\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storagesync\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "209a6da2e534f3039f91de68a324e309aca6a10b", + "readme": "specification/storagesync/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/storagesync/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/storagesync/arm-storagesync/package.json b/sdk/storagesync/arm-storagesync/package.json index dbc643b32f34..3db440d2de24 100644 --- a/sdk/storagesync/arm-storagesync/package.json +++ b/sdk/storagesync/arm-storagesync/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MicrosoftStorageSync.", - "version": "9.0.2", + "version": "10.0.0", "engines": { "node": ">=12.0.0" }, @@ -40,9 +40,13 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagesync/arm-storagesync", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "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": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -106,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storagesync?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md b/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md index 762e62b1aa1d..a30d54b23a36 100644 --- a/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md +++ b/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md @@ -32,18 +32,24 @@ export interface CheckNameAvailabilityResult { } // @public -export type CloudEndpoint = ProxyResource & { - storageAccountResourceId?: string; +export interface CloudEndpoint extends ProxyResource { azureFileShareName?: string; - storageAccountTenantId?: string; - partnershipId?: string; - friendlyName?: string; readonly backupEnabled?: string; - provisioningState?: string; - lastWorkflowId?: string; - lastOperationName?: string; readonly changeEnumerationStatus?: CloudEndpointChangeEnumerationStatus; -}; + friendlyName?: string; + lastOperationName?: string; + lastWorkflowId?: string; + partnershipId?: string; + provisioningState?: string; + storageAccountResourceId?: string; + storageAccountTenantId?: string; +} + +// @public +export interface CloudEndpointAfsShareMetadataCertificatePublicKeys { + readonly firstKey?: string; + readonly secondKey?: string; +} // @public export interface CloudEndpointArray { @@ -81,12 +87,12 @@ export interface CloudEndpointChangeEnumerationStatus { export type CloudEndpointChangeEnumerationTotalCountsState = string; // @public -export type CloudEndpointCreateParameters = ProxyResource & { - storageAccountResourceId?: string; +export interface CloudEndpointCreateParameters extends ProxyResource { azureFileShareName?: string; - storageAccountTenantId?: string; friendlyName?: string; -}; + storageAccountResourceId?: string; + storageAccountTenantId?: string; +} // @public export interface CloudEndpointLastChangeEnumerationStatus { @@ -100,6 +106,7 @@ export interface CloudEndpointLastChangeEnumerationStatus { // @public export interface CloudEndpoints { + afsShareMetadataCertificatePublicKeys(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams): Promise; beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, options?: CloudEndpointsCreateOptionalParams): Promise, CloudEndpointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, options?: CloudEndpointsCreateOptionalParams): Promise; beginDelete(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsDeleteOptionalParams): Promise, CloudEndpointsDeleteResponse>>; @@ -119,6 +126,19 @@ export interface CloudEndpoints { restoreheartbeat(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsRestoreheartbeatOptionalParams): Promise; } +// @public +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders { + xMsCorrelationRequestId?: string; + xMsRequestId?: string; +} + +// @public +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse = CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders & CloudEndpointAfsShareMetadataCertificatePublicKeys; + // @public export interface CloudEndpointsCreateHeaders { xMsCorrelationRequestId?: string; @@ -280,6 +300,15 @@ export interface CloudTieringFilesNotTiering { readonly totalFileCount?: number; } +// @public +export interface CloudTieringLowDiskMode { + readonly lastUpdatedTimestamp?: Date; + readonly state?: CloudTieringLowDiskModeState; +} + +// @public +export type CloudTieringLowDiskModeState = string; + // @public export interface CloudTieringSpaceSavings { readonly cachedSizeBytes?: number; @@ -297,6 +326,9 @@ export interface CloudTieringVolumeFreeSpacePolicyStatus { readonly lastUpdatedTimestamp?: Date; } +// @public +export type CreatedByType = string; + // @public export type FeatureStatus = string; @@ -317,199 +349,152 @@ export type InitialUploadPolicy = string; // @public export enum KnownChangeDetectionMode { - // (undocumented) Default = "Default", - // (undocumented) Recursive = "Recursive" } // @public export enum KnownCloudEndpointChangeEnumerationActivityState { - // (undocumented) EnumerationInProgress = "EnumerationInProgress", - // (undocumented) InitialEnumerationInProgress = "InitialEnumerationInProgress" } // @public export enum KnownCloudEndpointChangeEnumerationTotalCountsState { - // (undocumented) Calculating = "Calculating", - // (undocumented) Final = "Final" } +// @public +export enum KnownCloudTieringLowDiskModeState { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + // @public export enum KnownFeatureStatus { - // (undocumented) Off = "off", - // (undocumented) On = "on" } // @public export enum KnownIncomingTrafficPolicy { - // (undocumented) AllowAllTraffic = "AllowAllTraffic", - // (undocumented) AllowVirtualNetworksOnly = "AllowVirtualNetworksOnly" } // @public export enum KnownInitialDownloadPolicy { - // (undocumented) AvoidTieredFiles = "AvoidTieredFiles", - // (undocumented) NamespaceOnly = "NamespaceOnly", - // (undocumented) NamespaceThenModifiedFiles = "NamespaceThenModifiedFiles" } // @public export enum KnownInitialUploadPolicy { - // (undocumented) Merge = "Merge", - // (undocumented) ServerAuthoritative = "ServerAuthoritative" } // @public export enum KnownLocalCacheMode { - // (undocumented) DownloadNewAndModifiedFiles = "DownloadNewAndModifiedFiles", - // (undocumented) UpdateLocallyCachedFiles = "UpdateLocallyCachedFiles" } // @public export enum KnownOperationDirection { - // (undocumented) Cancel = "cancel", - // (undocumented) Do = "do", - // (undocumented) Undo = "undo" } // @public export enum KnownPrivateEndpointConnectionProvisioningState { - // (undocumented) Creating = "Creating", - // (undocumented) Deleting = "Deleting", - // (undocumented) Failed = "Failed", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownPrivateEndpointServiceConnectionStatus { - // (undocumented) Approved = "Approved", - // (undocumented) Pending = "Pending", - // (undocumented) Rejected = "Rejected" } // @public export enum KnownProgressType { - // (undocumented) Download = "download", - // (undocumented) Initialize = "initialize", - // (undocumented) None = "none", - // (undocumented) Recall = "recall", - // (undocumented) Upload = "upload" } // @public export enum KnownReason { - // (undocumented) Deleted = "Deleted", - // (undocumented) Registered = "Registered", - // (undocumented) Suspended = "Suspended", - // (undocumented) Unregistered = "Unregistered", - // (undocumented) Warned = "Warned" } // @public export enum KnownRegisteredServerAgentVersionStatus { - // (undocumented) Blocked = "Blocked", - // (undocumented) Expired = "Expired", - // (undocumented) NearExpiry = "NearExpiry", - // (undocumented) Ok = "Ok" } // @public export enum KnownServerEndpointHealthState { - // (undocumented) Error = "Error", - // (undocumented) Healthy = "Healthy", - // (undocumented) Unavailable = "Unavailable" } // @public export enum KnownServerEndpointOfflineDataTransferState { - // (undocumented) Complete = "Complete", - // (undocumented) InProgress = "InProgress", - // (undocumented) NotRunning = "NotRunning", - // (undocumented) Stopping = "Stopping" } // @public export enum KnownServerEndpointSyncActivityState { - // (undocumented) Download = "Download", - // (undocumented) Upload = "Upload", - // (undocumented) UploadAndDownload = "UploadAndDownload" } // @public export enum KnownServerEndpointSyncMode { - // (undocumented) InitialFullDownload = "InitialFullDownload", - // (undocumented) InitialUpload = "InitialUpload", - // (undocumented) NamespaceDownload = "NamespaceDownload", - // (undocumented) Regular = "Regular", - // (undocumented) SnapshotUpload = "SnapshotUpload" } // @public export enum KnownWorkflowStatus { - // (undocumented) Aborted = "aborted", - // (undocumented) Active = "active", - // (undocumented) Expired = "expired", - // (undocumented) Failed = "failed", - // (undocumented) Succeeded = "succeeded" } @@ -628,6 +613,7 @@ export interface OperationResourceMetricSpecification { displayName?: string; fillGapWithZero?: boolean; name?: string; + supportedAggregationTypes?: string[]; unit?: string; } @@ -737,11 +723,11 @@ export interface PrivateEndpoint { } // @public -export type PrivateEndpointConnection = Resource & { +export interface PrivateEndpointConnection extends Resource { privateEndpoint?: PrivateEndpoint; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; readonly provisioningState?: PrivateEndpointConnectionProvisioningState; -}; +} // @public export interface PrivateEndpointConnectionListResult { @@ -818,11 +804,11 @@ export type PrivateEndpointConnectionsListByStorageSyncServiceResponse = Private export type PrivateEndpointServiceConnectionStatus = string; // @public -export type PrivateLinkResource = Resource & { +export interface PrivateLinkResource extends Resource { readonly groupId?: string; readonly requiredMembers?: string[]; requiredZoneNames?: string[]; -}; +} // @public export interface PrivateLinkResourceListResult { @@ -852,7 +838,8 @@ export interface PrivateLinkServiceConnectionState { export type ProgressType = string; // @public -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource { +} // @public export type Reason = string; @@ -864,31 +851,31 @@ export interface RecallActionParameters { } // @public -export type RegisteredServer = ProxyResource & { - serverCertificate?: string; +export interface RegisteredServer extends ProxyResource { agentVersion?: string; - readonly agentVersionStatus?: RegisteredServerAgentVersionStatus; readonly agentVersionExpirationDate?: Date; - serverOSVersion?: string; - serverManagementErrorCode?: number; - lastHeartBeat?: string; - provisioningState?: string; - serverRole?: string; + readonly agentVersionStatus?: RegisteredServerAgentVersionStatus; clusterId?: string; clusterName?: string; - serverId?: string; - storageSyncServiceUid?: string; - lastWorkflowId?: string; - lastOperationName?: string; discoveryEndpointUri?: string; - resourceLocation?: string; - serviceLocation?: string; friendlyName?: string; + lastHeartBeat?: string; + lastOperationName?: string; + lastWorkflowId?: string; managementEndpointUri?: string; - monitoringEndpointUri?: string; monitoringConfiguration?: string; + monitoringEndpointUri?: string; + provisioningState?: string; + resourceLocation?: string; + serverCertificate?: string; + serverId?: string; + serverManagementErrorCode?: number; readonly serverName?: string; -}; + serverOSVersion?: string; + serverRole?: string; + serviceLocation?: string; + storageSyncServiceUid?: string; +} // @public export type RegisteredServerAgentVersionStatus = string; @@ -899,17 +886,17 @@ export interface RegisteredServerArray { } // @public -export type RegisteredServerCreateParameters = ProxyResource & { - serverCertificate?: string; +export interface RegisteredServerCreateParameters extends ProxyResource { agentVersion?: string; - serverOSVersion?: string; - lastHeartBeat?: string; - serverRole?: string; clusterId?: string; clusterName?: string; - serverId?: string; friendlyName?: string; -}; + lastHeartBeat?: string; + serverCertificate?: string; + serverId?: string; + serverOSVersion?: string; + serverRole?: string; +} // @public export interface RegisteredServers { @@ -998,6 +985,7 @@ export type RegisteredServersTriggerRolloverResponse = RegisteredServersTriggerR export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -1014,28 +1002,28 @@ export interface RestoreFileSpec { } // @public -export type ServerEndpoint = ProxyResource & { - serverLocalPath?: string; +export interface ServerEndpoint extends ProxyResource { cloudTiering?: FeatureStatus; - volumeFreeSpacePercent?: number; - tierFilesOlderThanDays?: number; + readonly cloudTieringStatus?: ServerEndpointCloudTieringStatus; friendlyName?: string; - serverResourceId?: string; - readonly provisioningState?: string; - readonly lastWorkflowId?: string; + initialDownloadPolicy?: InitialDownloadPolicy; + initialUploadPolicy?: InitialUploadPolicy; readonly lastOperationName?: string; - readonly syncStatus?: ServerEndpointSyncStatus; + readonly lastWorkflowId?: string; + localCacheMode?: LocalCacheMode; offlineDataTransfer?: FeatureStatus; + offlineDataTransferShareName?: string; readonly offlineDataTransferStorageAccountResourceId?: string; readonly offlineDataTransferStorageAccountTenantId?: string; - offlineDataTransferShareName?: string; - readonly cloudTieringStatus?: ServerEndpointCloudTieringStatus; + readonly provisioningState?: string; readonly recallStatus?: ServerEndpointRecallStatus; - initialDownloadPolicy?: InitialDownloadPolicy; - localCacheMode?: LocalCacheMode; - initialUploadPolicy?: InitialUploadPolicy; + serverLocalPath?: string; readonly serverName?: string; -}; + serverResourceId?: string; + readonly syncStatus?: ServerEndpointSyncStatus; + tierFilesOlderThanDays?: number; + volumeFreeSpacePercent?: number; +} // @public export interface ServerEndpointArray { @@ -1060,24 +1048,25 @@ export interface ServerEndpointCloudTieringStatus { readonly lastCloudTieringResult?: number; readonly lastSuccessTimestamp?: Date; readonly lastUpdatedTimestamp?: Date; + readonly lowDiskMode?: CloudTieringLowDiskMode; readonly spaceSavings?: CloudTieringSpaceSavings; readonly volumeFreeSpacePolicyStatus?: CloudTieringVolumeFreeSpacePolicyStatus; } // @public -export type ServerEndpointCreateParameters = ProxyResource & { - serverLocalPath?: string; +export interface ServerEndpointCreateParameters extends ProxyResource { cloudTiering?: FeatureStatus; - volumeFreeSpacePercent?: number; - tierFilesOlderThanDays?: number; friendlyName?: string; - serverResourceId?: string; - offlineDataTransfer?: FeatureStatus; - offlineDataTransferShareName?: string; initialDownloadPolicy?: InitialDownloadPolicy; - localCacheMode?: LocalCacheMode; initialUploadPolicy?: InitialUploadPolicy; -}; + localCacheMode?: LocalCacheMode; + offlineDataTransfer?: FeatureStatus; + offlineDataTransferShareName?: string; + serverLocalPath?: string; + serverResourceId?: string; + tierFilesOlderThanDays?: number; + volumeFreeSpacePercent?: number; +} // @public export interface ServerEndpointFilesNotSyncingError { @@ -1267,7 +1256,7 @@ export interface ServerEndpointUpdateParameters { export interface StorageSyncApiError { code?: string; details?: StorageSyncErrorDetails; - innerError?: StorageSyncInnerErrorDetails; + innererror?: StorageSyncInnerErrorDetails; message?: string; target?: string; } @@ -1299,15 +1288,15 @@ export interface StorageSyncInnerErrorDetails { } // @public -export type StorageSyncService = TrackedResource & { +export interface StorageSyncService extends TrackedResource { incomingTrafficPolicy?: IncomingTrafficPolicy; - readonly storageSyncServiceStatus?: number; - readonly storageSyncServiceUid?: string; - readonly provisioningState?: string; - readonly lastWorkflowId?: string; readonly lastOperationName?: string; + readonly lastWorkflowId?: string; readonly privateEndpointConnections?: PrivateEndpointConnection[]; -}; + readonly provisioningState?: string; + readonly storageSyncServiceStatus?: number; + readonly storageSyncServiceUid?: string; +} // @public export interface StorageSyncServiceArray { @@ -1448,10 +1437,10 @@ export interface SubscriptionState { } // @public -export type SyncGroup = ProxyResource & { - readonly uniqueId?: string; +export interface SyncGroup extends ProxyResource { readonly syncGroupStatus?: string; -}; + readonly uniqueId?: string; +} // @public export interface SyncGroupArray { @@ -1459,9 +1448,9 @@ export interface SyncGroupArray { } // @public -export type SyncGroupCreateParameters = ProxyResource & { +export interface SyncGroupCreateParameters extends ProxyResource { properties?: Record; -}; +} // @public export interface SyncGroups { @@ -1524,12 +1513,22 @@ export interface SyncGroupsListByStorageSyncServiceOptionalParams extends coreCl export type SyncGroupsListByStorageSyncServiceResponse = SyncGroupsListByStorageSyncServiceHeaders & SyncGroupArray; // @public -export type TrackedResource = Resource & { +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export interface TrackedResource extends Resource { + location: string; tags?: { [propertyName: string]: string; }; - location: string; -}; +} // @public export interface TriggerChangeDetectionParameters { @@ -1544,16 +1543,16 @@ export interface TriggerRolloverRequest { } // @public -export type Workflow = ProxyResource & { - lastStepName?: string; - status?: WorkflowStatus; - operation?: OperationDirection; - steps?: string; - lastOperationId?: string; +export interface Workflow extends ProxyResource { readonly commandName?: string; readonly createdTimestamp?: Date; + lastOperationId?: string; readonly lastStatusTimestamp?: Date; -}; + lastStepName?: string; + operation?: OperationDirection; + status?: WorkflowStatus; + steps?: string; +} // @public export interface WorkflowArray { diff --git a/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts b/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts index 84c07907587e..320d8da12825 100644 --- a/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts +++ b/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, @@ -73,7 +78,7 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-storagesync/9.0.2`; + const packageDetails = `azsdk-js-arm-storagesync/10.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -120,7 +125,7 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2020-09-01"; + this.apiVersion = options.apiVersion || "2022-06-01"; this.operations = new OperationsImpl(this); this.storageSyncServices = new StorageSyncServicesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); @@ -131,6 +136,35 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { this.registeredServers = new RegisteredServersImpl(this); this.workflows = new WorkflowsImpl(this); this.operationStatusOperations = new OperationStatusOperationsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } /** diff --git a/sdk/storagesync/arm-storagesync/src/models/index.ts b/sdk/storagesync/arm-storagesync/src/models/index.ts index 2034b7be0e7f..eb9e548a2ba7 100644 --- a/sdk/storagesync/arm-storagesync/src/models/index.ts +++ b/sdk/storagesync/arm-storagesync/src/models/index.ts @@ -64,6 +64,8 @@ export interface OperationResourceMetricSpecification { unit?: string; /** Aggregation type for the metric. */ aggregationType?: string; + /** Supported aggregation types for the metric. */ + supportedAggregationTypes?: string[]; /** Fill gaps in the metric with zero. */ fillGapWithZero?: boolean; /** Dimensions for the metric specification. */ @@ -99,7 +101,7 @@ export interface StorageSyncApiError { /** Error details of the given entry. */ details?: StorageSyncErrorDetails; /** Inner error details of the given entry. */ - innerError?: StorageSyncInnerErrorDetails; + innererror?: StorageSyncInnerErrorDetails; } /** Error Details object. */ @@ -207,6 +209,27 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } /** Parameters for updating an Storage sync service. */ @@ -444,6 +467,20 @@ export interface TriggerChangeDetectionParameters { paths?: string[]; } +/** Cloud endpoint AFS file share metadata signing certificate public keys. */ +export interface CloudEndpointAfsShareMetadataCertificatePublicKeys { + /** + * The first public key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firstKey?: string; + /** + * The second public key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly secondKey?: string; +} + /** Server Endpoint sync status */ export interface ServerEndpointSyncStatus { /** @@ -691,6 +728,11 @@ export interface ServerEndpointCloudTieringStatus { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly datePolicyStatus?: CloudTieringDatePolicyStatus; + /** + * Information regarding the low disk mode state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lowDiskMode?: CloudTieringLowDiskMode; } /** Server endpoint cloud tiering status object. */ @@ -817,6 +859,20 @@ export interface CloudTieringDatePolicyStatus { readonly tieredFilesMostRecentAccessTimestamp?: Date; } +/** Information regarding the low disk mode state */ +export interface CloudTieringLowDiskMode { + /** + * Last updated timestamp + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Low disk mode state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: CloudTieringLowDiskModeState; +} + /** Server endpoint recall status object. */ export interface ServerEndpointRecallStatus { /** @@ -1000,7 +1056,7 @@ export interface OperationDisplayResource { } /** The Private Endpoint Connection resource. */ -export type PrivateEndpointConnection = Resource & { +export interface PrivateEndpointConnection extends Resource { /** The resource of private end point. */ privateEndpoint?: PrivateEndpoint; /** A collection of information about the state of the connection between service consumer and provider. */ @@ -1010,18 +1066,18 @@ export type PrivateEndpointConnection = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: PrivateEndpointConnectionProvisioningState; -}; +} /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; -}; +} /** A private link resource */ -export type PrivateLinkResource = Resource & { +export interface PrivateLinkResource extends Resource { /** * The private link resource group id. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1034,13 +1090,13 @@ export type PrivateLinkResource = Resource & { readonly requiredMembers?: string[]; /** The private link resource Private link DNS zone name. */ requiredZoneNames?: string[]; -}; +} /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource {} /** Storage Sync Service object. */ -export type StorageSyncService = TrackedResource & { +export interface StorageSyncService extends TrackedResource { /** Incoming Traffic Policy */ incomingTrafficPolicy?: IncomingTrafficPolicy; /** @@ -1073,10 +1129,10 @@ export type StorageSyncService = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateEndpointConnections?: PrivateEndpointConnection[]; -}; +} /** Sync Group object. */ -export type SyncGroup = ProxyResource & { +export interface SyncGroup extends ProxyResource { /** * Unique Id * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1087,16 +1143,16 @@ export type SyncGroup = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly syncGroupStatus?: string; -}; +} /** The parameters used when creating a sync group. */ -export type SyncGroupCreateParameters = ProxyResource & { +export interface SyncGroupCreateParameters extends ProxyResource { /** The parameters used to create the sync group */ properties?: Record; -}; +} /** The parameters used when creating a cloud endpoint. */ -export type CloudEndpointCreateParameters = ProxyResource & { +export interface CloudEndpointCreateParameters extends ProxyResource { /** Storage Account Resource Id */ storageAccountResourceId?: string; /** Azure file share name */ @@ -1105,10 +1161,10 @@ export type CloudEndpointCreateParameters = ProxyResource & { storageAccountTenantId?: string; /** Friendly Name */ friendlyName?: string; -}; +} /** Cloud Endpoint object. */ -export type CloudEndpoint = ProxyResource & { +export interface CloudEndpoint extends ProxyResource { /** Storage Account Resource Id */ storageAccountResourceId?: string; /** Azure file share name */ @@ -1135,10 +1191,10 @@ export type CloudEndpoint = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly changeEnumerationStatus?: CloudEndpointChangeEnumerationStatus; -}; +} /** The parameters used when creating a server endpoint. */ -export type ServerEndpointCreateParameters = ProxyResource & { +export interface ServerEndpointCreateParameters extends ProxyResource { /** Server Local path. */ serverLocalPath?: string; /** Cloud Tiering. */ @@ -1161,10 +1217,10 @@ export type ServerEndpointCreateParameters = ProxyResource & { localCacheMode?: LocalCacheMode; /** Policy for how the initial upload sync session is performed. */ initialUploadPolicy?: InitialUploadPolicy; -}; +} /** Server Endpoint object. */ -export type ServerEndpoint = ProxyResource & { +export interface ServerEndpoint extends ProxyResource { /** Server Local path. */ serverLocalPath?: string; /** Cloud Tiering. */ @@ -1232,10 +1288,10 @@ export type ServerEndpoint = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serverName?: string; -}; +} /** Registered Server resource. */ -export type RegisteredServer = ProxyResource & { +export interface RegisteredServer extends ProxyResource { /** Registered Server Certificate */ serverCertificate?: string; /** Registered Server Agent Version */ @@ -1291,10 +1347,10 @@ export type RegisteredServer = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serverName?: string; -}; +} /** The parameters used when creating a registered server. */ -export type RegisteredServerCreateParameters = ProxyResource & { +export interface RegisteredServerCreateParameters extends ProxyResource { /** Registered Server Certificate */ serverCertificate?: string; /** Registered Server Agent Version */ @@ -1313,10 +1369,10 @@ export type RegisteredServerCreateParameters = ProxyResource & { serverId?: string; /** Friendly Name */ friendlyName?: string; -}; +} /** Workflow resource. */ -export type Workflow = ProxyResource & { +export interface Workflow extends ProxyResource { /** last step name */ lastStepName?: string; /** workflow status. */ @@ -1342,7 +1398,7 @@ export type Workflow = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastStatusTimestamp?: Date; -}; +} /** Defines headers for Operations_list operation. */ export interface OperationsListHeaders { @@ -1572,6 +1628,14 @@ export interface CloudEndpointsTriggerChangeDetectionHeaders { xMsCorrelationRequestId?: string; } +/** Defines headers for CloudEndpoints_afsShareMetadataCertificatePublicKeys operation. */ +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders { + /** request id. */ + xMsRequestId?: string; + /** correlation request id. */ + xMsCorrelationRequestId?: string; +} + /** Defines headers for ServerEndpoints_create operation. */ export interface ServerEndpointsCreateHeaders { /** request id. */ @@ -1704,7 +1768,9 @@ export interface MicrosoftStorageSyncLocationOperationStatusHeaders { /** Known values of {@link IncomingTrafficPolicy} that the service accepts. */ export enum KnownIncomingTrafficPolicy { + /** AllowAllTraffic */ AllowAllTraffic = "AllowAllTraffic", + /** AllowVirtualNetworksOnly */ AllowVirtualNetworksOnly = "AllowVirtualNetworksOnly" } @@ -1720,8 +1786,11 @@ export type IncomingTrafficPolicy = string; /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ export enum KnownPrivateEndpointServiceConnectionStatus { + /** Pending */ Pending = "Pending", + /** Approved */ Approved = "Approved", + /** Rejected */ Rejected = "Rejected" } @@ -1738,9 +1807,13 @@ export type PrivateEndpointServiceConnectionStatus = string; /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ export enum KnownPrivateEndpointConnectionProvisioningState { + /** Succeeded */ Succeeded = "Succeeded", + /** Creating */ Creating = "Creating", + /** Deleting */ Deleting = "Deleting", + /** Failed */ Failed = "Failed" } @@ -1756,9 +1829,35 @@ export enum KnownPrivateEndpointConnectionProvisioningState { */ export type PrivateEndpointConnectionProvisioningState = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link CloudEndpointChangeEnumerationActivityState} that the service accepts. */ export enum KnownCloudEndpointChangeEnumerationActivityState { + /** InitialEnumerationInProgress */ InitialEnumerationInProgress = "InitialEnumerationInProgress", + /** EnumerationInProgress */ EnumerationInProgress = "EnumerationInProgress" } @@ -1774,7 +1873,9 @@ export type CloudEndpointChangeEnumerationActivityState = string; /** Known values of {@link CloudEndpointChangeEnumerationTotalCountsState} that the service accepts. */ export enum KnownCloudEndpointChangeEnumerationTotalCountsState { + /** Calculating */ Calculating = "Calculating", + /** Final */ Final = "Final" } @@ -1790,7 +1891,9 @@ export type CloudEndpointChangeEnumerationTotalCountsState = string; /** Known values of {@link ChangeDetectionMode} that the service accepts. */ export enum KnownChangeDetectionMode { + /** Default */ Default = "Default", + /** Recursive */ Recursive = "Recursive" } @@ -1806,7 +1909,9 @@ export type ChangeDetectionMode = string; /** Known values of {@link FeatureStatus} that the service accepts. */ export enum KnownFeatureStatus { + /** On */ On = "on", + /** Off */ Off = "off" } @@ -1822,8 +1927,11 @@ export type FeatureStatus = string; /** Known values of {@link InitialDownloadPolicy} that the service accepts. */ export enum KnownInitialDownloadPolicy { + /** NamespaceOnly */ NamespaceOnly = "NamespaceOnly", + /** NamespaceThenModifiedFiles */ NamespaceThenModifiedFiles = "NamespaceThenModifiedFiles", + /** AvoidTieredFiles */ AvoidTieredFiles = "AvoidTieredFiles" } @@ -1840,7 +1948,9 @@ export type InitialDownloadPolicy = string; /** Known values of {@link LocalCacheMode} that the service accepts. */ export enum KnownLocalCacheMode { + /** DownloadNewAndModifiedFiles */ DownloadNewAndModifiedFiles = "DownloadNewAndModifiedFiles", + /** UpdateLocallyCachedFiles */ UpdateLocallyCachedFiles = "UpdateLocallyCachedFiles" } @@ -1856,7 +1966,9 @@ export type LocalCacheMode = string; /** Known values of {@link InitialUploadPolicy} that the service accepts. */ export enum KnownInitialUploadPolicy { + /** ServerAuthoritative */ ServerAuthoritative = "ServerAuthoritative", + /** Merge */ Merge = "Merge" } @@ -1872,8 +1984,11 @@ export type InitialUploadPolicy = string; /** Known values of {@link ServerEndpointHealthState} that the service accepts. */ export enum KnownServerEndpointHealthState { + /** Unavailable */ Unavailable = "Unavailable", + /** Healthy */ Healthy = "Healthy", + /** Error */ Error = "Error" } @@ -1890,8 +2005,11 @@ export type ServerEndpointHealthState = string; /** Known values of {@link ServerEndpointSyncActivityState} that the service accepts. */ export enum KnownServerEndpointSyncActivityState { + /** Upload */ Upload = "Upload", + /** Download */ Download = "Download", + /** UploadAndDownload */ UploadAndDownload = "UploadAndDownload" } @@ -1908,10 +2026,15 @@ export type ServerEndpointSyncActivityState = string; /** Known values of {@link ServerEndpointSyncMode} that the service accepts. */ export enum KnownServerEndpointSyncMode { + /** Regular */ Regular = "Regular", + /** NamespaceDownload */ NamespaceDownload = "NamespaceDownload", + /** InitialUpload */ InitialUpload = "InitialUpload", + /** SnapshotUpload */ SnapshotUpload = "SnapshotUpload", + /** InitialFullDownload */ InitialFullDownload = "InitialFullDownload" } @@ -1930,9 +2053,13 @@ export type ServerEndpointSyncMode = string; /** Known values of {@link ServerEndpointOfflineDataTransferState} that the service accepts. */ export enum KnownServerEndpointOfflineDataTransferState { + /** InProgress */ InProgress = "InProgress", + /** Stopping */ Stopping = "Stopping", + /** NotRunning */ NotRunning = "NotRunning", + /** Complete */ Complete = "Complete" } @@ -1948,11 +2075,33 @@ export enum KnownServerEndpointOfflineDataTransferState { */ export type ServerEndpointOfflineDataTransferState = string; +/** Known values of {@link CloudTieringLowDiskModeState} that the service accepts. */ +export enum KnownCloudTieringLowDiskModeState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for CloudTieringLowDiskModeState. \ + * {@link KnownCloudTieringLowDiskModeState} can be used interchangeably with CloudTieringLowDiskModeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type CloudTieringLowDiskModeState = string; + /** Known values of {@link RegisteredServerAgentVersionStatus} that the service accepts. */ export enum KnownRegisteredServerAgentVersionStatus { + /** Ok */ Ok = "Ok", + /** NearExpiry */ NearExpiry = "NearExpiry", + /** Expired */ Expired = "Expired", + /** Blocked */ Blocked = "Blocked" } @@ -1970,10 +2119,15 @@ export type RegisteredServerAgentVersionStatus = string; /** Known values of {@link WorkflowStatus} that the service accepts. */ export enum KnownWorkflowStatus { + /** Active */ Active = "active", + /** Expired */ Expired = "expired", + /** Succeeded */ Succeeded = "succeeded", + /** Aborted */ Aborted = "aborted", + /** Failed */ Failed = "failed" } @@ -1992,8 +2146,11 @@ export type WorkflowStatus = string; /** Known values of {@link OperationDirection} that the service accepts. */ export enum KnownOperationDirection { + /** Do */ Do = "do", + /** Undo */ Undo = "undo", + /** Cancel */ Cancel = "cancel" } @@ -2010,10 +2167,15 @@ export type OperationDirection = string; /** Known values of {@link Reason} that the service accepts. */ export enum KnownReason { + /** Registered */ Registered = "Registered", + /** Unregistered */ Unregistered = "Unregistered", + /** Warned */ Warned = "Warned", + /** Suspended */ Suspended = "Suspended", + /** Deleted */ Deleted = "Deleted" } @@ -2032,10 +2194,15 @@ export type Reason = string; /** Known values of {@link ProgressType} that the service accepts. */ export enum KnownProgressType { + /** None */ None = "none", + /** Initialize */ Initialize = "initialize", + /** Download */ Download = "download", + /** Upload */ Upload = "upload", + /** Recall */ Recall = "recall" } @@ -2312,6 +2479,14 @@ export interface CloudEndpointsTriggerChangeDetectionOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the afsShareMetadataCertificatePublicKeys operation. */ +export type CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse = CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders & + CloudEndpointAfsShareMetadataCertificatePublicKeys; + /** Optional parameters. */ export interface ServerEndpointsCreateOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/storagesync/arm-storagesync/src/models/mappers.ts b/sdk/storagesync/arm-storagesync/src/models/mappers.ts index 56e7b37c8720..59dbaef0b680 100644 --- a/sdk/storagesync/arm-storagesync/src/models/mappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/mappers.ts @@ -175,6 +175,17 @@ export const OperationResourceMetricSpecification: coreClient.CompositeMapper = name: "String" } }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, fillGapWithZero: { serializedName: "fillGapWithZero", type: { @@ -277,8 +288,8 @@ export const StorageSyncApiError: coreClient.CompositeMapper = { className: "StorageSyncErrorDetails" } }, - innerError: { - serializedName: "innerError", + innererror: { + serializedName: "innererror", type: { name: "Composite", className: "StorageSyncInnerErrorDetails" @@ -530,6 +541,58 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -1094,6 +1157,29 @@ export const TriggerChangeDetectionParameters: coreClient.CompositeMapper = { } }; +export const CloudEndpointAfsShareMetadataCertificatePublicKeys: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudEndpointAfsShareMetadataCertificatePublicKeys", + modelProperties: { + firstKey: { + serializedName: "firstKey", + readOnly: true, + type: { + name: "String" + } + }, + secondKey: { + serializedName: "secondKey", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ServerEndpointSyncStatus: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1507,6 +1593,13 @@ export const ServerEndpointCloudTieringStatus: coreClient.CompositeMapper = { name: "Composite", className: "CloudTieringDatePolicyStatus" } + }, + lowDiskMode: { + serializedName: "lowDiskMode", + type: { + name: "Composite", + className: "CloudTieringLowDiskMode" + } } } } @@ -1752,6 +1845,29 @@ export const CloudTieringDatePolicyStatus: coreClient.CompositeMapper = { } }; +export const CloudTieringLowDiskMode: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudTieringLowDiskMode", + modelProperties: { + lastUpdatedTimestamp: { + serializedName: "lastUpdatedTimestamp", + readOnly: true, + type: { + name: "DateTime" + } + }, + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ServerEndpointRecallStatus: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2505,6 +2621,7 @@ export const ServerEndpointCreateParameters: coreClient.CompositeMapper = { } }, tierFilesOlderThanDays: { + defaultValue: 0, constraints: { InclusiveMaximum: 2147483647, InclusiveMinimum: 0 @@ -3593,6 +3710,27 @@ export const CloudEndpointsTriggerChangeDetectionHeaders: coreClient.CompositeMa } }; +export const CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String" + } + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String" + } + } + } + } +}; + export const ServerEndpointsCreateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/storagesync/arm-storagesync/src/models/parameters.ts b/sdk/storagesync/arm-storagesync/src/models/parameters.ts index 1a6b7e7c886b..889b9f10bb54 100644 --- a/sdk/storagesync/arm-storagesync/src/models/parameters.ts +++ b/sdk/storagesync/arm-storagesync/src/models/parameters.ts @@ -56,7 +56,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2020-09-01", + defaultValue: "2022-06-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts index e4d505eeebf4..4e5d2e2e5ff4 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts @@ -37,7 +37,9 @@ import { PostRestoreRequest, CloudEndpointsPostRestoreOptionalParams, TriggerChangeDetectionParameters, - CloudEndpointsTriggerChangeDetectionOptionalParams + CloudEndpointsTriggerChangeDetectionOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse } from "../models"; /// @@ -937,6 +939,33 @@ export class CloudEndpointsImpl implements CloudEndpoints { ); return poller.pollUntilDone(); } + + /** + * Get the AFS file share metadata signing certificate public keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param cloudEndpointName Name of Cloud Endpoint object. + * @param options The options parameters. + */ + afsShareMetadataCertificatePublicKeys( + resourceGroupName: string, + storageSyncServiceName: string, + syncGroupName: string, + cloudEndpointName: string, + options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + storageSyncServiceName, + syncGroupName, + cloudEndpointName, + options + }, + afsShareMetadataCertificatePublicKeysOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -1241,3 +1270,29 @@ const triggerChangeDetectionOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const afsShareMetadataCertificatePublicKeysOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/afsShareMetadataCertificatePublicKeys", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CloudEndpointAfsShareMetadataCertificatePublicKeys, + headersMapper: + Mappers.CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders + }, + default: { + bodyMapper: Mappers.StorageSyncError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.syncGroupName, + Parameters.cloudEndpointName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts index aee04df08ce5..6cf4e761e3a0 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts @@ -30,7 +30,9 @@ import { PostRestoreRequest, CloudEndpointsPostRestoreOptionalParams, TriggerChangeDetectionParameters, - CloudEndpointsTriggerChangeDetectionOptionalParams + CloudEndpointsTriggerChangeDetectionOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse } from "../models"; /// @@ -335,4 +337,19 @@ export interface CloudEndpoints { parameters: TriggerChangeDetectionParameters, options?: CloudEndpointsTriggerChangeDetectionOptionalParams ): Promise; + /** + * Get the AFS file share metadata signing certificate public keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param cloudEndpointName Name of Cloud Endpoint object. + * @param options The options parameters. + */ + afsShareMetadataCertificatePublicKeys( + resourceGroupName: string, + storageSyncServiceName: string, + syncGroupName: string, + cloudEndpointName: string, + options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams + ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/test/sampleTest.ts b/sdk/storagesync/arm-storagesync/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/storagesync/arm-storagesync/test/sampleTest.ts +++ b/sdk/storagesync/arm-storagesync/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - 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" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +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() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/storagesync/arm-storagesync/tsconfig.json b/sdk/storagesync/arm-storagesync/tsconfig.json index 7b624a8f1409..3e6ae96443f3 100644 --- a/sdk/storagesync/arm-storagesync/tsconfig.json +++ b/sdk/storagesync/arm-storagesync/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-storagesync": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"