From e6de8eef8863a5f9034c8a51a33d1e772c76f863 Mon Sep 17 00:00:00 2001 From: ZiWei Chen <98569699+kazrael2119@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:18:12 +0800 Subject: [PATCH] [mgmt] appconfiguration release (#31714) https://github.com/Azure/sdk-release-request/issues/5631 --- common/config/rush/pnpm-lock.yaml | 12 +- .../arm-appconfiguration/CHANGELOG.md | 36 +- .../arm-appconfiguration/LICENSE | 2 +- .../arm-appconfiguration/_meta.json | 8 +- .../arm-appconfiguration/assets.json | 2 +- .../arm-appconfiguration/package.json | 73 +- .../review/arm-appconfiguration.api.md | 111 ++ .../configurationStoresCreateSample.ts | 66 +- .../configurationStoresDeleteSample.ts | 6 +- .../configurationStoresGetDeletedSample.ts | 6 +- .../configurationStoresGetSample.ts | 6 +- ...gurationStoresListByResourceGroupSample.ts | 6 +- .../configurationStoresListDeletedSample.ts | 4 +- .../configurationStoresListKeysSample.ts | 6 +- .../configurationStoresListSample.ts | 4 +- .../configurationStoresPurgeDeletedSample.ts | 6 +- .../configurationStoresRegenerateKeySample.ts | 10 +- .../configurationStoresUpdateSample.ts | 31 +- .../keyValuesCreateOrUpdateSample.ts | 14 +- .../samples-dev/keyValuesDeleteSample.ts | 10 +- .../samples-dev/keyValuesGetSample.ts | 10 +- .../operationsCheckNameAvailabilitySample.ts | 18 +- .../samples-dev/operationsListSample.ts | 4 +- ...ionsRegionalCheckNameAvailabilitySample.ts | 18 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 23 +- .../privateEndpointConnectionsDeleteSample.ts | 6 +- .../privateEndpointConnectionsGetSample.ts | 6 +- ...nnectionsListByConfigurationStoreSample.ts | 6 +- .../privateLinkResourcesGetSample.ts | 6 +- ...ResourcesListByConfigurationStoreSample.ts | 6 +- .../samples-dev/replicasCreateSample.ts | 8 +- .../samples-dev/replicasDeleteSample.ts | 6 +- .../samples-dev/replicasGetSample.ts | 6 +- .../replicasListByConfigurationStoreSample.ts | 6 +- .../samples-dev/snapshotsCreateSample.ts | 56 + .../samples-dev/snapshotsGetSample.ts | 48 + .../samples/v4/javascript/README.md | 58 +- .../configurationStoresCreateSample.js | 42 +- .../configurationStoresDeleteSample.js | 4 +- .../configurationStoresGetDeletedSample.js | 2 +- .../configurationStoresGetSample.js | 2 +- ...gurationStoresListByResourceGroupSample.js | 2 +- .../configurationStoresListDeletedSample.js | 2 +- .../configurationStoresListKeysSample.js | 2 +- .../configurationStoresListSample.js | 2 +- .../configurationStoresPurgeDeletedSample.js | 4 +- .../configurationStoresRegenerateKeySample.js | 4 +- .../configurationStoresUpdateSample.js | 12 +- .../keyValuesCreateOrUpdateSample.js | 8 +- .../v4/javascript/keyValuesDeleteSample.js | 8 +- .../v4/javascript/keyValuesGetSample.js | 6 +- .../operationsCheckNameAvailabilitySample.js | 4 +- .../v4/javascript/operationsListSample.js | 2 +- ...ionsRegionalCheckNameAvailabilitySample.js | 8 +- ...EndpointConnectionsCreateOrUpdateSample.js | 4 +- .../privateEndpointConnectionsDeleteSample.js | 4 +- .../privateEndpointConnectionsGetSample.js | 4 +- ...nnectionsListByConfigurationStoreSample.js | 4 +- .../privateLinkResourcesGetSample.js | 4 +- ...ResourcesListByConfigurationStoreSample.js | 4 +- .../v4/javascript/replicasCreateSample.js | 4 +- .../v4/javascript/replicasDeleteSample.js | 4 +- .../v4/javascript/replicasGetSample.js | 2 +- .../replicasListByConfigurationStoreSample.js | 4 +- .../v4/javascript/snapshotsCreateSample.js | 46 + .../v4/javascript/snapshotsGetSample.js | 37 + .../samples/v4/typescript/README.md | 58 +- .../src/configurationStoresCreateSample.ts | 66 +- .../src/configurationStoresDeleteSample.ts | 6 +- .../configurationStoresGetDeletedSample.ts | 6 +- .../src/configurationStoresGetSample.ts | 6 +- ...gurationStoresListByResourceGroupSample.ts | 6 +- .../configurationStoresListDeletedSample.ts | 4 +- .../src/configurationStoresListKeysSample.ts | 6 +- .../src/configurationStoresListSample.ts | 4 +- .../configurationStoresPurgeDeletedSample.ts | 6 +- .../configurationStoresRegenerateKeySample.ts | 10 +- .../src/configurationStoresUpdateSample.ts | 31 +- .../src/keyValuesCreateOrUpdateSample.ts | 14 +- .../typescript/src/keyValuesDeleteSample.ts | 10 +- .../v4/typescript/src/keyValuesGetSample.ts | 10 +- .../operationsCheckNameAvailabilitySample.ts | 18 +- .../v4/typescript/src/operationsListSample.ts | 4 +- ...ionsRegionalCheckNameAvailabilitySample.ts | 18 +- ...EndpointConnectionsCreateOrUpdateSample.ts | 23 +- .../privateEndpointConnectionsDeleteSample.ts | 6 +- .../privateEndpointConnectionsGetSample.ts | 6 +- ...nnectionsListByConfigurationStoreSample.ts | 6 +- .../src/privateLinkResourcesGetSample.ts | 6 +- ...ResourcesListByConfigurationStoreSample.ts | 6 +- .../v4/typescript/src/replicasCreateSample.ts | 8 +- .../v4/typescript/src/replicasDeleteSample.ts | 6 +- .../v4/typescript/src/replicasGetSample.ts | 6 +- .../replicasListByConfigurationStoreSample.ts | 6 +- .../typescript/src/snapshotsCreateSample.ts | 56 + .../v4/typescript/src/snapshotsGetSample.ts | 48 + .../src/appConfigurationManagementClient.ts | 39 +- .../arm-appconfiguration/src/lroImpl.ts | 6 +- .../arm-appconfiguration/src/models/index.ts | 260 +++- .../src/models/mappers.ts | 1157 ++++++++++------- .../src/models/parameters.ts | 149 ++- .../src/operations/configurationStores.ts | 401 +++--- .../src/operations/index.ts | 1 + .../src/operations/keyValues.ts | 91 +- .../src/operations/operations.ts | 64 +- .../operations/privateEndpointConnections.ts | 195 ++- .../src/operations/privateLinkResources.ts | 96 +- .../src/operations/replicas.ts | 160 ++- .../src/operations/snapshots.ts | 222 ++++ .../configurationStores.ts | 32 +- .../src/operationsInterfaces/index.ts | 1 + .../src/operationsInterfaces/keyValues.ts | 23 +- .../src/operationsInterfaces/operations.ts | 8 +- .../privateEndpointConnections.ts | 14 +- .../privateLinkResources.ts | 6 +- .../src/operationsInterfaces/replicas.ts | 14 +- .../src/operationsInterfaces/snapshots.ts | 74 ++ .../arm-appconfiguration/src/pagingHelper.ts | 2 +- .../appconfiguration_operations_test.spec.ts | 112 ++ .../arm-appconfiguration/test/sampleTest.ts | 47 - 120 files changed, 2989 insertions(+), 1596 deletions(-) create mode 100644 sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsCreateSample.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsGetSample.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsCreateSample.js create mode 100644 sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsGetSample.js create mode 100644 sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsCreateSample.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsGetSample.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/src/operations/snapshots.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/snapshots.ts create mode 100644 sdk/appconfiguration/arm-appconfiguration/test/appconfiguration_operations_test.spec.ts delete mode 100644 sdk/appconfiguration/arm-appconfiguration/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ff78f7c10ff..23d4fd2bc43 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12927,7 +12927,7 @@ packages: dev: false file:projects/arm-appconfiguration.tgz: - resolution: {integrity: sha512-EOuGlK//o9Q6ZTfGkNQX+S9NfNafcPyPbkIYHh+oX87R0Y9SX9QEhomS3R5QmMdJkSat/H6MdHbjuUxgmwFzUA==, tarball: file:projects/arm-appconfiguration.tgz} + resolution: {integrity: sha512-5sEU/bwa68Xuicl7B/9ZrSURgbVEcWd2lQWO7Hq6rhxyn8z1VvORi3MOPmPVE+94JTYG6Du0fLQPdt3DuwQkuQ==, tarball: file:projects/arm-appconfiguration.tgz} name: '@rush-temp/arm-appconfiguration' version: 0.0.0 dependencies: @@ -12935,15 +12935,21 @@ packages: '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 + '@microsoft/api-extractor': 7.47.11(@types/node@18.19.64) '@types/chai': 4.3.20 '@types/mocha': 10.0.9 '@types/node': 18.19.64 chai: 4.3.10 + cross-env: 7.0.3 dotenv: 16.4.5 + mkdirp: 3.0.1 mocha: 10.8.2 - ts-node: 10.9.2(@types/node@18.19.64)(typescript@5.6.3) + rimraf: 5.0.10 + ts-node: 10.9.2(@types/node@18.19.64)(typescript@5.5.4) tslib: 2.8.1 - typescript: 5.6.3 + tsx: 4.19.2 + typescript: 5.5.4 + uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' diff --git a/sdk/appconfiguration/arm-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/arm-appconfiguration/CHANGELOG.md index 74fcf770edb..8bd9e49303e 100644 --- a/sdk/appconfiguration/arm-appconfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/arm-appconfiguration/CHANGELOG.md @@ -1,15 +1,31 @@ # Release History - -## 4.0.1 (Unreleased) - + +## 4.1.0 (2024-11-11) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group Snapshots + - Added Interface DataPlaneProxyProperties + - Added Interface ErrorDetail + - Added Interface ErrorResponseAutoGenerated + - Added Interface KeyValueFilter + - Added Interface Snapshot + - Added Interface SnapshotsCreateOptionalParams + - Added Interface SnapshotsGetOptionalParams + - Added Type Alias AuthenticationMode + - Added Type Alias CompositionType + - Added Type Alias PrivateLinkDelegation + - Added Type Alias SnapshotsCreateResponse + - Added Type Alias SnapshotsGetResponse + - Added Type Alias SnapshotStatus + - Interface ConfigurationStore has a new optional parameter dataPlaneProxy + - Interface ConfigurationStoreUpdateParameters has a new optional parameter dataPlaneProxy + - Added Enum KnownAuthenticationMode + - Added Enum KnownCompositionType + - Added Enum KnownPrivateLinkDelegation + - Added Enum KnownSnapshotStatus + + ## 4.0.0 (2023-04-06) ### Features Added @@ -66,4 +82,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/appconfiguration/arm-appconfiguration/LICENSE b/sdk/appconfiguration/arm-appconfiguration/LICENSE index 3a1d9b6f24f..7d593474096 100644 --- a/sdk/appconfiguration/arm-appconfiguration/LICENSE +++ b/sdk/appconfiguration/arm-appconfiguration/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/appconfiguration/arm-appconfiguration/_meta.json b/sdk/appconfiguration/arm-appconfiguration/_meta.json index 5b947e9863f..4b3af27f2d8 100644 --- a/sdk/appconfiguration/arm-appconfiguration/_meta.json +++ b/sdk/appconfiguration/arm-appconfiguration/_meta.json @@ -1,8 +1,8 @@ { - "commit": "8725e0700974d2c8cba436b5696728ebc5a80f1b", + "commit": "2d4992bd73955a93f972ba6c476e980e7e16a992", "readme": "specification/appconfiguration/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\appconfiguration\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\appconfiguration\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.10" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.15", + "use": "@autorest/typescript@6.0.27" } \ No newline at end of file diff --git a/sdk/appconfiguration/arm-appconfiguration/assets.json b/sdk/appconfiguration/arm-appconfiguration/assets.json index 74657d31aa8..d88f413fd16 100644 --- a/sdk/appconfiguration/arm-appconfiguration/assets.json +++ b/sdk/appconfiguration/arm-appconfiguration/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "js", "TagPrefix": "js/appconfiguration/arm-appconfiguration", - "Tag": "js/appconfiguration/arm-appconfiguration_1babe9e8b6" + "Tag": "js/appconfiguration/arm-appconfiguration_d393624d99" } diff --git a/sdk/appconfiguration/arm-appconfiguration/package.json b/sdk/appconfiguration/arm-appconfiguration/package.json index f1a10686f37..b1ec2befd5b 100644 --- a/sdk/appconfiguration/arm-appconfiguration/package.json +++ b/sdk/appconfiguration/arm-appconfiguration/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AppConfigurationManagementClient.", - "version": "4.0.1", + "version": "4.1.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,18 +28,24 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-appconfiguration.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@microsoft/api-extractor": "^7.31.1", + "mkdirp": "^3.0.1", + "typescript": "~5.5.3", + "uglify-js": "^3.4.9", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", "mocha": "^10.0.0", - "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "@types/mocha": "^10.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -67,29 +73,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", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "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", + "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:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", "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", - "update-snippets": "echo skipped" + "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" }, "sideEffects": false, "//metadata": { @@ -110,4 +115,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appconfiguration?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/appconfiguration/arm-appconfiguration/review/arm-appconfiguration.api.md b/sdk/appconfiguration/arm-appconfiguration/review/arm-appconfiguration.api.md index 2ffe18a0e8d..1b4fcf594fd 100644 --- a/sdk/appconfiguration/arm-appconfiguration/review/arm-appconfiguration.api.md +++ b/sdk/appconfiguration/arm-appconfiguration/review/arm-appconfiguration.api.md @@ -49,6 +49,8 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { // (undocumented) replicas: Replicas; // (undocumented) + snapshots: Snapshots; + // (undocumented) subscriptionId: string; } @@ -59,12 +61,18 @@ export interface AppConfigurationManagementClientOptionalParams extends coreClie endpoint?: string; } +// @public +export type AuthenticationMode = string; + // @public export interface CheckNameAvailabilityParameters { name: string; type: ConfigurationResourceType; } +// @public +export type CompositionType = string; + // @public export type ConfigurationResourceType = string; @@ -72,6 +80,7 @@ export type ConfigurationResourceType = string; export interface ConfigurationStore extends TrackedResource { createMode?: CreateMode; readonly creationDate?: Date; + dataPlaneProxy?: DataPlaneProxyProperties; disableLocalAuth?: boolean; enablePurgeProtection?: boolean; encryption?: EncryptionProperties; @@ -222,6 +231,7 @@ export type ConfigurationStoresUpdateResponse = ConfigurationStore; // @public export interface ConfigurationStoreUpdateParameters { + dataPlaneProxy?: DataPlaneProxyProperties; disableLocalAuth?: boolean; enablePurgeProtection?: boolean; encryption?: EncryptionProperties; @@ -242,6 +252,12 @@ export type CreatedByType = string; // @public export type CreateMode = "Recover" | "Default"; +// @public +export interface DataPlaneProxyProperties { + authenticationMode?: AuthenticationMode; + privateLinkDelegation?: PrivateLinkDelegation; +} + // @public export interface DeletedConfigurationStore { readonly configurationStoreId?: string; @@ -274,6 +290,15 @@ export interface ErrorAdditionalInfo { readonly type?: string; } +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorDetails { readonly additionalInfo?: ErrorAdditionalInfo[]; @@ -286,6 +311,11 @@ export interface ErrorResponse { error?: ErrorDetails; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetail; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -309,6 +339,12 @@ export interface KeyValue { value?: string; } +// @public +export interface KeyValueFilter { + key: string; + label?: string; +} + // @public export interface KeyValueListResult { nextLink?: string; @@ -356,6 +392,18 @@ export enum KnownActionsRequired { Recreate = "Recreate" } +// @public +export enum KnownAuthenticationMode { + Local = "Local", + PassThrough = "Pass-through" +} + +// @public +export enum KnownCompositionType { + Key = "Key", + KeyLabel = "Key_Label" +} + // @public export enum KnownConfigurationResourceType { MicrosoftAppConfigurationConfigurationStores = "Microsoft.AppConfiguration/configurationStores" @@ -385,6 +433,12 @@ export enum KnownIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownPrivateLinkDelegation { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownProvisioningState { Canceled = "Canceled", @@ -410,6 +464,14 @@ export enum KnownReplicaProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownSnapshotStatus { + Archived = "Archived", + Failed = "Failed", + Provisioning = "Provisioning", + Ready = "Ready" +} + // @public export interface LogSpecification { blobDuration?: string; @@ -584,6 +646,9 @@ export interface PrivateEndpointConnectionsListByConfigurationStoreOptionalParam // @public export type PrivateEndpointConnectionsListByConfigurationStoreResponse = PrivateEndpointConnectionListResult; +// @public +export type PrivateLinkDelegation = string; + // @public export interface PrivateLinkResource { readonly groupId?: string; @@ -745,6 +810,52 @@ export interface Sku { name: string; } +// @public +export interface Snapshot { + compositionType?: CompositionType; + readonly created?: Date; + readonly etag?: string; + readonly expires?: Date; + filters?: KeyValueFilter[]; + readonly id?: string; + readonly itemsCount?: number; + readonly name?: string; + readonly provisioningState?: ProvisioningState; + retentionPeriod?: number; + readonly size?: number; + readonly status?: SnapshotStatus; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface Snapshots { + beginCreate(resourceGroupName: string, configStoreName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise, SnapshotsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, configStoreName: string, snapshotName: string, body: Snapshot, options?: SnapshotsCreateOptionalParams): Promise; + get(resourceGroupName: string, configStoreName: string, snapshotName: string, options?: SnapshotsGetOptionalParams): Promise; +} + +// @public +export interface SnapshotsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SnapshotsCreateResponse = Snapshot; + +// @public +export interface SnapshotsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SnapshotsGetResponse = Snapshot; + +// @public +export type SnapshotStatus = string; + // @public export interface SystemData { createdAt?: Date; diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresCreateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresCreateSample.ts index 1a05e3d634f..b3a1734b030 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresCreateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ConfigurationStore, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreate.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreate.json */ async function configurationStoresCreate() { const subscriptionId = @@ -33,17 +33,17 @@ async function configurationStoresCreate() { const configStoreCreationParameters: ConfigurationStore = { location: "westus", sku: { name: "Standard" }, - tags: { myTag: "myTagValue" } + tags: { myTag: "myTagValue" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } @@ -52,7 +52,41 @@ async function configurationStoresCreate() { * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateWithIdentity.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithDataPlaneProxy.json + */ +async function configurationStoresCreateWithDataPlaneProxy() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || + "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = + process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const configStoreCreationParameters: ConfigurationStore = { + dataPlaneProxy: { + authenticationMode: "Pass-through", + privateLinkDelegation: "Enabled", + }, + location: "westus", + sku: { name: "Standard" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient( + credential, + subscriptionId, + ); + const result = await client.configurationStores.beginCreateAndWait( + resourceGroupName, + configStoreName, + configStoreCreationParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates a configuration store with the specified parameters. + * + * @summary Creates a configuration store with the specified parameters. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithIdentity.json */ async function configurationStoresCreateWithIdentity() { const subscriptionId = @@ -65,22 +99,23 @@ async function configurationStoresCreateWithIdentity() { identity: { type: "SystemAssigned, UserAssigned", userAssignedIdentities: { - "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": {} - } + "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": + {}, + }, }, location: "westus", sku: { name: "Standard" }, - tags: { myTag: "myTagValue" } + tags: { myTag: "myTagValue" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } @@ -89,7 +124,7 @@ async function configurationStoresCreateWithIdentity() { * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json */ async function configurationStoresCreateWithLocalAuthDisabled() { const subscriptionId = @@ -101,23 +136,24 @@ async function configurationStoresCreateWithLocalAuthDisabled() { const configStoreCreationParameters: ConfigurationStore = { disableLocalAuth: true, location: "westus", - sku: { name: "Standard" } + sku: { name: "Standard" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } async function main() { configurationStoresCreate(); + configurationStoresCreateWithDataPlaneProxy(); configurationStoresCreateWithIdentity(); configurationStoresCreateWithLocalAuthDisabled(); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresDeleteSample.ts index 86a330f5759..c149af24283 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a configuration store. * * @summary Deletes a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDelete.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDelete.json */ async function configurationStoresDelete() { const subscriptionId = @@ -30,11 +30,11 @@ async function configurationStoresDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginDeleteAndWait( resourceGroupName, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetDeletedSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetDeletedSample.ts index 203d01a9248..f47f3d55a5b 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetDeletedSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetDeletedSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a deleted Azure app configuration store. * * @summary Gets a deleted Azure app configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresGet.json */ async function deletedConfigurationStoresGet() { const subscriptionId = @@ -29,11 +29,11 @@ async function deletedConfigurationStoresGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.getDeleted( location, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetSample.ts index 51e92ec5db0..b2e25845d93 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the properties of the specified configuration store. * * @summary Gets the properties of the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGet.json */ async function configurationStoresGet() { const subscriptionId = @@ -30,11 +30,11 @@ async function configurationStoresGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.get( resourceGroupName, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListByResourceGroupSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListByResourceGroupSample.ts index 0ac5048e2cb..7e1ed874096 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListByResourceGroupSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the configuration stores for a given resource group. * * @summary Lists the configuration stores for a given resource group. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListByResourceGroup.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListByResourceGroup.json */ async function configurationStoresListByResourceGroup() { const subscriptionId = @@ -29,11 +29,11 @@ async function configurationStoresListByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.listByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListDeletedSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListDeletedSample.ts index 6e717825c34..7f04f973384 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListDeletedSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListDeletedSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the deleted configuration stores in a subscription. * * @summary Gets information about the deleted configuration stores in a subscription. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresList.json */ async function deletedConfigurationStoresList() { const subscriptionId = @@ -27,7 +27,7 @@ async function deletedConfigurationStoresList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.listDeleted()) { diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListKeysSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListKeysSample.ts index 4d4e1269b0d..65c041ac40a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListKeysSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the access key for the specified configuration store. * * @summary Lists the access key for the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListKeys.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListKeys.json */ async function configurationStoresListKeys() { const subscriptionId = @@ -30,12 +30,12 @@ async function configurationStoresListKeys() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.listKeys( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListSample.ts index 7ec77c384bd..7b2563d24b6 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the configuration stores for a given subscription. * * @summary Lists the configuration stores for a given subscription. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresList.json */ async function configurationStoresList() { const subscriptionId = @@ -27,7 +27,7 @@ async function configurationStoresList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.list()) { diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresPurgeDeletedSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresPurgeDeletedSample.ts index b6611a96ef5..f81d2b22ba4 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresPurgeDeletedSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresPurgeDeletedSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Permanently deletes the specified configuration store. * * @summary Permanently deletes the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresPurge.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresPurge.json */ async function purgeADeletedConfigurationStore() { const subscriptionId = @@ -29,11 +29,11 @@ async function purgeADeletedConfigurationStore() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginPurgeDeletedAndWait( location, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresRegenerateKeySample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresRegenerateKeySample.ts index 2d0be351ab2..c568f8847e7 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresRegenerateKeySample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresRegenerateKeySample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { RegenerateKeyParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Regenerates an access key for the specified configuration store. * * @summary Regenerates an access key for the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresRegenerateKey.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresRegenerateKey.json */ async function configurationStoresRegenerateKey() { const subscriptionId = @@ -31,17 +31,17 @@ async function configurationStoresRegenerateKey() { process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; const configStoreName = "contoso"; const regenerateKeyParameters: RegenerateKeyParameters = { - id: "439AD01B4BE67DB1" + id: "439AD01B4BE67DB1", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.regenerateKey( resourceGroupName, configStoreName, - regenerateKeyParameters + regenerateKeyParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresUpdateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresUpdateSample.ts index 80aa8c799e1..51c1e10cf17 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresUpdateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/configurationStoresUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ConfigurationStoreUpdateParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdate.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdate.json */ async function configurationStoresUpdate() { const subscriptionId = @@ -32,17 +32,17 @@ async function configurationStoresUpdate() { const configStoreName = "contoso"; const configStoreUpdateParameters: ConfigurationStoreUpdateParameters = { sku: { name: "Standard" }, - tags: { category: "Marketing" } + tags: { category: "Marketing" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } @@ -51,7 +51,7 @@ async function configurationStoresUpdate() { * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json */ async function configurationStoresUpdateDisableLocalAuth() { const subscriptionId = @@ -62,17 +62,17 @@ async function configurationStoresUpdateDisableLocalAuth() { const configStoreName = "contoso"; const configStoreUpdateParameters: ConfigurationStoreUpdateParameters = { disableLocalAuth: true, - sku: { name: "Standard" } + sku: { name: "Standard" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } @@ -81,7 +81,7 @@ async function configurationStoresUpdateDisableLocalAuth() { * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdateWithIdentity.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateWithIdentity.json */ async function configurationStoresUpdateWithIdentity() { const subscriptionId = @@ -94,21 +94,22 @@ async function configurationStoresUpdateWithIdentity() { identity: { type: "SystemAssigned, UserAssigned", userAssignedIdentities: { - "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": {} - } + "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": + {}, + }, }, sku: { name: "Standard" }, - tags: { category: "Marketing" } + tags: { category: "Marketing" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesCreateOrUpdateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesCreateOrUpdateSample.ts index 821a585f541..6460b8be018 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesCreateOrUpdateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesCreateOrUpdateSample.ts @@ -11,7 +11,7 @@ import { KeyValue, KeyValuesCreateOrUpdateOptionalParams, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -19,10 +19,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Creates a key-value. + * This sample demonstrates how to Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Creates a key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateKeyValue.json + * @summary Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateKeyValue.json */ async function keyValuesCreateOrUpdate() { const subscriptionId = @@ -34,19 +34,19 @@ async function keyValuesCreateOrUpdate() { const keyValueName = "myKey$myLabel"; const keyValueParameters: KeyValue = { tags: { tag1: "tagValue1", tag2: "tagValue2" }, - value: "myValue" + value: "myValue", }; const options: KeyValuesCreateOrUpdateOptionalParams = { keyValueParameters }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.keyValues.createOrUpdate( resourceGroupName, configStoreName, keyValueName, - options + options, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesDeleteSample.ts index 3317449c138..cdb66d69878 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesDeleteSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes a key-value. + * This sample demonstrates how to Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Deletes a key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteKeyValue.json + * @summary Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteKeyValue.json */ async function keyValuesDelete() { const subscriptionId = @@ -31,12 +31,12 @@ async function keyValuesDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.keyValues.beginDeleteAndWait( resourceGroupName, configStoreName, - keyValueName + keyValueName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesGetSample.ts index 3d5d3b6f3a2..394a0d1bd24 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/keyValuesGetSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the properties of the specified key-value. + * This sample demonstrates how to Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Gets the properties of the specified key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetKeyValue.json + * @summary Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetKeyValue.json */ async function keyValuesGet() { const subscriptionId = @@ -31,12 +31,12 @@ async function keyValuesGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.keyValues.get( resourceGroupName, configStoreName, - keyValueName + keyValueName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsCheckNameAvailabilitySample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsCheckNameAvailabilitySample.ts index 83051583eef..42c6f45b018 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsCheckNameAvailabilitySample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsCheckNameAvailabilitySample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CheckNameAvailabilityParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameAvailable.json */ async function configurationStoresCheckNameAvailable() { const subscriptionId = @@ -29,15 +29,15 @@ async function configurationStoresCheckNameAvailable() { "c80fb759-c965-4c6a-9110-9b2b2d038882"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.checkNameAvailability( - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } @@ -46,7 +46,7 @@ async function configurationStoresCheckNameAvailable() { * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameNotAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameNotAvailable.json */ async function configurationStoresCheckNameNotAvailable() { const subscriptionId = @@ -54,15 +54,15 @@ async function configurationStoresCheckNameNotAvailable() { "c80fb759-c965-4c6a-9110-9b2b2d038882"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.checkNameAvailability( - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsListSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsListSample.ts index aca2a36a2a8..7d631a2bb4a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsListSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the operations available from this provider. * * @summary Lists the operations available from this provider. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/OperationsList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/OperationsList.json */ async function operationsList() { const subscriptionId = @@ -27,7 +27,7 @@ async function operationsList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.operations.list()) { diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsRegionalCheckNameAvailabilitySample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsRegionalCheckNameAvailabilitySample.ts index 8ec40213683..a0a96f40939 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsRegionalCheckNameAvailabilitySample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/operationsRegionalCheckNameAvailabilitySample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CheckNameAvailabilityParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameAvailable.json */ async function configurationStoresCheckNameAvailable() { const subscriptionId = @@ -30,16 +30,16 @@ async function configurationStoresCheckNameAvailable() { const location = "westus"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.regionalCheckNameAvailability( location, - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } @@ -48,7 +48,7 @@ async function configurationStoresCheckNameAvailable() { * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameNotAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameNotAvailable.json */ async function configurationStoresCheckNameNotAvailable() { const subscriptionId = @@ -57,16 +57,16 @@ async function configurationStoresCheckNameNotAvailable() { const location = "westus"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.regionalCheckNameAvailability( location, - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts index 31f41db3596..d2abe115370 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { PrivateEndpointConnection, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. * * @summary Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json */ async function privateEndpointConnectionUpdate() { const subscriptionId = @@ -34,20 +34,21 @@ async function privateEndpointConnectionUpdate() { const privateEndpointConnection: PrivateEndpointConnection = { privateLinkServiceConnectionState: { description: "Auto-Approved", - status: "Approved" - } + status: "Approved", + }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - configStoreName, - privateEndpointConnectionName, - privateEndpointConnection + subscriptionId, ); + const result = + await client.privateEndpointConnections.beginCreateOrUpdateAndWait( + resourceGroupName, + configStoreName, + privateEndpointConnectionName, + privateEndpointConnection, + ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsDeleteSample.ts index 921ad477808..a2f50a1cb0a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json */ async function privateEndpointConnectionsDelete() { const subscriptionId = @@ -31,12 +31,12 @@ async function privateEndpointConnectionsDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.beginDeleteAndWait( resourceGroupName, configStoreName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsGetSample.ts index 9c1ad97291b..62f7992e0b0 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint connection associated with the configuration store. * * @summary Gets the specified private endpoint connection associated with the configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json */ async function privateEndpointConnectionGetConnection() { const subscriptionId = @@ -31,12 +31,12 @@ async function privateEndpointConnectionGetConnection() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.get( resourceGroupName, configStoreName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsListByConfigurationStoreSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsListByConfigurationStoreSample.ts index c58f93c894c..51650449ef3 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsListByConfigurationStoreSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateEndpointConnectionsListByConfigurationStoreSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all private endpoint connections for a configuration store. * * @summary Lists all private endpoint connections for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListPrivateEndpointConnections.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListPrivateEndpointConnections.json */ async function privateEndpointConnectionList() { const subscriptionId = @@ -30,12 +30,12 @@ async function privateEndpointConnectionList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.privateEndpointConnections.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesGetSample.ts index 1daf5417a98..5c7df42f302 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a private link resource that need to be created for a configuration store. * * @summary Gets a private link resource that need to be created for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourceGet.json */ async function privateLinkResourcesGet() { const subscriptionId = @@ -31,12 +31,12 @@ async function privateLinkResourcesGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateLinkResources.get( resourceGroupName, configStoreName, - groupName + groupName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesListByConfigurationStoreSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesListByConfigurationStoreSample.ts index e031226778e..f586f84cd28 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesListByConfigurationStoreSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/privateLinkResourcesListByConfigurationStoreSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a configuration store. * * @summary Gets the private link resources that need to be created for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourcesListByConfigurationStore.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourcesListByConfigurationStore.json */ async function privateLinkResourcesListGroupIds() { const subscriptionId = @@ -30,12 +30,12 @@ async function privateLinkResourcesListGroupIds() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.privateLinkResources.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasCreateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasCreateSample.ts index 590573eb751..97f35335226 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasCreateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Replica, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a replica with the specified parameters. * * @summary Creates a replica with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateReplica.json */ async function replicasCreate() { const subscriptionId = @@ -35,13 +35,13 @@ async function replicasCreate() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.replicas.beginCreateAndWait( resourceGroupName, configStoreName, replicaName, - replicaCreationParameters + replicaCreationParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasDeleteSample.ts index 0461c6c7895..59c5d763e59 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a replica. * * @summary Deletes a replica. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteReplica.json */ async function replicasDelete() { const subscriptionId = @@ -31,12 +31,12 @@ async function replicasDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.replicas.beginDeleteAndWait( resourceGroupName, configStoreName, - replicaName + replicaName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasGetSample.ts index e3f94a6fa19..d616e58b169 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the properties of the specified replica. * * @summary Gets the properties of the specified replica. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetReplica.json */ async function replicasGet() { const subscriptionId = @@ -31,12 +31,12 @@ async function replicasGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.replicas.get( resourceGroupName, configStoreName, - replicaName + replicaName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasListByConfigurationStoreSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasListByConfigurationStoreSample.ts index d0fb689d1ea..892167ae266 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasListByConfigurationStoreSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/replicasListByConfigurationStoreSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the replicas for a given configuration store. * * @summary Lists the replicas for a given configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListReplicas.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListReplicas.json */ async function replicasListByConfigurationStore() { const subscriptionId = @@ -30,12 +30,12 @@ async function replicasListByConfigurationStore() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.replicas.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsCreateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsCreateSample.ts new file mode 100644 index 00000000000..93a7d2730ce --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsCreateSample.ts @@ -0,0 +1,56 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Snapshot, + AppConfigurationManagementClient, +} from "@azure/arm-appconfiguration"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * + * @summary Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateSnapshot.json + */ +async function snapshotsCreate() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || + "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = + process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const snapshotName = "mySnapshot"; + const body: Snapshot = { + filters: [{ key: "app1/*", label: "Production" }], + retentionPeriod: 3600, + }; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient( + credential, + subscriptionId, + ); + const result = await client.snapshots.beginCreateAndWait( + resourceGroupName, + configStoreName, + snapshotName, + body, + ); + console.log(result); +} + +async function main() { + snapshotsCreate(); +} + +main().catch(console.error); diff --git a/sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsGetSample.ts new file mode 100644 index 00000000000..c4d463ebb11 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/samples-dev/snapshotsGetSample.ts @@ -0,0 +1,48 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { AppConfigurationManagementClient } from "@azure/arm-appconfiguration"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * + * @summary Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetSnapshot.json + */ +async function snapshotsGet() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || + "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = + process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const snapshotName = "mySnapshot"; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient( + credential, + subscriptionId, + ); + const result = await client.snapshots.get( + resourceGroupName, + configStoreName, + snapshotName, + ); + console.log(result); +} + +async function main() { + snapshotsGet(); +} + +main().catch(console.error); diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/README.md b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/README.md index 73a0aa70d89..58ef3ba6a5c 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/README.md +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/README.md @@ -4,33 +4,35 @@ These sample programs show how to use the JavaScript client libraries for in som | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [configurationStoresCreateSample.js][configurationstorescreatesample] | Creates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreate.json | -| [configurationStoresDeleteSample.js][configurationstoresdeletesample] | Deletes a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDelete.json | -| [configurationStoresGetDeletedSample.js][configurationstoresgetdeletedsample] | Gets a deleted Azure app configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresGet.json | -| [configurationStoresGetSample.js][configurationstoresgetsample] | Gets the properties of the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGet.json | -| [configurationStoresListByResourceGroupSample.js][configurationstoreslistbyresourcegroupsample] | Lists the configuration stores for a given resource group. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListByResourceGroup.json | -| [configurationStoresListDeletedSample.js][configurationstoreslistdeletedsample] | Gets information about the deleted configuration stores in a subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresList.json | -| [configurationStoresListKeysSample.js][configurationstoreslistkeyssample] | Lists the access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListKeys.json | -| [configurationStoresListSample.js][configurationstoreslistsample] | Lists the configuration stores for a given subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresList.json | -| [configurationStoresPurgeDeletedSample.js][configurationstorespurgedeletedsample] | Permanently deletes the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresPurge.json | -| [configurationStoresRegenerateKeySample.js][configurationstoresregeneratekeysample] | Regenerates an access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresRegenerateKey.json | -| [configurationStoresUpdateSample.js][configurationstoresupdatesample] | Updates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdate.json | -| [keyValuesCreateOrUpdateSample.js][keyvaluescreateorupdatesample] | Creates a key-value. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateKeyValue.json | -| [keyValuesDeleteSample.js][keyvaluesdeletesample] | Deletes a key-value. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteKeyValue.json | -| [keyValuesGetSample.js][keyvaluesgetsample] | Gets the properties of the specified key-value. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetKeyValue.json | -| [operationsCheckNameAvailabilitySample.js][operationschecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameAvailable.json | -| [operationsListSample.js][operationslistsample] | Lists the operations available from this provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/OperationsList.json | -| [operationsRegionalCheckNameAvailabilitySample.js][operationsregionalchecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameAvailable.json | -| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json | -| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListByConfigurationStoreSample.js][privateendpointconnectionslistbyconfigurationstoresample] | Lists all private endpoint connections for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListPrivateEndpointConnections.json | -| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets a private link resource that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourceGet.json | -| [privateLinkResourcesListByConfigurationStoreSample.js][privatelinkresourceslistbyconfigurationstoresample] | Gets the private link resources that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourcesListByConfigurationStore.json | -| [replicasCreateSample.js][replicascreatesample] | Creates a replica with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateReplica.json | -| [replicasDeleteSample.js][replicasdeletesample] | Deletes a replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteReplica.json | -| [replicasGetSample.js][replicasgetsample] | Gets the properties of the specified replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetReplica.json | -| [replicasListByConfigurationStoreSample.js][replicaslistbyconfigurationstoresample] | Lists the replicas for a given configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListReplicas.json | +| [configurationStoresCreateSample.js][configurationstorescreatesample] | Creates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreate.json | +| [configurationStoresDeleteSample.js][configurationstoresdeletesample] | Deletes a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDelete.json | +| [configurationStoresGetDeletedSample.js][configurationstoresgetdeletedsample] | Gets a deleted Azure app configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresGet.json | +| [configurationStoresGetSample.js][configurationstoresgetsample] | Gets the properties of the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGet.json | +| [configurationStoresListByResourceGroupSample.js][configurationstoreslistbyresourcegroupsample] | Lists the configuration stores for a given resource group. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListByResourceGroup.json | +| [configurationStoresListDeletedSample.js][configurationstoreslistdeletedsample] | Gets information about the deleted configuration stores in a subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresList.json | +| [configurationStoresListKeysSample.js][configurationstoreslistkeyssample] | Lists the access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListKeys.json | +| [configurationStoresListSample.js][configurationstoreslistsample] | Lists the configuration stores for a given subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresList.json | +| [configurationStoresPurgeDeletedSample.js][configurationstorespurgedeletedsample] | Permanently deletes the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresPurge.json | +| [configurationStoresRegenerateKeySample.js][configurationstoresregeneratekeysample] | Regenerates an access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresRegenerateKey.json | +| [configurationStoresUpdateSample.js][configurationstoresupdatesample] | Updates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdate.json | +| [keyValuesCreateOrUpdateSample.js][keyvaluescreateorupdatesample] | Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateKeyValue.json | +| [keyValuesDeleteSample.js][keyvaluesdeletesample] | Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteKeyValue.json | +| [keyValuesGetSample.js][keyvaluesgetsample] | Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetKeyValue.json | +| [operationsCheckNameAvailabilitySample.js][operationschecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameAvailable.json | +| [operationsListSample.js][operationslistsample] | Lists the operations available from this provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/OperationsList.json | +| [operationsRegionalCheckNameAvailabilitySample.js][operationsregionalchecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameAvailable.json | +| [privateEndpointConnectionsCreateOrUpdateSample.js][privateendpointconnectionscreateorupdatesample] | Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json | +| [privateEndpointConnectionsDeleteSample.js][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.js][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListByConfigurationStoreSample.js][privateendpointconnectionslistbyconfigurationstoresample] | Lists all private endpoint connections for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListPrivateEndpointConnections.json | +| [privateLinkResourcesGetSample.js][privatelinkresourcesgetsample] | Gets a private link resource that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourceGet.json | +| [privateLinkResourcesListByConfigurationStoreSample.js][privatelinkresourceslistbyconfigurationstoresample] | Gets the private link resources that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourcesListByConfigurationStore.json | +| [replicasCreateSample.js][replicascreatesample] | Creates a replica with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateReplica.json | +| [replicasDeleteSample.js][replicasdeletesample] | Deletes a replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteReplica.json | +| [replicasGetSample.js][replicasgetsample] | Gets the properties of the specified replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetReplica.json | +| [replicasListByConfigurationStoreSample.js][replicaslistbyconfigurationstoresample] | Lists the replicas for a given configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListReplicas.json | +| [snapshotsCreateSample.js][snapshotscreatesample] | Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateSnapshot.json | +| [snapshotsGetSample.js][snapshotsgetsample] | Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetSnapshot.json | ## Prerequisites @@ -97,6 +99,8 @@ Take a look at our [API Documentation][apiref] for more information about the AP [replicasdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasDeleteSample.js [replicasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasGetSample.js [replicaslistbyconfigurationstoresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasListByConfigurationStoreSample.js +[snapshotscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsCreateSample.js +[snapshotsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsGetSample.js [apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appconfiguration?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/arm-appconfiguration/README.md diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresCreateSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresCreateSample.js index 30505d7d0e6..4419ddc3534 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresCreateSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreate.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreate.json */ async function configurationStoresCreate() { const subscriptionId = @@ -33,7 +33,7 @@ async function configurationStoresCreate() { const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } @@ -42,7 +42,36 @@ async function configurationStoresCreate() { * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateWithIdentity.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithDataPlaneProxy.json + */ +async function configurationStoresCreateWithDataPlaneProxy() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const configStoreCreationParameters = { + dataPlaneProxy: { + authenticationMode: "Pass-through", + privateLinkDelegation: "Enabled", + }, + location: "westus", + sku: { name: "Standard" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient(credential, subscriptionId); + const result = await client.configurationStores.beginCreateAndWait( + resourceGroupName, + configStoreName, + configStoreCreationParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates a configuration store with the specified parameters. + * + * @summary Creates a configuration store with the specified parameters. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithIdentity.json */ async function configurationStoresCreateWithIdentity() { const subscriptionId = @@ -66,7 +95,7 @@ async function configurationStoresCreateWithIdentity() { const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } @@ -75,7 +104,7 @@ async function configurationStoresCreateWithIdentity() { * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json */ async function configurationStoresCreateWithLocalAuthDisabled() { const subscriptionId = @@ -92,13 +121,14 @@ async function configurationStoresCreateWithLocalAuthDisabled() { const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } async function main() { configurationStoresCreate(); + configurationStoresCreateWithDataPlaneProxy(); configurationStoresCreateWithIdentity(); configurationStoresCreateWithLocalAuthDisabled(); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresDeleteSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresDeleteSample.js index f38806b5e3e..17e506aa059 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresDeleteSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a configuration store. * * @summary Deletes a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDelete.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDelete.json */ async function configurationStoresDelete() { const subscriptionId = @@ -27,7 +27,7 @@ async function configurationStoresDelete() { const client = new AppConfigurationManagementClient(credential, subscriptionId); const result = await client.configurationStores.beginDeleteAndWait( resourceGroupName, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetDeletedSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetDeletedSample.js index 52d193ebadc..88486e9b66e 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetDeletedSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetDeletedSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a deleted Azure app configuration store. * * @summary Gets a deleted Azure app configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresGet.json */ async function deletedConfigurationStoresGet() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetSample.js index 08b99b9c597..ac9330e58ba 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the properties of the specified configuration store. * * @summary Gets the properties of the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGet.json */ async function configurationStoresGet() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListByResourceGroupSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListByResourceGroupSample.js index bca3dfe2d2b..2adcb9335fb 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListByResourceGroupSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListByResourceGroupSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the configuration stores for a given resource group. * * @summary Lists the configuration stores for a given resource group. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListByResourceGroup.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListByResourceGroup.json */ async function configurationStoresListByResourceGroup() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListDeletedSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListDeletedSample.js index 8ff9c1bd872..4d17290be25 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListDeletedSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListDeletedSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets information about the deleted configuration stores in a subscription. * * @summary Gets information about the deleted configuration stores in a subscription. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresList.json */ async function deletedConfigurationStoresList() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListKeysSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListKeysSample.js index d219f739bf6..74c387241ff 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListKeysSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListKeysSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the access key for the specified configuration store. * * @summary Lists the access key for the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListKeys.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListKeys.json */ async function configurationStoresListKeys() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListSample.js index 40524b56364..32c63c873f6 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the configuration stores for a given subscription. * * @summary Lists the configuration stores for a given subscription. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresList.json */ async function configurationStoresList() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresPurgeDeletedSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresPurgeDeletedSample.js index 10d4eaba2f2..c429abc8706 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresPurgeDeletedSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresPurgeDeletedSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Permanently deletes the specified configuration store. * * @summary Permanently deletes the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresPurge.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresPurge.json */ async function purgeADeletedConfigurationStore() { const subscriptionId = @@ -27,7 +27,7 @@ async function purgeADeletedConfigurationStore() { const client = new AppConfigurationManagementClient(credential, subscriptionId); const result = await client.configurationStores.beginPurgeDeletedAndWait( location, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresRegenerateKeySample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresRegenerateKeySample.js index ec540b4d46b..c7c326b6d0d 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresRegenerateKeySample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresRegenerateKeySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Regenerates an access key for the specified configuration store. * * @summary Regenerates an access key for the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresRegenerateKey.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresRegenerateKey.json */ async function configurationStoresRegenerateKey() { const subscriptionId = @@ -31,7 +31,7 @@ async function configurationStoresRegenerateKey() { const result = await client.configurationStores.regenerateKey( resourceGroupName, configStoreName, - regenerateKeyParameters + regenerateKeyParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresUpdateSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresUpdateSample.js index a0a869b3761..c8037c87a50 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresUpdateSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/configurationStoresUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdate.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdate.json */ async function configurationStoresUpdate() { const subscriptionId = @@ -32,7 +32,7 @@ async function configurationStoresUpdate() { const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } @@ -41,7 +41,7 @@ async function configurationStoresUpdate() { * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json */ async function configurationStoresUpdateDisableLocalAuth() { const subscriptionId = @@ -57,7 +57,7 @@ async function configurationStoresUpdateDisableLocalAuth() { const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } @@ -66,7 +66,7 @@ async function configurationStoresUpdateDisableLocalAuth() { * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdateWithIdentity.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateWithIdentity.json */ async function configurationStoresUpdateWithIdentity() { const subscriptionId = @@ -89,7 +89,7 @@ async function configurationStoresUpdateWithIdentity() { const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesCreateOrUpdateSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesCreateOrUpdateSample.js index c1e46bc223c..08fb43324f8 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesCreateOrUpdateSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesCreateOrUpdateSample.js @@ -13,10 +13,10 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Creates a key-value. + * This sample demonstrates how to Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Creates a key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateKeyValue.json + * @summary Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateKeyValue.json */ async function keyValuesCreateOrUpdate() { const subscriptionId = @@ -35,7 +35,7 @@ async function keyValuesCreateOrUpdate() { resourceGroupName, configStoreName, keyValueName, - options + options, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesDeleteSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesDeleteSample.js index 823ff83dbf9..ce6c906d705 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesDeleteSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesDeleteSample.js @@ -13,10 +13,10 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Deletes a key-value. + * This sample demonstrates how to Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Deletes a key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteKeyValue.json + * @summary Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteKeyValue.json */ async function keyValuesDelete() { const subscriptionId = @@ -29,7 +29,7 @@ async function keyValuesDelete() { const result = await client.keyValues.beginDeleteAndWait( resourceGroupName, configStoreName, - keyValueName + keyValueName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesGetSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesGetSample.js index 92506846548..4db3167cc7a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesGetSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/keyValuesGetSample.js @@ -13,10 +13,10 @@ const { DefaultAzureCredential } = require("@azure/identity"); require("dotenv").config(); /** - * This sample demonstrates how to Gets the properties of the specified key-value. + * This sample demonstrates how to Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Gets the properties of the specified key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetKeyValue.json + * @summary Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetKeyValue.json */ async function keyValuesGet() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsCheckNameAvailabilitySample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsCheckNameAvailabilitySample.js index c9cefd0da28..de0688deecf 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsCheckNameAvailabilitySample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsCheckNameAvailabilitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameAvailable.json */ async function configurationStoresCheckNameAvailable() { const subscriptionId = @@ -35,7 +35,7 @@ async function configurationStoresCheckNameAvailable() { * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameNotAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameNotAvailable.json */ async function configurationStoresCheckNameNotAvailable() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsListSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsListSample.js index 4f51034cfb0..ae754712240 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsListSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsListSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the operations available from this provider. * * @summary Lists the operations available from this provider. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/OperationsList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/OperationsList.json */ async function operationsList() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsRegionalCheckNameAvailabilitySample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsRegionalCheckNameAvailabilitySample.js index 42bc90e335e..c86ca02bbfd 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsRegionalCheckNameAvailabilitySample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/operationsRegionalCheckNameAvailabilitySample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameAvailable.json */ async function configurationStoresCheckNameAvailable() { const subscriptionId = @@ -30,7 +30,7 @@ async function configurationStoresCheckNameAvailable() { const client = new AppConfigurationManagementClient(credential, subscriptionId); const result = await client.operations.regionalCheckNameAvailability( location, - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } @@ -39,7 +39,7 @@ async function configurationStoresCheckNameAvailable() { * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameNotAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameNotAvailable.json */ async function configurationStoresCheckNameNotAvailable() { const subscriptionId = @@ -53,7 +53,7 @@ async function configurationStoresCheckNameNotAvailable() { const client = new AppConfigurationManagementClient(credential, subscriptionId); const result = await client.operations.regionalCheckNameAvailability( location, - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js index 639eb8881c8..9b6ca8c268d 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsCreateOrUpdateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. * * @summary Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json */ async function privateEndpointConnectionUpdate() { const subscriptionId = @@ -36,7 +36,7 @@ async function privateEndpointConnectionUpdate() { resourceGroupName, configStoreName, privateEndpointConnectionName, - privateEndpointConnection + privateEndpointConnection, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js index 4f2efb5b74c..3a0a3245ab5 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json */ async function privateEndpointConnectionsDelete() { const subscriptionId = @@ -29,7 +29,7 @@ async function privateEndpointConnectionsDelete() { const result = await client.privateEndpointConnections.beginDeleteAndWait( resourceGroupName, configStoreName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsGetSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsGetSample.js index 539b7f89a1a..bec553aa81e 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsGetSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the specified private endpoint connection associated with the configuration store. * * @summary Gets the specified private endpoint connection associated with the configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json */ async function privateEndpointConnectionGetConnection() { const subscriptionId = @@ -29,7 +29,7 @@ async function privateEndpointConnectionGetConnection() { const result = await client.privateEndpointConnections.get( resourceGroupName, configStoreName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsListByConfigurationStoreSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsListByConfigurationStoreSample.js index ddf7b81d8fc..35ec630fb29 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsListByConfigurationStoreSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateEndpointConnectionsListByConfigurationStoreSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists all private endpoint connections for a configuration store. * * @summary Lists all private endpoint connections for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListPrivateEndpointConnections.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListPrivateEndpointConnections.json */ async function privateEndpointConnectionList() { const subscriptionId = @@ -28,7 +28,7 @@ async function privateEndpointConnectionList() { const resArray = new Array(); for await (let item of client.privateEndpointConnections.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesGetSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesGetSample.js index 15a4ac93a53..cb5b8f9893e 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesGetSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets a private link resource that need to be created for a configuration store. * * @summary Gets a private link resource that need to be created for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourceGet.json */ async function privateLinkResourcesGet() { const subscriptionId = @@ -29,7 +29,7 @@ async function privateLinkResourcesGet() { const result = await client.privateLinkResources.get( resourceGroupName, configStoreName, - groupName + groupName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesListByConfigurationStoreSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesListByConfigurationStoreSample.js index 48656ba46c4..4e58da5d0b8 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesListByConfigurationStoreSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/privateLinkResourcesListByConfigurationStoreSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the private link resources that need to be created for a configuration store. * * @summary Gets the private link resources that need to be created for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourcesListByConfigurationStore.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourcesListByConfigurationStore.json */ async function privateLinkResourcesListGroupIds() { const subscriptionId = @@ -28,7 +28,7 @@ async function privateLinkResourcesListGroupIds() { const resArray = new Array(); for await (let item of client.privateLinkResources.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasCreateSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasCreateSample.js index 757999c0e00..3b01776ac6c 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasCreateSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasCreateSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Creates a replica with the specified parameters. * * @summary Creates a replica with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateReplica.json */ async function replicasCreate() { const subscriptionId = @@ -31,7 +31,7 @@ async function replicasCreate() { resourceGroupName, configStoreName, replicaName, - replicaCreationParameters + replicaCreationParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasDeleteSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasDeleteSample.js index 2f29f745b91..f25209e1e7a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasDeleteSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasDeleteSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Deletes a replica. * * @summary Deletes a replica. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteReplica.json */ async function replicasDelete() { const subscriptionId = @@ -29,7 +29,7 @@ async function replicasDelete() { const result = await client.replicas.beginDeleteAndWait( resourceGroupName, configStoreName, - replicaName + replicaName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasGetSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasGetSample.js index a2588cef22b..6b5ab77e56c 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasGetSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasGetSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Gets the properties of the specified replica. * * @summary Gets the properties of the specified replica. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetReplica.json */ async function replicasGet() { const subscriptionId = diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasListByConfigurationStoreSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasListByConfigurationStoreSample.js index fa428c58f4f..d2257a1543c 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasListByConfigurationStoreSample.js +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/replicasListByConfigurationStoreSample.js @@ -16,7 +16,7 @@ require("dotenv").config(); * This sample demonstrates how to Lists the replicas for a given configuration store. * * @summary Lists the replicas for a given configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListReplicas.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListReplicas.json */ async function replicasListByConfigurationStore() { const subscriptionId = @@ -28,7 +28,7 @@ async function replicasListByConfigurationStore() { const resArray = new Array(); for await (let item of client.replicas.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsCreateSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsCreateSample.js new file mode 100644 index 00000000000..982fcb64f73 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsCreateSample.js @@ -0,0 +1,46 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * + * @summary Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateSnapshot.json + */ +async function snapshotsCreate() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const snapshotName = "mySnapshot"; + const body = { + filters: [{ key: "app1/*", label: "Production" }], + retentionPeriod: 3600, + }; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient(credential, subscriptionId); + const result = await client.snapshots.beginCreateAndWait( + resourceGroupName, + configStoreName, + snapshotName, + body, + ); + console.log(result); +} + +async function main() { + snapshotsCreate(); +} + +main().catch(console.error); diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsGetSample.js b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsGetSample.js new file mode 100644 index 00000000000..c305deca4f9 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/javascript/snapshotsGetSample.js @@ -0,0 +1,37 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { AppConfigurationManagementClient } = require("@azure/arm-appconfiguration"); +const { DefaultAzureCredential } = require("@azure/identity"); +require("dotenv").config(); + +/** + * This sample demonstrates how to Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * + * @summary Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetSnapshot.json + */ +async function snapshotsGet() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const snapshotName = "mySnapshot"; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient(credential, subscriptionId); + const result = await client.snapshots.get(resourceGroupName, configStoreName, snapshotName); + console.log(result); +} + +async function main() { + snapshotsGet(); +} + +main().catch(console.error); diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/README.md b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/README.md index 5691d4535e5..b1c49a92ff6 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/README.md +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/README.md @@ -4,33 +4,35 @@ These sample programs show how to use the TypeScript client libraries for in som | **File Name** | **Description** | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [configurationStoresCreateSample.ts][configurationstorescreatesample] | Creates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreate.json | -| [configurationStoresDeleteSample.ts][configurationstoresdeletesample] | Deletes a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDelete.json | -| [configurationStoresGetDeletedSample.ts][configurationstoresgetdeletedsample] | Gets a deleted Azure app configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresGet.json | -| [configurationStoresGetSample.ts][configurationstoresgetsample] | Gets the properties of the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGet.json | -| [configurationStoresListByResourceGroupSample.ts][configurationstoreslistbyresourcegroupsample] | Lists the configuration stores for a given resource group. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListByResourceGroup.json | -| [configurationStoresListDeletedSample.ts][configurationstoreslistdeletedsample] | Gets information about the deleted configuration stores in a subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresList.json | -| [configurationStoresListKeysSample.ts][configurationstoreslistkeyssample] | Lists the access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListKeys.json | -| [configurationStoresListSample.ts][configurationstoreslistsample] | Lists the configuration stores for a given subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresList.json | -| [configurationStoresPurgeDeletedSample.ts][configurationstorespurgedeletedsample] | Permanently deletes the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresPurge.json | -| [configurationStoresRegenerateKeySample.ts][configurationstoresregeneratekeysample] | Regenerates an access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresRegenerateKey.json | -| [configurationStoresUpdateSample.ts][configurationstoresupdatesample] | Updates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdate.json | -| [keyValuesCreateOrUpdateSample.ts][keyvaluescreateorupdatesample] | Creates a key-value. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateKeyValue.json | -| [keyValuesDeleteSample.ts][keyvaluesdeletesample] | Deletes a key-value. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteKeyValue.json | -| [keyValuesGetSample.ts][keyvaluesgetsample] | Gets the properties of the specified key-value. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetKeyValue.json | -| [operationsCheckNameAvailabilitySample.ts][operationschecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameAvailable.json | -| [operationsListSample.ts][operationslistsample] | Lists the operations available from this provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/OperationsList.json | -| [operationsRegionalCheckNameAvailabilitySample.ts][operationsregionalchecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameAvailable.json | -| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json | -| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json | -| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json | -| [privateEndpointConnectionsListByConfigurationStoreSample.ts][privateendpointconnectionslistbyconfigurationstoresample] | Lists all private endpoint connections for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListPrivateEndpointConnections.json | -| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets a private link resource that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourceGet.json | -| [privateLinkResourcesListByConfigurationStoreSample.ts][privatelinkresourceslistbyconfigurationstoresample] | Gets the private link resources that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourcesListByConfigurationStore.json | -| [replicasCreateSample.ts][replicascreatesample] | Creates a replica with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateReplica.json | -| [replicasDeleteSample.ts][replicasdeletesample] | Deletes a replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteReplica.json | -| [replicasGetSample.ts][replicasgetsample] | Gets the properties of the specified replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetReplica.json | -| [replicasListByConfigurationStoreSample.ts][replicaslistbyconfigurationstoresample] | Lists the replicas for a given configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListReplicas.json | +| [configurationStoresCreateSample.ts][configurationstorescreatesample] | Creates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreate.json | +| [configurationStoresDeleteSample.ts][configurationstoresdeletesample] | Deletes a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDelete.json | +| [configurationStoresGetDeletedSample.ts][configurationstoresgetdeletedsample] | Gets a deleted Azure app configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresGet.json | +| [configurationStoresGetSample.ts][configurationstoresgetsample] | Gets the properties of the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGet.json | +| [configurationStoresListByResourceGroupSample.ts][configurationstoreslistbyresourcegroupsample] | Lists the configuration stores for a given resource group. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListByResourceGroup.json | +| [configurationStoresListDeletedSample.ts][configurationstoreslistdeletedsample] | Gets information about the deleted configuration stores in a subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresList.json | +| [configurationStoresListKeysSample.ts][configurationstoreslistkeyssample] | Lists the access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListKeys.json | +| [configurationStoresListSample.ts][configurationstoreslistsample] | Lists the configuration stores for a given subscription. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresList.json | +| [configurationStoresPurgeDeletedSample.ts][configurationstorespurgedeletedsample] | Permanently deletes the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresPurge.json | +| [configurationStoresRegenerateKeySample.ts][configurationstoresregeneratekeysample] | Regenerates an access key for the specified configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresRegenerateKey.json | +| [configurationStoresUpdateSample.ts][configurationstoresupdatesample] | Updates a configuration store with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdate.json | +| [keyValuesCreateOrUpdateSample.ts][keyvaluescreateorupdatesample] | Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateKeyValue.json | +| [keyValuesDeleteSample.ts][keyvaluesdeletesample] | Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteKeyValue.json | +| [keyValuesGetSample.ts][keyvaluesgetsample] | Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetKeyValue.json | +| [operationsCheckNameAvailabilitySample.ts][operationschecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameAvailable.json | +| [operationsListSample.ts][operationslistsample] | Lists the operations available from this provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/OperationsList.json | +| [operationsRegionalCheckNameAvailabilitySample.ts][operationsregionalchecknameavailabilitysample] | Checks whether the configuration store name is available for use. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameAvailable.json | +| [privateEndpointConnectionsCreateOrUpdateSample.ts][privateendpointconnectionscreateorupdatesample] | Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json | +| [privateEndpointConnectionsDeleteSample.ts][privateendpointconnectionsdeletesample] | Deletes a private endpoint connection. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json | +| [privateEndpointConnectionsGetSample.ts][privateendpointconnectionsgetsample] | Gets the specified private endpoint connection associated with the configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json | +| [privateEndpointConnectionsListByConfigurationStoreSample.ts][privateendpointconnectionslistbyconfigurationstoresample] | Lists all private endpoint connections for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListPrivateEndpointConnections.json | +| [privateLinkResourcesGetSample.ts][privatelinkresourcesgetsample] | Gets a private link resource that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourceGet.json | +| [privateLinkResourcesListByConfigurationStoreSample.ts][privatelinkresourceslistbyconfigurationstoresample] | Gets the private link resources that need to be created for a configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourcesListByConfigurationStore.json | +| [replicasCreateSample.ts][replicascreatesample] | Creates a replica with the specified parameters. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateReplica.json | +| [replicasDeleteSample.ts][replicasdeletesample] | Deletes a replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteReplica.json | +| [replicasGetSample.ts][replicasgetsample] | Gets the properties of the specified replica. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetReplica.json | +| [replicasListByConfigurationStoreSample.ts][replicaslistbyconfigurationstoresample] | Lists the replicas for a given configuration store. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListReplicas.json | +| [snapshotsCreateSample.ts][snapshotscreatesample] | Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateSnapshot.json | +| [snapshotsGetSample.ts][snapshotsgetsample] | Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetSnapshot.json | ## Prerequisites @@ -109,6 +111,8 @@ Take a look at our [API Documentation][apiref] for more information about the AP [replicasdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasDeleteSample.ts [replicasgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasGetSample.ts [replicaslistbyconfigurationstoresample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasListByConfigurationStoreSample.ts +[snapshotscreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsCreateSample.ts +[snapshotsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsGetSample.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appconfiguration?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/arm-appconfiguration/README.md diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresCreateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresCreateSample.ts index 1a05e3d634f..b3a1734b030 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresCreateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ConfigurationStore, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreate.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreate.json */ async function configurationStoresCreate() { const subscriptionId = @@ -33,17 +33,17 @@ async function configurationStoresCreate() { const configStoreCreationParameters: ConfigurationStore = { location: "westus", sku: { name: "Standard" }, - tags: { myTag: "myTagValue" } + tags: { myTag: "myTagValue" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } @@ -52,7 +52,41 @@ async function configurationStoresCreate() { * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateWithIdentity.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithDataPlaneProxy.json + */ +async function configurationStoresCreateWithDataPlaneProxy() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || + "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = + process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const configStoreCreationParameters: ConfigurationStore = { + dataPlaneProxy: { + authenticationMode: "Pass-through", + privateLinkDelegation: "Enabled", + }, + location: "westus", + sku: { name: "Standard" }, + }; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient( + credential, + subscriptionId, + ); + const result = await client.configurationStores.beginCreateAndWait( + resourceGroupName, + configStoreName, + configStoreCreationParameters, + ); + console.log(result); +} + +/** + * This sample demonstrates how to Creates a configuration store with the specified parameters. + * + * @summary Creates a configuration store with the specified parameters. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithIdentity.json */ async function configurationStoresCreateWithIdentity() { const subscriptionId = @@ -65,22 +99,23 @@ async function configurationStoresCreateWithIdentity() { identity: { type: "SystemAssigned, UserAssigned", userAssignedIdentities: { - "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": {} - } + "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": + {}, + }, }, location: "westus", sku: { name: "Standard" }, - tags: { myTag: "myTagValue" } + tags: { myTag: "myTagValue" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } @@ -89,7 +124,7 @@ async function configurationStoresCreateWithIdentity() { * This sample demonstrates how to Creates a configuration store with the specified parameters. * * @summary Creates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateWithLocalAuthDisabled.json */ async function configurationStoresCreateWithLocalAuthDisabled() { const subscriptionId = @@ -101,23 +136,24 @@ async function configurationStoresCreateWithLocalAuthDisabled() { const configStoreCreationParameters: ConfigurationStore = { disableLocalAuth: true, location: "westus", - sku: { name: "Standard" } + sku: { name: "Standard" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginCreateAndWait( resourceGroupName, configStoreName, - configStoreCreationParameters + configStoreCreationParameters, ); console.log(result); } async function main() { configurationStoresCreate(); + configurationStoresCreateWithDataPlaneProxy(); configurationStoresCreateWithIdentity(); configurationStoresCreateWithLocalAuthDisabled(); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresDeleteSample.ts index 86a330f5759..c149af24283 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a configuration store. * * @summary Deletes a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDelete.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDelete.json */ async function configurationStoresDelete() { const subscriptionId = @@ -30,11 +30,11 @@ async function configurationStoresDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginDeleteAndWait( resourceGroupName, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetDeletedSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetDeletedSample.ts index 203d01a9248..f47f3d55a5b 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetDeletedSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetDeletedSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a deleted Azure app configuration store. * * @summary Gets a deleted Azure app configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresGet.json */ async function deletedConfigurationStoresGet() { const subscriptionId = @@ -29,11 +29,11 @@ async function deletedConfigurationStoresGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.getDeleted( location, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetSample.ts index 51e92ec5db0..b2e25845d93 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the properties of the specified configuration store. * * @summary Gets the properties of the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGet.json */ async function configurationStoresGet() { const subscriptionId = @@ -30,11 +30,11 @@ async function configurationStoresGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.get( resourceGroupName, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListByResourceGroupSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListByResourceGroupSample.ts index 0ac5048e2cb..7e1ed874096 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListByResourceGroupSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListByResourceGroupSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the configuration stores for a given resource group. * * @summary Lists the configuration stores for a given resource group. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListByResourceGroup.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListByResourceGroup.json */ async function configurationStoresListByResourceGroup() { const subscriptionId = @@ -29,11 +29,11 @@ async function configurationStoresListByResourceGroup() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.listByResourceGroup( - resourceGroupName + resourceGroupName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListDeletedSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListDeletedSample.ts index 6e717825c34..7f04f973384 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListDeletedSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListDeletedSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets information about the deleted configuration stores in a subscription. * * @summary Gets information about the deleted configuration stores in a subscription. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresList.json */ async function deletedConfigurationStoresList() { const subscriptionId = @@ -27,7 +27,7 @@ async function deletedConfigurationStoresList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.listDeleted()) { diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListKeysSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListKeysSample.ts index 4d4e1269b0d..65c041ac40a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListKeysSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListKeysSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the access key for the specified configuration store. * * @summary Lists the access key for the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListKeys.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListKeys.json */ async function configurationStoresListKeys() { const subscriptionId = @@ -30,12 +30,12 @@ async function configurationStoresListKeys() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.listKeys( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListSample.ts index 7ec77c384bd..7b2563d24b6 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the configuration stores for a given subscription. * * @summary Lists the configuration stores for a given subscription. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresList.json */ async function configurationStoresList() { const subscriptionId = @@ -27,7 +27,7 @@ async function configurationStoresList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.configurationStores.list()) { diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresPurgeDeletedSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresPurgeDeletedSample.ts index b6611a96ef5..f81d2b22ba4 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresPurgeDeletedSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresPurgeDeletedSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Permanently deletes the specified configuration store. * * @summary Permanently deletes the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/DeletedConfigurationStoresPurge.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/DeletedConfigurationStoresPurge.json */ async function purgeADeletedConfigurationStore() { const subscriptionId = @@ -29,11 +29,11 @@ async function purgeADeletedConfigurationStore() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginPurgeDeletedAndWait( location, - configStoreName + configStoreName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresRegenerateKeySample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresRegenerateKeySample.ts index 2d0be351ab2..c568f8847e7 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresRegenerateKeySample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresRegenerateKeySample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { RegenerateKeyParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Regenerates an access key for the specified configuration store. * * @summary Regenerates an access key for the specified configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresRegenerateKey.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresRegenerateKey.json */ async function configurationStoresRegenerateKey() { const subscriptionId = @@ -31,17 +31,17 @@ async function configurationStoresRegenerateKey() { process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; const configStoreName = "contoso"; const regenerateKeyParameters: RegenerateKeyParameters = { - id: "439AD01B4BE67DB1" + id: "439AD01B4BE67DB1", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.regenerateKey( resourceGroupName, configStoreName, - regenerateKeyParameters + regenerateKeyParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresUpdateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresUpdateSample.ts index 80aa8c799e1..51c1e10cf17 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresUpdateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/configurationStoresUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { ConfigurationStoreUpdateParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdate.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdate.json */ async function configurationStoresUpdate() { const subscriptionId = @@ -32,17 +32,17 @@ async function configurationStoresUpdate() { const configStoreName = "contoso"; const configStoreUpdateParameters: ConfigurationStoreUpdateParameters = { sku: { name: "Standard" }, - tags: { category: "Marketing" } + tags: { category: "Marketing" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } @@ -51,7 +51,7 @@ async function configurationStoresUpdate() { * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateDisableLocalAuth.json */ async function configurationStoresUpdateDisableLocalAuth() { const subscriptionId = @@ -62,17 +62,17 @@ async function configurationStoresUpdateDisableLocalAuth() { const configStoreName = "contoso"; const configStoreUpdateParameters: ConfigurationStoreUpdateParameters = { disableLocalAuth: true, - sku: { name: "Standard" } + sku: { name: "Standard" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } @@ -81,7 +81,7 @@ async function configurationStoresUpdateDisableLocalAuth() { * This sample demonstrates how to Updates a configuration store with the specified parameters. * * @summary Updates a configuration store with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdateWithIdentity.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdateWithIdentity.json */ async function configurationStoresUpdateWithIdentity() { const subscriptionId = @@ -94,21 +94,22 @@ async function configurationStoresUpdateWithIdentity() { identity: { type: "SystemAssigned, UserAssigned", userAssignedIdentities: { - "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": {} - } + "/subscriptions/c80fb759C9654c6a91109b2b2d038882/resourcegroups/myResourceGroup1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity2": + {}, + }, }, sku: { name: "Standard" }, - tags: { category: "Marketing" } + tags: { category: "Marketing" }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.configurationStores.beginUpdateAndWait( resourceGroupName, configStoreName, - configStoreUpdateParameters + configStoreUpdateParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesCreateOrUpdateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesCreateOrUpdateSample.ts index 821a585f541..6460b8be018 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesCreateOrUpdateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesCreateOrUpdateSample.ts @@ -11,7 +11,7 @@ import { KeyValue, KeyValuesCreateOrUpdateOptionalParams, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -19,10 +19,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Creates a key-value. + * This sample demonstrates how to Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Creates a key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateKeyValue.json + * @summary Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateKeyValue.json */ async function keyValuesCreateOrUpdate() { const subscriptionId = @@ -34,19 +34,19 @@ async function keyValuesCreateOrUpdate() { const keyValueName = "myKey$myLabel"; const keyValueParameters: KeyValue = { tags: { tag1: "tagValue1", tag2: "tagValue2" }, - value: "myValue" + value: "myValue", }; const options: KeyValuesCreateOrUpdateOptionalParams = { keyValueParameters }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.keyValues.createOrUpdate( resourceGroupName, configStoreName, keyValueName, - options + options, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesDeleteSample.ts index 3317449c138..cdb66d69878 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesDeleteSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Deletes a key-value. + * This sample demonstrates how to Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Deletes a key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteKeyValue.json + * @summary Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteKeyValue.json */ async function keyValuesDelete() { const subscriptionId = @@ -31,12 +31,12 @@ async function keyValuesDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.keyValues.beginDeleteAndWait( resourceGroupName, configStoreName, - keyValueName + keyValueName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesGetSample.ts index 3d5d3b6f3a2..394a0d1bd24 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/keyValuesGetSample.ts @@ -15,10 +15,10 @@ import * as dotenv from "dotenv"; dotenv.config(); /** - * This sample demonstrates how to Gets the properties of the specified key-value. + * This sample demonstrates how to Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. * - * @summary Gets the properties of the specified key-value. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetKeyValue.json + * @summary Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other scenarios involving App Configuration key-values the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetKeyValue.json */ async function keyValuesGet() { const subscriptionId = @@ -31,12 +31,12 @@ async function keyValuesGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.keyValues.get( resourceGroupName, configStoreName, - keyValueName + keyValueName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsCheckNameAvailabilitySample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsCheckNameAvailabilitySample.ts index 83051583eef..42c6f45b018 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsCheckNameAvailabilitySample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsCheckNameAvailabilitySample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CheckNameAvailabilityParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameAvailable.json */ async function configurationStoresCheckNameAvailable() { const subscriptionId = @@ -29,15 +29,15 @@ async function configurationStoresCheckNameAvailable() { "c80fb759-c965-4c6a-9110-9b2b2d038882"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.checkNameAvailability( - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } @@ -46,7 +46,7 @@ async function configurationStoresCheckNameAvailable() { * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/CheckNameNotAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/CheckNameNotAvailable.json */ async function configurationStoresCheckNameNotAvailable() { const subscriptionId = @@ -54,15 +54,15 @@ async function configurationStoresCheckNameNotAvailable() { "c80fb759-c965-4c6a-9110-9b2b2d038882"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.checkNameAvailability( - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsListSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsListSample.ts index aca2a36a2a8..7d631a2bb4a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsListSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsListSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the operations available from this provider. * * @summary Lists the operations available from this provider. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/OperationsList.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/OperationsList.json */ async function operationsList() { const subscriptionId = @@ -27,7 +27,7 @@ async function operationsList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.operations.list()) { diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsRegionalCheckNameAvailabilitySample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsRegionalCheckNameAvailabilitySample.ts index 8ec40213683..a0a96f40939 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsRegionalCheckNameAvailabilitySample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/operationsRegionalCheckNameAvailabilitySample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { CheckNameAvailabilityParameters, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameAvailable.json */ async function configurationStoresCheckNameAvailable() { const subscriptionId = @@ -30,16 +30,16 @@ async function configurationStoresCheckNameAvailable() { const location = "westus"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.regionalCheckNameAvailability( location, - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } @@ -48,7 +48,7 @@ async function configurationStoresCheckNameAvailable() { * This sample demonstrates how to Checks whether the configuration store name is available for use. * * @summary Checks whether the configuration store name is available for use. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/RegionalCheckNameNotAvailable.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/RegionalCheckNameNotAvailable.json */ async function configurationStoresCheckNameNotAvailable() { const subscriptionId = @@ -57,16 +57,16 @@ async function configurationStoresCheckNameNotAvailable() { const location = "westus"; const checkNameAvailabilityParameters: CheckNameAvailabilityParameters = { name: "contoso", - type: "Microsoft.AppConfiguration/configurationStores" + type: "Microsoft.AppConfiguration/configurationStores", }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.operations.regionalCheckNameAvailability( location, - checkNameAvailabilityParameters + checkNameAvailabilityParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index 31f41db3596..d2abe115370 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { PrivateEndpointConnection, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. * * @summary Update the state of the specified private endpoint connection associated with the configuration store. This operation cannot be used to create a private endpoint connection. Private endpoint connections must be created with the Network resource provider. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresUpdatePrivateEndpointConnection.json */ async function privateEndpointConnectionUpdate() { const subscriptionId = @@ -34,20 +34,21 @@ async function privateEndpointConnectionUpdate() { const privateEndpointConnection: PrivateEndpointConnection = { privateLinkServiceConnectionState: { description: "Auto-Approved", - status: "Approved" - } + status: "Approved", + }, }; const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId - ); - const result = await client.privateEndpointConnections.beginCreateOrUpdateAndWait( - resourceGroupName, - configStoreName, - privateEndpointConnectionName, - privateEndpointConnection + subscriptionId, ); + const result = + await client.privateEndpointConnections.beginCreateOrUpdateAndWait( + resourceGroupName, + configStoreName, + privateEndpointConnectionName, + privateEndpointConnection, + ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts index 921ad477808..a2f50a1cb0a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a private endpoint connection. * * @summary Deletes a private endpoint connection. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeletePrivateEndpointConnection.json */ async function privateEndpointConnectionsDelete() { const subscriptionId = @@ -31,12 +31,12 @@ async function privateEndpointConnectionsDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.beginDeleteAndWait( resourceGroupName, configStoreName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts index 9c1ad97291b..62f7992e0b0 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the specified private endpoint connection associated with the configuration store. * * @summary Gets the specified private endpoint connection associated with the configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetPrivateEndpointConnection.json */ async function privateEndpointConnectionGetConnection() { const subscriptionId = @@ -31,12 +31,12 @@ async function privateEndpointConnectionGetConnection() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateEndpointConnections.get( resourceGroupName, configStoreName, - privateEndpointConnectionName + privateEndpointConnectionName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsListByConfigurationStoreSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsListByConfigurationStoreSample.ts index c58f93c894c..51650449ef3 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsListByConfigurationStoreSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateEndpointConnectionsListByConfigurationStoreSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists all private endpoint connections for a configuration store. * * @summary Lists all private endpoint connections for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListPrivateEndpointConnections.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListPrivateEndpointConnections.json */ async function privateEndpointConnectionList() { const subscriptionId = @@ -30,12 +30,12 @@ async function privateEndpointConnectionList() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.privateEndpointConnections.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesGetSample.ts index 1daf5417a98..5c7df42f302 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets a private link resource that need to be created for a configuration store. * * @summary Gets a private link resource that need to be created for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourceGet.json */ async function privateLinkResourcesGet() { const subscriptionId = @@ -31,12 +31,12 @@ async function privateLinkResourcesGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.privateLinkResources.get( resourceGroupName, configStoreName, - groupName + groupName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesListByConfigurationStoreSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesListByConfigurationStoreSample.ts index e031226778e..f586f84cd28 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesListByConfigurationStoreSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/privateLinkResourcesListByConfigurationStoreSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the private link resources that need to be created for a configuration store. * * @summary Gets the private link resources that need to be created for a configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/PrivateLinkResourcesListByConfigurationStore.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/PrivateLinkResourcesListByConfigurationStore.json */ async function privateLinkResourcesListGroupIds() { const subscriptionId = @@ -30,12 +30,12 @@ async function privateLinkResourcesListGroupIds() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.privateLinkResources.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasCreateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasCreateSample.ts index 590573eb751..97f35335226 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasCreateSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasCreateSample.ts @@ -10,7 +10,7 @@ // Licensed under the MIT License. import { Replica, - AppConfigurationManagementClient + AppConfigurationManagementClient, } from "@azure/arm-appconfiguration"; import { DefaultAzureCredential } from "@azure/identity"; import * as dotenv from "dotenv"; @@ -21,7 +21,7 @@ dotenv.config(); * This sample demonstrates how to Creates a replica with the specified parameters. * * @summary Creates a replica with the specified parameters. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresCreateReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateReplica.json */ async function replicasCreate() { const subscriptionId = @@ -35,13 +35,13 @@ async function replicasCreate() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.replicas.beginCreateAndWait( resourceGroupName, configStoreName, replicaName, - replicaCreationParameters + replicaCreationParameters, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasDeleteSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasDeleteSample.ts index 0461c6c7895..59c5d763e59 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasDeleteSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasDeleteSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Deletes a replica. * * @summary Deletes a replica. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresDeleteReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresDeleteReplica.json */ async function replicasDelete() { const subscriptionId = @@ -31,12 +31,12 @@ async function replicasDelete() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.replicas.beginDeleteAndWait( resourceGroupName, configStoreName, - replicaName + replicaName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasGetSample.ts index e3f94a6fa19..d616e58b169 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasGetSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasGetSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Gets the properties of the specified replica. * * @summary Gets the properties of the specified replica. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresGetReplica.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetReplica.json */ async function replicasGet() { const subscriptionId = @@ -31,12 +31,12 @@ async function replicasGet() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const result = await client.replicas.get( resourceGroupName, configStoreName, - replicaName + replicaName, ); console.log(result); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasListByConfigurationStoreSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasListByConfigurationStoreSample.ts index d0fb689d1ea..892167ae266 100644 --- a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasListByConfigurationStoreSample.ts +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/replicasListByConfigurationStoreSample.ts @@ -18,7 +18,7 @@ dotenv.config(); * This sample demonstrates how to Lists the replicas for a given configuration store. * * @summary Lists the replicas for a given configuration store. - * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2023-03-01/examples/ConfigurationStoresListReplicas.json + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresListReplicas.json */ async function replicasListByConfigurationStore() { const subscriptionId = @@ -30,12 +30,12 @@ async function replicasListByConfigurationStore() { const credential = new DefaultAzureCredential(); const client = new AppConfigurationManagementClient( credential, - subscriptionId + subscriptionId, ); const resArray = new Array(); for await (let item of client.replicas.listByConfigurationStore( resourceGroupName, - configStoreName + configStoreName, )) { resArray.push(item); } diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsCreateSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsCreateSample.ts new file mode 100644 index 00000000000..93a7d2730ce --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsCreateSample.ts @@ -0,0 +1,56 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + Snapshot, + AppConfigurationManagementClient, +} from "@azure/arm-appconfiguration"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * + * @summary Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresCreateSnapshot.json + */ +async function snapshotsCreate() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || + "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = + process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const snapshotName = "mySnapshot"; + const body: Snapshot = { + filters: [{ key: "app1/*", label: "Production" }], + retentionPeriod: 3600, + }; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient( + credential, + subscriptionId, + ); + const result = await client.snapshots.beginCreateAndWait( + resourceGroupName, + configStoreName, + snapshotName, + body, + ); + console.log(result); +} + +async function main() { + snapshotsCreate(); +} + +main().catch(console.error); diff --git a/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsGetSample.ts b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsGetSample.ts new file mode 100644 index 00000000000..c4d463ebb11 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/samples/v4/typescript/src/snapshotsGetSample.ts @@ -0,0 +1,48 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { AppConfigurationManagementClient } from "@azure/arm-appconfiguration"; +import { DefaultAzureCredential } from "@azure/identity"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +/** + * This sample demonstrates how to Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * + * @summary Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration snapshots the data plane API should be used instead. + * x-ms-original-file: specification/appconfiguration/resource-manager/Microsoft.AppConfiguration/stable/2024-05-01/examples/ConfigurationStoresGetSnapshot.json + */ +async function snapshotsGet() { + const subscriptionId = + process.env["APPCONFIGURATION_SUBSCRIPTION_ID"] || + "c80fb759-c965-4c6a-9110-9b2b2d038882"; + const resourceGroupName = + process.env["APPCONFIGURATION_RESOURCE_GROUP"] || "myResourceGroup"; + const configStoreName = "contoso"; + const snapshotName = "mySnapshot"; + const credential = new DefaultAzureCredential(); + const client = new AppConfigurationManagementClient( + credential, + subscriptionId, + ); + const result = await client.snapshots.get( + resourceGroupName, + configStoreName, + snapshotName, + ); + console.log(result); +} + +async function main() { + snapshotsGet(); +} + +main().catch(console.error); diff --git a/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts b/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts index 82e68e112dc..f523d9ba5cf 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/appConfigurationManagementClient.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { @@ -20,7 +20,8 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, KeyValuesImpl, - ReplicasImpl + ReplicasImpl, + SnapshotsImpl, } from "./operations"; import { ConfigurationStores, @@ -28,7 +29,8 @@ import { PrivateEndpointConnections, PrivateLinkResources, KeyValues, - Replicas + Replicas, + Snapshots, } from "./operationsInterfaces"; import { AppConfigurationManagementClientOptionalParams } from "./models"; @@ -46,7 +48,7 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: AppConfigurationManagementClientOptionalParams + options?: AppConfigurationManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -61,10 +63,10 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { } const defaults: AppConfigurationManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-appconfiguration/4.0.1`; + const packageDetails = `azsdk-js-arm-appconfiguration/4.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -74,20 +76,21 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -97,7 +100,7 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -107,9 +110,9 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -117,13 +120,14 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-03-01"; + this.apiVersion = options.apiVersion || "2024-05-01"; this.configurationStores = new ConfigurationStoresImpl(this); this.operations = new OperationsImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.keyValues = new KeyValuesImpl(this); this.replicas = new ReplicasImpl(this); + this.snapshots = new SnapshotsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -136,7 +140,7 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -150,7 +154,7 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } @@ -161,4 +165,5 @@ export class AppConfigurationManagementClient extends coreClient.ServiceClient { privateLinkResources: PrivateLinkResources; keyValues: KeyValues; replicas: Replicas; + snapshots: Snapshots; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/lroImpl.ts b/sdk/appconfiguration/arm-appconfiguration/src/lroImpl.ts index 52f6eaacfb8..5f88efab981 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/lroImpl.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/lroImpl.ts @@ -28,15 +28,15 @@ export function createLroSpec(inputs: { sendInitialRequest: () => sendOperationFn(args, spec), sendPollRequest: ( path: string, - options?: { abortSignal?: AbortSignalLike } + options?: { abortSignal?: AbortSignalLike }, ) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, httpMethod: "GET", path, - abortSignal: options?.abortSignal + abortSignal: options?.abortSignal, }); - } + }, }; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts index 01c606735fb..fb7eb401180 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/index.ts @@ -109,6 +109,14 @@ export interface PrivateLinkServiceConnectionState { readonly actionsRequired?: ActionsRequired; } +/** The data plane proxy settings for a configuration store. */ +export interface DataPlaneProxyProperties { + /** The data plane proxy authentication mode. This property manages the authentication mode of request to the data plane resources. */ + authenticationMode?: AuthenticationMode; + /** The data plane proxy private link delegation. This property manages if a request from delegated Azure Resource Manager (ARM) private link is allowed when the data plane resource requires private link. */ + privateLinkDelegation?: PrivateLinkDelegation; +} + /** Describes a configuration store SKU. */ export interface Sku { /** The SKU name of the configuration store. */ @@ -205,6 +213,8 @@ export interface ConfigurationStoreUpdateParameters { publicNetworkAccess?: PublicNetworkAccess; /** Property specifying whether protection against purge is enabled for this configuration store. */ enablePurgeProtection?: boolean; + /** Property specifying the configuration of data plane proxy for Azure Resource Manager (ARM). */ + dataPlaneProxy?: DataPlaneProxyProperties; } /** Parameters used for checking whether a resource name is available. */ @@ -608,6 +618,111 @@ export interface Replica { readonly provisioningState?: ReplicaProvisioningState; } +/** The snapshot resource. */ +export interface Snapshot { + /** + * The resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The provisioning state of the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** + * The current status of the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: SnapshotStatus; + /** A list of filters used to filter the key-values included in the snapshot. */ + filters?: KeyValueFilter[]; + /** The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label. */ + compositionType?: CompositionType; + /** + * The time that the snapshot was created. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly created?: Date; + /** + * The time that the snapshot will expire. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expires?: Date; + /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */ + retentionPeriod?: number; + /** + * The size in bytes of the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly size?: number; + /** + * The amount of key-values in the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly itemsCount?: number; + /** The tags of the snapshot. NOTE: These are data plane tags, not Azure Resource Manager (ARM) tags. */ + tags?: { [propertyName: string]: string }; + /** + * A value representing the current state of the snapshot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; +} + +/** Enables filtering of key-values. */ +export interface KeyValueFilter { + /** Filters key-values by their key field. */ + key: string; + /** Filters key-values by their label field. */ + label?: string; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + /** The result of a request to list key-values. */ export interface KeyValueListResult { /** The collection value. */ @@ -665,6 +780,8 @@ export interface ConfigurationStore extends TrackedResource { softDeleteRetentionInDays?: number; /** Property specifying whether protection against purge is enabled for this configuration store. */ enablePurgeProtection?: boolean; + /** Property specifying the configuration of data plane proxy for Azure Resource Manager (ARM). */ + dataPlaneProxy?: DataPlaneProxyProperties; /** Indicates whether the configuration store need to be recovered. */ createMode?: CreateMode; } @@ -684,7 +801,7 @@ export enum KnownIdentityType { /** UserAssigned */ UserAssigned = "UserAssigned", /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned, UserAssigned" + SystemAssignedUserAssigned = "SystemAssigned, UserAssigned", } /** @@ -712,7 +829,7 @@ export enum KnownProvisioningState { /** Failed */ Failed = "Failed", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", } /** @@ -738,7 +855,7 @@ export enum KnownConnectionStatus { /** Rejected */ Rejected = "Rejected", /** Disconnected */ - Disconnected = "Disconnected" + Disconnected = "Disconnected", } /** @@ -758,7 +875,7 @@ export enum KnownActionsRequired { /** None */ None = "None", /** Recreate */ - Recreate = "Recreate" + Recreate = "Recreate", } /** @@ -776,7 +893,7 @@ export enum KnownPublicNetworkAccess { /** Enabled */ Enabled = "Enabled", /** Disabled */ - Disabled = "Disabled" + Disabled = "Disabled", } /** @@ -789,6 +906,42 @@ export enum KnownPublicNetworkAccess { */ export type PublicNetworkAccess = string; +/** Known values of {@link AuthenticationMode} that the service accepts. */ +export enum KnownAuthenticationMode { + /** The local authentication mode. Users are not required to have data plane permissions if local authentication is not disabled. */ + Local = "Local", + /** The pass-through authentication mode. User identity will be passed through from Azure Resource Manager (ARM), requiring user to have data plane action permissions (Available via App Configuration Data Owner\/ App Configuration Data Reader). */ + PassThrough = "Pass-through", +} + +/** + * Defines values for AuthenticationMode. \ + * {@link KnownAuthenticationMode} can be used interchangeably with AuthenticationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Local**: The local authentication mode. Users are not required to have data plane permissions if local authentication is not disabled. \ + * **Pass-through**: The pass-through authentication mode. User identity will be passed through from Azure Resource Manager (ARM), requiring user to have data plane action permissions (Available via App Configuration Data Owner\/ App Configuration Data Reader). + */ +export type AuthenticationMode = string; + +/** Known values of {@link PrivateLinkDelegation} that the service accepts. */ +export enum KnownPrivateLinkDelegation { + /** Azure Resource Manager (ARM) private endpoint is required if the resource requires private link. */ + Enabled = "Enabled", + /** Request is denied if the resource requires private link. */ + Disabled = "Disabled", +} + +/** + * Defines values for PrivateLinkDelegation. \ + * {@link KnownPrivateLinkDelegation} can be used interchangeably with PrivateLinkDelegation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Azure Resource Manager (ARM) private endpoint is required if the resource requires private link. \ + * **Disabled**: Request is denied if the resource requires private link. + */ +export type PrivateLinkDelegation = string; + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -798,7 +951,7 @@ export enum KnownCreatedByType { /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", /** Key */ - Key = "Key" + Key = "Key", } /** @@ -816,7 +969,7 @@ export type CreatedByType = string; /** Known values of {@link ConfigurationResourceType} that the service accepts. */ export enum KnownConfigurationResourceType { /** MicrosoftAppConfigurationConfigurationStores */ - MicrosoftAppConfigurationConfigurationStores = "Microsoft.AppConfiguration/configurationStores" + MicrosoftAppConfigurationConfigurationStores = "Microsoft.AppConfiguration/configurationStores", } /** @@ -839,7 +992,7 @@ export enum KnownReplicaProvisioningState { /** Failed */ Failed = "Failed", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", } /** @@ -854,6 +1007,48 @@ export enum KnownReplicaProvisioningState { * **Canceled** */ export type ReplicaProvisioningState = string; + +/** Known values of {@link SnapshotStatus} that the service accepts. */ +export enum KnownSnapshotStatus { + /** Provisioning */ + Provisioning = "Provisioning", + /** Ready */ + Ready = "Ready", + /** Archived */ + Archived = "Archived", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for SnapshotStatus. \ + * {@link KnownSnapshotStatus} can be used interchangeably with SnapshotStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Provisioning** \ + * **Ready** \ + * **Archived** \ + * **Failed** + */ +export type SnapshotStatus = string; + +/** Known values of {@link CompositionType} that the service accepts. */ +export enum KnownCompositionType { + /** Key */ + Key = "Key", + /** KeyLabel */ + KeyLabel = "Key_Label", +} + +/** + * Defines values for CompositionType. \ + * {@link KnownCompositionType} can be used interchangeably with CompositionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Key** \ + * **Key_Label** + */ +export type CompositionType = string; /** Defines values for CreateMode. */ export type CreateMode = "Recover" | "Default"; @@ -875,7 +1070,8 @@ export interface ConfigurationStoresListByResourceGroupOptionalParams } /** Contains response data for the listByResourceGroup operation. */ -export type ConfigurationStoresListByResourceGroupResponse = ConfigurationStoreListResult; +export type ConfigurationStoresListByResourceGroupResponse = + ConfigurationStoreListResult; /** Optional parameters. */ export interface ConfigurationStoresGetOptionalParams @@ -939,7 +1135,8 @@ export interface ConfigurationStoresListDeletedOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listDeleted operation. */ -export type ConfigurationStoresListDeletedResponse = DeletedConfigurationStoreListResult; +export type ConfigurationStoresListDeletedResponse = + DeletedConfigurationStoreListResult; /** Optional parameters. */ export interface ConfigurationStoresGetDeletedOptionalParams @@ -969,7 +1166,8 @@ export interface ConfigurationStoresListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type ConfigurationStoresListByResourceGroupNextResponse = ConfigurationStoreListResult; +export type ConfigurationStoresListByResourceGroupNextResponse = + ConfigurationStoreListResult; /** Optional parameters. */ export interface ConfigurationStoresListKeysNextOptionalParams @@ -983,7 +1181,8 @@ export interface ConfigurationStoresListDeletedNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listDeletedNext operation. */ -export type ConfigurationStoresListDeletedNextResponse = DeletedConfigurationStoreListResult; +export type ConfigurationStoresListDeletedNextResponse = + DeletedConfigurationStoreListResult; /** Optional parameters. */ export interface OperationsCheckNameAvailabilityOptionalParams @@ -1007,7 +1206,8 @@ export interface OperationsRegionalCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the regionalCheckNameAvailability operation. */ -export type OperationsRegionalCheckNameAvailabilityResponse = NameAvailabilityStatus; +export type OperationsRegionalCheckNameAvailabilityResponse = + NameAvailabilityStatus; /** Optional parameters. */ export interface OperationsListNextOptionalParams @@ -1021,7 +1221,8 @@ export interface PrivateEndpointConnectionsListByConfigurationStoreOptionalParam extends coreClient.OperationOptions {} /** Contains response data for the listByConfigurationStore operation. */ -export type PrivateEndpointConnectionsListByConfigurationStoreResponse = PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListByConfigurationStoreResponse = + PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionsGetOptionalParams @@ -1040,7 +1241,8 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +export type PrivateEndpointConnectionsCreateOrUpdateResponse = + PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionsDeleteOptionalParams @@ -1056,14 +1258,16 @@ export interface PrivateEndpointConnectionsListByConfigurationStoreNextOptionalP extends coreClient.OperationOptions {} /** Contains response data for the listByConfigurationStoreNext operation. */ -export type PrivateEndpointConnectionsListByConfigurationStoreNextResponse = PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListByConfigurationStoreNextResponse = + PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface PrivateLinkResourcesListByConfigurationStoreOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByConfigurationStore operation. */ -export type PrivateLinkResourcesListByConfigurationStoreResponse = PrivateLinkResourceListResult; +export type PrivateLinkResourcesListByConfigurationStoreResponse = + PrivateLinkResourceListResult; /** Optional parameters. */ export interface PrivateLinkResourcesGetOptionalParams @@ -1077,7 +1281,8 @@ export interface PrivateLinkResourcesListByConfigurationStoreNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByConfigurationStoreNext operation. */ -export type PrivateLinkResourcesListByConfigurationStoreNextResponse = PrivateLinkResourceListResult; +export type PrivateLinkResourcesListByConfigurationStoreNextResponse = + PrivateLinkResourceListResult; /** Optional parameters. */ export interface KeyValuesGetOptionalParams @@ -1150,6 +1355,25 @@ export interface ReplicasListByConfigurationStoreNextOptionalParams /** Contains response data for the listByConfigurationStoreNext operation. */ export type ReplicasListByConfigurationStoreNextResponse = ReplicaListResult; +/** Optional parameters. */ +export interface SnapshotsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SnapshotsGetResponse = Snapshot; + +/** Optional parameters. */ +export interface SnapshotsCreateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the create operation. */ +export type SnapshotsCreateResponse = Snapshot; + /** Optional parameters. */ export interface AppConfigurationManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts index 6d7a438ba3f..4c94c2f9e8f 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/mappers.ts @@ -20,19 +20,19 @@ export const ConfigurationStoreListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ConfigurationStore" - } - } - } + className: "ConfigurationStore", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceIdentity: coreClient.CompositeMapper = { @@ -43,32 +43,32 @@ export const ResourceIdentity: coreClient.CompositeMapper = { type: { serializedName: "type", type: { - name: "String" - } + name: "String", + }, }, userAssignedIdentities: { serializedName: "userAssignedIdentities", type: { name: "Dictionary", - value: { type: { name: "Composite", className: "UserIdentity" } } - } + value: { type: { name: "Composite", className: "UserIdentity" } }, + }, }, principalId: { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, tenantId: { serializedName: "tenantId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const UserIdentity: coreClient.CompositeMapper = { @@ -80,18 +80,18 @@ export const UserIdentity: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, clientId: { serializedName: "clientId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EncryptionProperties: coreClient.CompositeMapper = { @@ -103,11 +103,11 @@ export const EncryptionProperties: coreClient.CompositeMapper = { serializedName: "keyVaultProperties", type: { name: "Composite", - className: "KeyVaultProperties" - } - } - } - } + className: "KeyVaultProperties", + }, + }, + }, + }, }; export const KeyVaultProperties: coreClient.CompositeMapper = { @@ -118,17 +118,17 @@ export const KeyVaultProperties: coreClient.CompositeMapper = { keyIdentifier: { serializedName: "keyIdentifier", type: { - name: "String" - } + name: "String", + }, }, identityClientId: { serializedName: "identityClientId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnectionReference: coreClient.CompositeMapper = { @@ -140,46 +140,46 @@ export const PrivateEndpointConnectionReference: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, privateEndpoint: { serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "PrivateEndpoint" - } + className: "PrivateEndpoint", + }, }, privateLinkServiceConnectionState: { serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - } - } - } + className: "PrivateLinkServiceConnectionState", + }, + }, + }, + }, }; export const PrivateEndpoint: coreClient.CompositeMapper = { @@ -190,11 +190,11 @@ export const PrivateEndpoint: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { @@ -205,24 +205,45 @@ export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, actionsRequired: { serializedName: "actionsRequired", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const DataPlaneProxyProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPlaneProxyProperties", + modelProperties: { + authenticationMode: { + serializedName: "authenticationMode", + type: { + name: "String", + }, + }, + privateLinkDelegation: { + serializedName: "privateLinkDelegation", + type: { + name: "String", + }, + }, + }, + }, }; export const Sku: coreClient.CompositeMapper = { @@ -234,11 +255,11 @@ export const Sku: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SystemData: coreClient.CompositeMapper = { @@ -249,41 +270,41 @@ export const SystemData: coreClient.CompositeMapper = { createdBy: { serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, createdByType: { serializedName: "createdByType", type: { - name: "String" - } + name: "String", + }, }, createdAt: { serializedName: "createdAt", type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastModifiedBy: { serializedName: "lastModifiedBy", type: { - name: "String" - } + name: "String", + }, }, lastModifiedByType: { serializedName: "lastModifiedByType", type: { - name: "String" - } + name: "String", + }, }, lastModifiedAt: { serializedName: "lastModifiedAt", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -295,25 +316,25 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ErrorResponse: coreClient.CompositeMapper = { @@ -325,11 +346,11 @@ export const ErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorDetails" - } - } - } - } + className: "ErrorDetails", + }, + }, + }, + }, }; export const ErrorDetails: coreClient.CompositeMapper = { @@ -341,15 +362,15 @@ export const ErrorDetails: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, additionalInfo: { serializedName: "additionalInfo", @@ -359,13 +380,13 @@ export const ErrorDetails: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" - } - } - } - } - } - } + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const ErrorAdditionalInfo: coreClient.CompositeMapper = { @@ -377,19 +398,19 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, info: { serializedName: "info", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const ConfigurationStoreUpdateParameters: coreClient.CompositeMapper = { @@ -401,50 +422,57 @@ export const ConfigurationStoreUpdateParameters: coreClient.CompositeMapper = { serializedName: "identity", type: { name: "Composite", - className: "ResourceIdentity" - } + className: "ResourceIdentity", + }, }, sku: { serializedName: "sku", type: { name: "Composite", - className: "Sku" - } + className: "Sku", + }, }, tags: { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, encryption: { serializedName: "properties.encryption", type: { name: "Composite", - className: "EncryptionProperties" - } + className: "EncryptionProperties", + }, }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { - name: "Boolean" - } + name: "Boolean", + }, }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { - name: "String" - } + name: "String", + }, }, enablePurgeProtection: { serializedName: "properties.enablePurgeProtection", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + dataPlaneProxy: { + serializedName: "properties.dataPlaneProxy", + type: { + name: "Composite", + className: "DataPlaneProxyProperties", + }, + }, + }, + }, }; export const CheckNameAvailabilityParameters: coreClient.CompositeMapper = { @@ -456,18 +484,18 @@ export const CheckNameAvailabilityParameters: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const NameAvailabilityStatus: coreClient.CompositeMapper = { @@ -479,25 +507,25 @@ export const NameAvailabilityStatus: coreClient.CompositeMapper = { serializedName: "nameAvailable", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reason: { serializedName: "reason", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ApiKeyListResult: coreClient.CompositeMapper = { @@ -512,19 +540,19 @@ export const ApiKeyListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ApiKey" - } - } - } + className: "ApiKey", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ApiKey: coreClient.CompositeMapper = { @@ -536,46 +564,46 @@ export const ApiKey: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, connectionString: { serializedName: "connectionString", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lastModified: { serializedName: "lastModified", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, readOnly: { serializedName: "readOnly", readOnly: true, type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const RegenerateKeyParameters: coreClient.CompositeMapper = { @@ -586,11 +614,11 @@ export const RegenerateKeyParameters: coreClient.CompositeMapper = { id: { serializedName: "id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDefinitionListResult: coreClient.CompositeMapper = { @@ -605,19 +633,19 @@ export const OperationDefinitionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OperationDefinition" - } - } - } + className: "OperationDefinition", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDefinition: coreClient.CompositeMapper = { @@ -628,37 +656,37 @@ export const OperationDefinition: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, isDataAction: { serializedName: "isDataAction", type: { - name: "Boolean" - } + name: "Boolean", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDefinitionDisplay" - } + className: "OperationDefinitionDisplay", + }, }, origin: { serializedName: "origin", type: { - name: "String" - } + name: "String", + }, }, properties: { serializedName: "properties", type: { name: "Composite", - className: "OperationProperties" - } - } - } - } + className: "OperationProperties", + }, + }, + }, + }, }; export const OperationDefinitionDisplay: coreClient.CompositeMapper = { @@ -670,29 +698,29 @@ export const OperationDefinitionDisplay: coreClient.CompositeMapper = { serializedName: "provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationProperties: coreClient.CompositeMapper = { @@ -704,11 +732,11 @@ export const OperationProperties: coreClient.CompositeMapper = { serializedName: "serviceSpecification", type: { name: "Composite", - className: "ServiceSpecification" - } - } - } - } + className: "ServiceSpecification", + }, + }, + }, + }, }; export const ServiceSpecification: coreClient.CompositeMapper = { @@ -723,10 +751,10 @@ export const ServiceSpecification: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LogSpecification" - } - } - } + className: "LogSpecification", + }, + }, + }, }, metricSpecifications: { serializedName: "metricSpecifications", @@ -735,13 +763,13 @@ export const ServiceSpecification: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetricSpecification" - } - } - } - } - } - } + className: "MetricSpecification", + }, + }, + }, + }, + }, + }, }; export const LogSpecification: coreClient.CompositeMapper = { @@ -752,23 +780,23 @@ export const LogSpecification: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } + name: "String", + }, }, blobDuration: { serializedName: "blobDuration", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const MetricSpecification: coreClient.CompositeMapper = { @@ -779,38 +807,38 @@ export const MetricSpecification: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } + name: "String", + }, }, displayDescription: { serializedName: "displayDescription", type: { - name: "String" - } + name: "String", + }, }, unit: { serializedName: "unit", type: { - name: "String" - } + name: "String", + }, }, aggregationType: { serializedName: "aggregationType", type: { - name: "String" - } + name: "String", + }, }, internalMetricName: { serializedName: "internalMetricName", type: { - name: "String" - } + name: "String", + }, }, dimensions: { serializedName: "dimensions", @@ -819,19 +847,19 @@ export const MetricSpecification: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "MetricDimension" - } - } - } + className: "MetricDimension", + }, + }, + }, }, fillGapWithZero: { serializedName: "fillGapWithZero", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const MetricDimension: coreClient.CompositeMapper = { @@ -842,23 +870,23 @@ export const MetricDimension: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, displayName: { serializedName: "displayName", type: { - name: "String" - } + name: "String", + }, }, internalName: { serializedName: "internalName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { @@ -873,19 +901,19 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnection: coreClient.CompositeMapper = { @@ -897,46 +925,46 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, privateEndpoint: { serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "PrivateEndpoint" - } + className: "PrivateEndpoint", + }, }, privateLinkServiceConnectionState: { serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" - } - } - } - } + className: "PrivateLinkServiceConnectionState", + }, + }, + }, + }, }; export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { @@ -951,19 +979,19 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" - } - } - } + className: "PrivateLinkResource", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PrivateLinkResource: coreClient.CompositeMapper = { @@ -975,29 +1003,29 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, groupId: { serializedName: "properties.groupId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, requiredMembers: { serializedName: "properties.requiredMembers", @@ -1006,10 +1034,10 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, requiredZoneNames: { serializedName: "properties.requiredZoneNames", @@ -1018,13 +1046,13 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const KeyValue: coreClient.CompositeMapper = { @@ -1036,79 +1064,79 @@ export const KeyValue: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, key: { serializedName: "properties.key", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, label: { serializedName: "properties.label", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "properties.value", type: { - name: "String" - } + name: "String", + }, }, contentType: { serializedName: "properties.contentType", type: { - name: "String" - } + name: "String", + }, }, eTag: { serializedName: "properties.eTag", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lastModified: { serializedName: "properties.lastModified", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, locked: { serializedName: "properties.locked", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, tags: { serializedName: "properties.tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } + value: { type: { name: "String" } }, + }, + }, + }, + }, }; export const DeletedConfigurationStoreListResult: coreClient.CompositeMapper = { @@ -1123,19 +1151,19 @@ export const DeletedConfigurationStoreListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DeletedConfigurationStore" - } - } - } + className: "DeletedConfigurationStore", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const DeletedConfigurationStore: coreClient.CompositeMapper = { @@ -1147,68 +1175,68 @@ export const DeletedConfigurationStore: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, configurationStoreId: { serializedName: "properties.configurationStoreId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, location: { serializedName: "properties.location", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, deletionDate: { serializedName: "properties.deletionDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, scheduledPurgeDate: { serializedName: "properties.scheduledPurgeDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, tags: { serializedName: "properties.tags", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, purgeProtectionEnabled: { serializedName: "properties.purgeProtectionEnabled", readOnly: true, type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const ReplicaListResult: coreClient.CompositeMapper = { @@ -1223,19 +1251,19 @@ export const ReplicaListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Replica" - } - } - } + className: "Replica", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Replica: coreClient.CompositeMapper = { @@ -1247,52 +1275,264 @@ export const Replica: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, endpoint: { serializedName: "properties.endpoint", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const Snapshot: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Snapshot", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String", + }, + }, + filters: { + constraints: { + MinItems: 1, + MaxItems: 3, + }, + serializedName: "properties.filters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KeyValueFilter", + }, + }, + }, + }, + compositionType: { + serializedName: "properties.compositionType", + type: { + name: "String", + }, + }, + created: { + serializedName: "properties.created", + readOnly: true, + type: { + name: "DateTime", + }, + }, + expires: { + serializedName: "properties.expires", + readOnly: true, + type: { + name: "DateTime", + }, + }, + retentionPeriod: { + constraints: { + InclusiveMaximum: 7776000, + InclusiveMinimum: 3600, + }, + serializedName: "properties.retentionPeriod", + type: { + name: "Number", + }, + }, + size: { + serializedName: "properties.size", + readOnly: true, + type: { + name: "Number", + }, + }, + itemsCount: { + serializedName: "properties.itemsCount", + readOnly: true, + type: { + name: "Number", + }, + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + etag: { + serializedName: "properties.etag", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const KeyValueFilter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyValueFilter", + modelProperties: { + key: { + serializedName: "key", + required: true, + type: { + name: "String", + }, + }, + label: { + serializedName: "label", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseAutoGenerated", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, }; export const KeyValueListResult: coreClient.CompositeMapper = { @@ -1307,19 +1547,19 @@ export const KeyValueListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "KeyValue" - } - } - } + className: "KeyValue", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const TrackedResource: coreClient.CompositeMapper = { @@ -1332,18 +1572,18 @@ export const TrackedResource: coreClient.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, location: { serializedName: "location", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ConfigurationStore: coreClient.CompositeMapper = { @@ -1356,50 +1596,50 @@ export const ConfigurationStore: coreClient.CompositeMapper = { serializedName: "identity", type: { name: "Composite", - className: "ResourceIdentity" - } + className: "ResourceIdentity", + }, }, sku: { serializedName: "sku", type: { name: "Composite", - className: "Sku" - } + className: "Sku", + }, }, systemData: { serializedName: "systemData", type: { name: "Composite", - className: "SystemData" - } + className: "SystemData", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, creationDate: { serializedName: "properties.creationDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, endpoint: { serializedName: "properties.endpoint", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, encryption: { serializedName: "properties.encryption", type: { name: "Composite", - className: "EncryptionProperties" - } + className: "EncryptionProperties", + }, }, privateEndpointConnections: { serializedName: "properties.privateEndpointConnections", @@ -1409,47 +1649,54 @@ export const ConfigurationStore: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnectionReference" - } - } - } + className: "PrivateEndpointConnectionReference", + }, + }, + }, }, publicNetworkAccess: { serializedName: "properties.publicNetworkAccess", type: { - name: "String" - } + name: "String", + }, }, disableLocalAuth: { defaultValue: false, serializedName: "properties.disableLocalAuth", type: { - name: "Boolean" - } + name: "Boolean", + }, }, softDeleteRetentionInDays: { defaultValue: 7, serializedName: "properties.softDeleteRetentionInDays", type: { - name: "Number" - } + name: "Number", + }, }, enablePurgeProtection: { defaultValue: false, serializedName: "properties.enablePurgeProtection", type: { - name: "Boolean" - } + name: "Boolean", + }, + }, + dataPlaneProxy: { + serializedName: "properties.dataPlaneProxy", + type: { + name: "Composite", + className: "DataPlaneProxyProperties", + }, }, createMode: { serializedName: "properties.createMode", type: { name: "Enum", - allowedValues: ["Recover", "Default"] - } - } - } - } + allowedValues: ["Recover", "Default"], + }, + }, + }, + }, }; export const ReplicasDeleteHeaders: coreClient.CompositeMapper = { @@ -1460,9 +1707,9 @@ export const ReplicasDeleteHeaders: coreClient.CompositeMapper = { azureAsyncOperation: { serializedName: "azure-asyncoperation", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts b/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts index b9d751b20a2..c99906374dd 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/models/parameters.ts @@ -9,7 +9,7 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { ConfigurationStore as ConfigurationStoreMapper, @@ -18,7 +18,8 @@ import { CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, KeyValue as KeyValueMapper, - Replica as ReplicaMapper + Replica as ReplicaMapper, + Snapshot as SnapshotMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -28,9 +29,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -39,10 +40,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const subscriptionId: OperationURLParameter = { @@ -51,21 +52,21 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-03-01", + defaultValue: "2024-05-01", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const skipToken: OperationQueryParameter = { @@ -73,9 +74,9 @@ export const skipToken: OperationQueryParameter = { mapper: { serializedName: "$skipToken", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceGroupName: OperationURLParameter = { @@ -84,9 +85,9 @@ export const resourceGroupName: OperationURLParameter = { serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const configStoreName: OperationURLParameter = { @@ -95,14 +96,14 @@ export const configStoreName: OperationURLParameter = { constraints: { Pattern: new RegExp("^[a-zA-Z0-9_-]*$"), MaxLength: 50, - MinLength: 5 + MinLength: 5, }, serializedName: "configStoreName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -112,24 +113,24 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const configStoreCreationParameters: OperationParameter = { parameterPath: "configStoreCreationParameters", - mapper: ConfigurationStoreMapper + mapper: ConfigurationStoreMapper, }; export const configStoreUpdateParameters: OperationParameter = { parameterPath: "configStoreUpdateParameters", - mapper: ConfigurationStoreUpdateParametersMapper + mapper: ConfigurationStoreUpdateParametersMapper, }; export const regenerateKeyParameters: OperationParameter = { parameterPath: "regenerateKeyParameters", - mapper: RegenerateKeyParametersMapper + mapper: RegenerateKeyParametersMapper, }; export const location: OperationURLParameter = { @@ -138,9 +139,9 @@ export const location: OperationURLParameter = { serializedName: "location", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -149,15 +150,15 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const checkNameAvailabilityParameters: OperationParameter = { parameterPath: "checkNameAvailabilityParameters", - mapper: CheckNameAvailabilityParametersMapper + mapper: CheckNameAvailabilityParametersMapper, }; export const privateEndpointConnectionName: OperationURLParameter = { @@ -166,14 +167,14 @@ export const privateEndpointConnectionName: OperationURLParameter = { serializedName: "privateEndpointConnectionName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const privateEndpointConnection: OperationParameter = { parameterPath: "privateEndpointConnection", - mapper: PrivateEndpointConnectionMapper + mapper: PrivateEndpointConnectionMapper, }; export const groupName: OperationURLParameter = { @@ -182,9 +183,9 @@ export const groupName: OperationURLParameter = { serializedName: "groupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const keyValueName: OperationURLParameter = { @@ -193,33 +194,33 @@ export const keyValueName: OperationURLParameter = { serializedName: "keyValueName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const keyValueParameters: OperationParameter = { parameterPath: ["options", "keyValueParameters"], - mapper: KeyValueMapper + mapper: KeyValueMapper, }; export const replicaName: OperationURLParameter = { parameterPath: "replicaName", mapper: { constraints: { - Pattern: new RegExp("^[a-zA-Z0-9]*$") + Pattern: new RegExp("^[a-zA-Z0-9]*$"), }, serializedName: "replicaName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const replicaCreationParameters: OperationParameter = { parameterPath: "replicaCreationParameters", - mapper: ReplicaMapper + mapper: ReplicaMapper, }; export const replicaName1: OperationURLParameter = { @@ -228,7 +229,41 @@ export const replicaName1: OperationURLParameter = { serializedName: "replicaName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const resourceGroupName1: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MaxLength: 90, + MinLength: 1, + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const snapshotName: OperationURLParameter = { + parameterPath: "snapshotName", + mapper: { + constraints: { + Pattern: new RegExp("^[^\\x00-\\x1F\\x7F]+$"), + }, + serializedName: "snapshotName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body: OperationParameter = { + parameterPath: "body", + mapper: SnapshotMapper, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts index b62af583a24..32622a94533 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/configurationStores.ts @@ -16,7 +16,7 @@ import { AppConfigurationManagementClient } from "../appConfigurationManagementC import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -52,7 +52,7 @@ import { ConfigurationStoresListNextResponse, ConfigurationStoresListByResourceGroupNextResponse, ConfigurationStoresListKeysNextResponse, - ConfigurationStoresListDeletedNextResponse + ConfigurationStoresListDeletedNextResponse, } from "../models"; /// @@ -73,7 +73,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { * @param options The options parameters. */ public list( - options?: ConfigurationStoresListOptionalParams + options?: ConfigurationStoresListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -88,13 +88,13 @@ export class ConfigurationStoresImpl implements ConfigurationStores { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: ConfigurationStoresListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationStoresListResponse; let continuationToken = settings?.continuationToken; @@ -115,7 +115,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { } private async *listPagingAll( - options?: ConfigurationStoresListOptionalParams + options?: ConfigurationStoresListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -129,7 +129,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { */ public listByResourceGroup( resourceGroupName: string, - options?: ConfigurationStoresListByResourceGroupOptionalParams + options?: ConfigurationStoresListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { @@ -146,16 +146,16 @@ export class ConfigurationStoresImpl implements ConfigurationStores { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, options?: ConfigurationStoresListByResourceGroupOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationStoresListByResourceGroupResponse; let continuationToken = settings?.continuationToken; @@ -170,7 +170,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { result = await this._listByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -181,11 +181,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: ConfigurationStoresListByResourceGroupOptionalParams + options?: ConfigurationStoresListByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } @@ -200,12 +200,12 @@ export class ConfigurationStoresImpl implements ConfigurationStores { public listKeys( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresListKeysOptionalParams + options?: ConfigurationStoresListKeysOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listKeysPagingAll( resourceGroupName, configStoreName, - options + options, ); return { next() { @@ -222,9 +222,9 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName, configStoreName, options, - settings + settings, ); - } + }, }; } @@ -232,7 +232,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, options?: ConfigurationStoresListKeysOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationStoresListKeysResponse; let continuationToken = settings?.continuationToken; @@ -240,7 +240,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { result = await this._listKeys( resourceGroupName, configStoreName, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -252,7 +252,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName, configStoreName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -264,12 +264,12 @@ export class ConfigurationStoresImpl implements ConfigurationStores { private async *listKeysPagingAll( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresListKeysOptionalParams + options?: ConfigurationStoresListKeysOptionalParams, ): AsyncIterableIterator { for await (const page of this.listKeysPagingPage( resourceGroupName, configStoreName, - options + options, )) { yield* page; } @@ -280,7 +280,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { * @param options The options parameters. */ public listDeleted( - options?: ConfigurationStoresListDeletedOptionalParams + options?: ConfigurationStoresListDeletedOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listDeletedPagingAll(options); return { @@ -295,13 +295,13 @@ export class ConfigurationStoresImpl implements ConfigurationStores { throw new Error("maxPageSize is not supported by this operation."); } return this.listDeletedPagingPage(options, settings); - } + }, }; } private async *listDeletedPagingPage( options?: ConfigurationStoresListDeletedOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ConfigurationStoresListDeletedResponse; let continuationToken = settings?.continuationToken; @@ -322,7 +322,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { } private async *listDeletedPagingAll( - options?: ConfigurationStoresListDeletedOptionalParams + options?: ConfigurationStoresListDeletedOptionalParams, ): AsyncIterableIterator { for await (const page of this.listDeletedPagingPage(options)) { yield* page; @@ -334,7 +334,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { * @param options The options parameters. */ private _list( - options?: ConfigurationStoresListOptionalParams + options?: ConfigurationStoresListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -346,11 +346,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { */ private _listByResourceGroup( resourceGroupName: string, - options?: ConfigurationStoresListByResourceGroupOptionalParams + options?: ConfigurationStoresListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -363,11 +363,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { get( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresGetOptionalParams + options?: ConfigurationStoresGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, options }, - getOperationSpec + getOperationSpec, ); } @@ -382,7 +382,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreCreationParameters: ConfigurationStore, - options?: ConfigurationStoresCreateOptionalParams + options?: ConfigurationStoresCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -391,21 +391,20 @@ export class ConfigurationStoresImpl implements ConfigurationStores { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -414,8 +413,8 @@ export class ConfigurationStoresImpl implements ConfigurationStores { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -423,8 +422,8 @@ export class ConfigurationStoresImpl implements ConfigurationStores { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -434,16 +433,16 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName, configStoreName, configStoreCreationParameters, - options + options, }, - spec: createOperationSpec + spec: createOperationSpec, }); const poller = await createHttpPoller< ConfigurationStoresCreateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -460,13 +459,13 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreCreationParameters: ConfigurationStore, - options?: ConfigurationStoresCreateOptionalParams + options?: ConfigurationStoresCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, configStoreName, configStoreCreationParameters, - options + options, ); return poller.pollUntilDone(); } @@ -480,25 +479,24 @@ export class ConfigurationStoresImpl implements ConfigurationStores { async beginDelete( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresDeleteOptionalParams + options?: ConfigurationStoresDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -507,8 +505,8 @@ export class ConfigurationStoresImpl implements ConfigurationStores { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -516,19 +514,19 @@ export class ConfigurationStoresImpl implements ConfigurationStores { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, configStoreName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -543,12 +541,12 @@ export class ConfigurationStoresImpl implements ConfigurationStores { async beginDeleteAndWait( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresDeleteOptionalParams + options?: ConfigurationStoresDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, configStoreName, - options + options, ); return poller.pollUntilDone(); } @@ -564,7 +562,7 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreUpdateParameters: ConfigurationStoreUpdateParameters, - options?: ConfigurationStoresUpdateOptionalParams + options?: ConfigurationStoresUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -573,21 +571,20 @@ export class ConfigurationStoresImpl implements ConfigurationStores { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -596,8 +593,8 @@ export class ConfigurationStoresImpl implements ConfigurationStores { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -605,8 +602,8 @@ export class ConfigurationStoresImpl implements ConfigurationStores { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -616,16 +613,16 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName, configStoreName, configStoreUpdateParameters, - options + options, }, - spec: updateOperationSpec + spec: updateOperationSpec, }); const poller = await createHttpPoller< ConfigurationStoresUpdateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -642,13 +639,13 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreUpdateParameters: ConfigurationStoreUpdateParameters, - options?: ConfigurationStoresUpdateOptionalParams + options?: ConfigurationStoresUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, configStoreName, configStoreUpdateParameters, - options + options, ); return poller.pollUntilDone(); } @@ -662,11 +659,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { private _listKeys( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresListKeysOptionalParams + options?: ConfigurationStoresListKeysOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, options }, - listKeysOperationSpec + listKeysOperationSpec, ); } @@ -681,11 +678,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, regenerateKeyParameters: RegenerateKeyParameters, - options?: ConfigurationStoresRegenerateKeyOptionalParams + options?: ConfigurationStoresRegenerateKeyOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, regenerateKeyParameters, options }, - regenerateKeyOperationSpec + regenerateKeyOperationSpec, ); } @@ -694,11 +691,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { * @param options The options parameters. */ private _listDeleted( - options?: ConfigurationStoresListDeletedOptionalParams + options?: ConfigurationStoresListDeletedOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - listDeletedOperationSpec + listDeletedOperationSpec, ); } @@ -711,11 +708,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { getDeleted( location: string, configStoreName: string, - options?: ConfigurationStoresGetDeletedOptionalParams + options?: ConfigurationStoresGetDeletedOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, configStoreName, options }, - getDeletedOperationSpec + getDeletedOperationSpec, ); } @@ -728,25 +725,24 @@ export class ConfigurationStoresImpl implements ConfigurationStores { async beginPurgeDeleted( location: string, configStoreName: string, - options?: ConfigurationStoresPurgeDeletedOptionalParams + options?: ConfigurationStoresPurgeDeletedOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -755,8 +751,8 @@ export class ConfigurationStoresImpl implements ConfigurationStores { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -764,19 +760,19 @@ export class ConfigurationStoresImpl implements ConfigurationStores { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { location, configStoreName, options }, - spec: purgeDeletedOperationSpec + spec: purgeDeletedOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -791,12 +787,12 @@ export class ConfigurationStoresImpl implements ConfigurationStores { async beginPurgeDeletedAndWait( location: string, configStoreName: string, - options?: ConfigurationStoresPurgeDeletedOptionalParams + options?: ConfigurationStoresPurgeDeletedOptionalParams, ): Promise { const poller = await this.beginPurgeDeleted( location, configStoreName, - options + options, ); return poller.pollUntilDone(); } @@ -808,11 +804,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { */ private _listNext( nextLink: string, - options?: ConfigurationStoresListNextOptionalParams + options?: ConfigurationStoresListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } @@ -825,11 +821,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { private _listByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: ConfigurationStoresListByResourceGroupNextOptionalParams + options?: ConfigurationStoresListByResourceGroupNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + listByResourceGroupNextOperationSpec, ); } @@ -844,11 +840,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { resourceGroupName: string, configStoreName: string, nextLink: string, - options?: ConfigurationStoresListKeysNextOptionalParams + options?: ConfigurationStoresListKeysNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, nextLink, options }, - listKeysNextOperationSpec + listKeysNextOperationSpec, ); } @@ -859,11 +855,11 @@ export class ConfigurationStoresImpl implements ConfigurationStores { */ private _listDeletedNext( nextLink: string, - options?: ConfigurationStoresListDeletedNextOptionalParams + options?: ConfigurationStoresListDeletedNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listDeletedNextOperationSpec + listDeletedNextOperationSpec, ); } } @@ -871,85 +867,81 @@ export class ConfigurationStoresImpl implements ConfigurationStores { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/configurationStores", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationStoreListResult + bodyMapper: Mappers.ConfigurationStoreListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationStoreListResult + bodyMapper: Mappers.ConfigurationStoreListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, 201: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, 202: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, 204: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.configStoreCreationParameters, queryParameters: [Parameters.apiVersion], @@ -957,15 +949,14 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", httpMethod: "DELETE", responses: { 200: {}, @@ -973,39 +964,38 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, 201: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, 202: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, 204: { - bodyMapper: Mappers.ConfigurationStore + bodyMapper: Mappers.ConfigurationStore, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.configStoreUpdateParameters, queryParameters: [Parameters.apiVersion], @@ -1013,45 +1003,43 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeys", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/listKeys", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApiKeyListResult + bodyMapper: Mappers.ApiKeyListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const regenerateKeyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/regenerateKey", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/regenerateKey", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ApiKey + bodyMapper: Mappers.ApiKey, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.regenerateKeyParameters, queryParameters: [Parameters.apiVersion], @@ -1059,54 +1047,51 @@ const regenerateKeyOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listDeletedOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/deletedConfigurationStores", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/deletedConfigurationStores", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeletedConfigurationStoreListResult + bodyMapper: Mappers.DeletedConfigurationStoreListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getDeletedOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/deletedConfigurationStores/{configStoreName}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/deletedConfigurationStores/{configStoreName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeletedConfigurationStore + bodyMapper: Mappers.DeletedConfigurationStore, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.configStoreName, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const purgeDeletedOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/deletedConfigurationStores/{configStoreName}/purge", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/deletedConfigurationStores/{configStoreName}/purge", httpMethod: "POST", responses: { 200: {}, @@ -1114,95 +1099,95 @@ const purgeDeletedOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.configStoreName, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationStoreListResult + bodyMapper: Mappers.ConfigurationStoreListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ConfigurationStoreListResult + bodyMapper: Mappers.ConfigurationStoreListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listKeysNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ApiKeyListResult + bodyMapper: Mappers.ApiKeyListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listDeletedNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeletedConfigurationStoreListResult + bodyMapper: Mappers.DeletedConfigurationStoreListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts index d89b9023712..2a23425b1db 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/index.ts @@ -12,3 +12,4 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./keyValues"; export * from "./replicas"; +export * from "./snapshots"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts index 67b67e232da..b38ebf2cfee 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/keyValues.ts @@ -14,7 +14,7 @@ import { AppConfigurationManagementClient } from "../appConfigurationManagementC import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -22,7 +22,7 @@ import { KeyValuesGetResponse, KeyValuesCreateOrUpdateOptionalParams, KeyValuesCreateOrUpdateResponse, - KeyValuesDeleteOptionalParams + KeyValuesDeleteOptionalParams, } from "../models"; /** Class containing KeyValues operations. */ @@ -38,7 +38,9 @@ export class KeyValuesImpl implements KeyValues { } /** - * Gets the properties of the specified key-value. + * Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM + * Template deployments. For all other scenarios involving App Configuration key-values the data plane + * API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -49,16 +51,17 @@ export class KeyValuesImpl implements KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesGetOptionalParams + options?: KeyValuesGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, keyValueName, options }, - getOperationSpec + getOperationSpec, ); } /** - * Creates a key-value. + * Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all + * other scenarios involving App Configuration key-values the data plane API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -69,16 +72,17 @@ export class KeyValuesImpl implements KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesCreateOrUpdateOptionalParams + options?: KeyValuesCreateOrUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, keyValueName, options }, - createOrUpdateOperationSpec + createOrUpdateOperationSpec, ); } /** - * Deletes a key-value. + * Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all + * other scenarios involving App Configuration key-values the data plane API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -89,25 +93,24 @@ export class KeyValuesImpl implements KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesDeleteOptionalParams + options?: KeyValuesDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -116,8 +119,8 @@ export class KeyValuesImpl implements KeyValues { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -125,26 +128,27 @@ export class KeyValuesImpl implements KeyValues { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, configStoreName, keyValueName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; } /** - * Deletes a key-value. + * Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all + * other scenarios involving App Configuration key-values the data plane API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -155,13 +159,13 @@ export class KeyValuesImpl implements KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesDeleteOptionalParams + options?: KeyValuesDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, configStoreName, keyValueName, - options + options, ); return poller.pollUntilDone(); } @@ -170,16 +174,15 @@ export class KeyValuesImpl implements KeyValues { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.KeyValue + bodyMapper: Mappers.KeyValue, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -187,22 +190,21 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.keyValueName + Parameters.keyValueName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.KeyValue + bodyMapper: Mappers.KeyValue, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.keyValueParameters, queryParameters: [Parameters.apiVersion], @@ -211,15 +213,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.keyValueName + Parameters.keyValueName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/keyValues/{keyValueName}", httpMethod: "DELETE", responses: { 200: {}, @@ -227,8 +228,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -236,8 +237,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.keyValueName + Parameters.keyValueName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts index 69f93998b5f..d78df4cb2e0 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/operations.ts @@ -23,7 +23,7 @@ import { OperationsCheckNameAvailabilityResponse, OperationsRegionalCheckNameAvailabilityOptionalParams, OperationsRegionalCheckNameAvailabilityResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -44,7 +44,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -59,13 +59,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -86,7 +86,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -101,11 +101,11 @@ export class OperationsImpl implements Operations { */ checkNameAvailability( checkNameAvailabilityParameters: CheckNameAvailabilityParameters, - options?: OperationsCheckNameAvailabilityOptionalParams + options?: OperationsCheckNameAvailabilityOptionalParams, ): Promise { return this.client.sendOperationRequest( { checkNameAvailabilityParameters, options }, - checkNameAvailabilityOperationSpec + checkNameAvailabilityOperationSpec, ); } @@ -114,7 +114,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -129,11 +129,11 @@ export class OperationsImpl implements Operations { regionalCheckNameAvailability( location: string, checkNameAvailabilityParameters: CheckNameAvailabilityParameters, - options?: OperationsRegionalCheckNameAvailabilityOptionalParams + options?: OperationsRegionalCheckNameAvailabilityOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, checkNameAvailabilityParameters, options }, - regionalCheckNameAvailabilityOperationSpec + regionalCheckNameAvailabilityOperationSpec, ); } @@ -144,11 +144,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -156,75 +156,73 @@ export class OperationsImpl implements Operations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/checkNameAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/checkNameAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.NameAvailabilityStatus + bodyMapper: Mappers.NameAvailabilityStatus, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.checkNameAvailabilityParameters, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { path: "/providers/Microsoft.AppConfiguration/operations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationDefinitionListResult + bodyMapper: Mappers.OperationDefinitionListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const regionalCheckNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/checkNameAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/checkNameAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.NameAvailabilityStatus + bodyMapper: Mappers.NameAvailabilityStatus, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.checkNameAvailabilityParameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationDefinitionListResult + bodyMapper: Mappers.OperationDefinitionListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts index 9ad78f22579..ba758fa1725 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateEndpointConnections.ts @@ -16,7 +16,7 @@ import { AppConfigurationManagementClient } from "../appConfigurationManagementC import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,13 +29,14 @@ import { PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, - PrivateEndpointConnectionsListByConfigurationStoreNextResponse + PrivateEndpointConnectionsListByConfigurationStoreNextResponse, } from "../models"; /// /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl - implements PrivateEndpointConnections { + implements PrivateEndpointConnections +{ private readonly client: AppConfigurationManagementClient; /** @@ -55,12 +56,12 @@ export class PrivateEndpointConnectionsImpl public listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams + options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByConfigurationStorePagingAll( resourceGroupName, configStoreName, - options + options, ); return { next() { @@ -77,9 +78,9 @@ export class PrivateEndpointConnectionsImpl resourceGroupName, configStoreName, options, - settings + settings, ); - } + }, }; } @@ -87,7 +88,7 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, configStoreName: string, options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: PrivateEndpointConnectionsListByConfigurationStoreResponse; let continuationToken = settings?.continuationToken; @@ -95,7 +96,7 @@ export class PrivateEndpointConnectionsImpl result = await this._listByConfigurationStore( resourceGroupName, configStoreName, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -107,7 +108,7 @@ export class PrivateEndpointConnectionsImpl resourceGroupName, configStoreName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -119,12 +120,12 @@ export class PrivateEndpointConnectionsImpl private async *listByConfigurationStorePagingAll( resourceGroupName: string, configStoreName: string, - options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams + options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByConfigurationStorePagingPage( resourceGroupName, configStoreName, - options + options, )) { yield* page; } @@ -139,11 +140,11 @@ export class PrivateEndpointConnectionsImpl private _listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams + options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, options }, - listByConfigurationStoreOperationSpec + listByConfigurationStoreOperationSpec, ); } @@ -158,16 +159,16 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, privateEndpointConnectionName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -186,7 +187,7 @@ export class PrivateEndpointConnectionsImpl configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -195,21 +196,20 @@ export class PrivateEndpointConnectionsImpl > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -218,8 +218,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -227,8 +227,8 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -239,16 +239,16 @@ export class PrivateEndpointConnectionsImpl configStoreName, privateEndpointConnectionName, privateEndpointConnection, - options + options, }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< PrivateEndpointConnectionsCreateOrUpdateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -269,14 +269,14 @@ export class PrivateEndpointConnectionsImpl configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, configStoreName, privateEndpointConnectionName, privateEndpointConnection, - options + options, ); return poller.pollUntilDone(); } @@ -292,25 +292,24 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -319,8 +318,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -328,8 +327,8 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -339,13 +338,13 @@ export class PrivateEndpointConnectionsImpl resourceGroupName, configStoreName, privateEndpointConnectionName, - options + options, }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -362,13 +361,13 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, configStoreName, privateEndpointConnectionName, - options + options, ); return poller.pollUntilDone(); } @@ -385,11 +384,11 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, configStoreName: string, nextLink: string, - options?: PrivateEndpointConnectionsListByConfigurationStoreNextOptionalParams + options?: PrivateEndpointConnectionsListByConfigurationStoreNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, nextLink, options }, - listByConfigurationStoreNextOperationSpec + listByConfigurationStoreNextOperationSpec, ); } } @@ -397,38 +396,15 @@ export class PrivateEndpointConnectionsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByConfigurationStoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + bodyMapper: Mappers.PrivateEndpointConnectionListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.configStoreName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.ErrorResponse, }, - default: { - bodyMapper: Mappers.ErrorResponse - } }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -436,31 +412,51 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.privateEndpointConnectionName ], headerParameters: [Parameters.accept], - serializer + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configStoreName, + Parameters.privateEndpointConnectionName, + ], + headerParameters: [Parameters.accept], + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 201: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 202: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 204: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.privateEndpointConnection, queryParameters: [Parameters.apiVersion], @@ -469,15 +465,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, @@ -485,8 +480,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -494,29 +489,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByConfigurationStoreNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult + bodyMapper: Mappers.PrivateEndpointConnectionListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts index d7df4f117d8..947d2ecb6ba 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/privateLinkResources.ts @@ -20,7 +20,7 @@ import { PrivateLinkResourcesListByConfigurationStoreResponse, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, - PrivateLinkResourcesListByConfigurationStoreNextResponse + PrivateLinkResourcesListByConfigurationStoreNextResponse, } from "../models"; /// @@ -45,12 +45,12 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { public listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams + options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByConfigurationStorePagingAll( resourceGroupName, configStoreName, - options + options, ); return { next() { @@ -67,9 +67,9 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { resourceGroupName, configStoreName, options, - settings + settings, ); - } + }, }; } @@ -77,7 +77,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { resourceGroupName: string, configStoreName: string, options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: PrivateLinkResourcesListByConfigurationStoreResponse; let continuationToken = settings?.continuationToken; @@ -85,7 +85,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { result = await this._listByConfigurationStore( resourceGroupName, configStoreName, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -97,7 +97,7 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { resourceGroupName, configStoreName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -109,12 +109,12 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private async *listByConfigurationStorePagingAll( resourceGroupName: string, configStoreName: string, - options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams + options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByConfigurationStorePagingPage( resourceGroupName, configStoreName, - options + options, )) { yield* page; } @@ -129,11 +129,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private _listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams + options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, options }, - listByConfigurationStoreOperationSpec + listByConfigurationStoreOperationSpec, ); } @@ -148,11 +148,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { resourceGroupName: string, configStoreName: string, groupName: string, - options?: PrivateLinkResourcesGetOptionalParams + options?: PrivateLinkResourcesGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, groupName, options }, - getOperationSpec + getOperationSpec, ); } @@ -168,11 +168,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { resourceGroupName: string, configStoreName: string, nextLink: string, - options?: PrivateLinkResourcesListByConfigurationStoreNextOptionalParams + options?: PrivateLinkResourcesListByConfigurationStoreNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, nextLink, options }, - listByConfigurationStoreNextOperationSpec + listByConfigurationStoreNextOperationSpec, ); } } @@ -180,38 +180,15 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByConfigurationStoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult + bodyMapper: Mappers.PrivateLinkResourceListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.configStoreName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources/{groupName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateLinkResource + bodyMapper: Mappers.ErrorResponse, }, - default: { - bodyMapper: Mappers.ErrorResponse - } }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -219,29 +196,50 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.groupName ], headerParameters: [Parameters.accept], - serializer + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/privateLinkResources/{groupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.configStoreName, + Parameters.groupName, + ], + headerParameters: [Parameters.accept], + serializer, }; const listByConfigurationStoreNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult + bodyMapper: Mappers.PrivateLinkResourceListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/replicas.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/replicas.ts index 78aaea25a9e..ae631bd8f83 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operations/replicas.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/replicas.ts @@ -16,7 +16,7 @@ import { AppConfigurationManagementClient } from "../appConfigurationManagementC import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -29,7 +29,7 @@ import { ReplicasCreateOptionalParams, ReplicasCreateResponse, ReplicasDeleteOptionalParams, - ReplicasListByConfigurationStoreNextResponse + ReplicasListByConfigurationStoreNextResponse, } from "../models"; /// @@ -54,12 +54,12 @@ export class ReplicasImpl implements Replicas { public listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: ReplicasListByConfigurationStoreOptionalParams + options?: ReplicasListByConfigurationStoreOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByConfigurationStorePagingAll( resourceGroupName, configStoreName, - options + options, ); return { next() { @@ -76,9 +76,9 @@ export class ReplicasImpl implements Replicas { resourceGroupName, configStoreName, options, - settings + settings, ); - } + }, }; } @@ -86,7 +86,7 @@ export class ReplicasImpl implements Replicas { resourceGroupName: string, configStoreName: string, options?: ReplicasListByConfigurationStoreOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReplicasListByConfigurationStoreResponse; let continuationToken = settings?.continuationToken; @@ -94,7 +94,7 @@ export class ReplicasImpl implements Replicas { result = await this._listByConfigurationStore( resourceGroupName, configStoreName, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -106,7 +106,7 @@ export class ReplicasImpl implements Replicas { resourceGroupName, configStoreName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -118,12 +118,12 @@ export class ReplicasImpl implements Replicas { private async *listByConfigurationStorePagingAll( resourceGroupName: string, configStoreName: string, - options?: ReplicasListByConfigurationStoreOptionalParams + options?: ReplicasListByConfigurationStoreOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByConfigurationStorePagingPage( resourceGroupName, configStoreName, - options + options, )) { yield* page; } @@ -138,11 +138,11 @@ export class ReplicasImpl implements Replicas { private _listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: ReplicasListByConfigurationStoreOptionalParams + options?: ReplicasListByConfigurationStoreOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, options }, - listByConfigurationStoreOperationSpec + listByConfigurationStoreOperationSpec, ); } @@ -157,11 +157,11 @@ export class ReplicasImpl implements Replicas { resourceGroupName: string, configStoreName: string, replicaName: string, - options?: ReplicasGetOptionalParams + options?: ReplicasGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, replicaName, options }, - getOperationSpec + getOperationSpec, ); } @@ -178,7 +178,7 @@ export class ReplicasImpl implements Replicas { configStoreName: string, replicaName: string, replicaCreationParameters: Replica, - options?: ReplicasCreateOptionalParams + options?: ReplicasCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -187,21 +187,20 @@ export class ReplicasImpl implements Replicas { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -210,8 +209,8 @@ export class ReplicasImpl implements Replicas { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -219,8 +218,8 @@ export class ReplicasImpl implements Replicas { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; @@ -231,9 +230,9 @@ export class ReplicasImpl implements Replicas { configStoreName, replicaName, replicaCreationParameters, - options + options, }, - spec: createOperationSpec + spec: createOperationSpec, }); const poller = await createHttpPoller< ReplicasCreateResponse, @@ -241,7 +240,7 @@ export class ReplicasImpl implements Replicas { >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -260,14 +259,14 @@ export class ReplicasImpl implements Replicas { configStoreName: string, replicaName: string, replicaCreationParameters: Replica, - options?: ReplicasCreateOptionalParams + options?: ReplicasCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, configStoreName, replicaName, replicaCreationParameters, - options + options, ); return poller.pollUntilDone(); } @@ -283,25 +282,24 @@ export class ReplicasImpl implements Replicas { resourceGroupName: string, configStoreName: string, replicaName: string, - options?: ReplicasDeleteOptionalParams + options?: ReplicasDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -310,8 +308,8 @@ export class ReplicasImpl implements Replicas { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -319,20 +317,20 @@ export class ReplicasImpl implements Replicas { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, configStoreName, replicaName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation", }); await poller.poll(); return poller; @@ -349,13 +347,13 @@ export class ReplicasImpl implements Replicas { resourceGroupName: string, configStoreName: string, replicaName: string, - options?: ReplicasDeleteOptionalParams + options?: ReplicasDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, configStoreName, replicaName, - options + options, ); return poller.pollUntilDone(); } @@ -372,11 +370,11 @@ export class ReplicasImpl implements Replicas { resourceGroupName: string, configStoreName: string, nextLink: string, - options?: ReplicasListByConfigurationStoreNextOptionalParams + options?: ReplicasListByConfigurationStoreNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, configStoreName, nextLink, options }, - listByConfigurationStoreNextOperationSpec + listByConfigurationStoreNextOperationSpec, ); } } @@ -384,38 +382,36 @@ export class ReplicasImpl implements Replicas { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByConfigurationStoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReplicaListResult + bodyMapper: Mappers.ReplicaListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.configStoreName + Parameters.configStoreName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -423,31 +419,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.replicaName + Parameters.replicaName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 201: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 202: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, 204: { - bodyMapper: Mappers.Replica + bodyMapper: Mappers.Replica, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.replicaCreationParameters, queryParameters: [Parameters.apiVersion], @@ -456,15 +451,14 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.replicaName1 + Parameters.replicaName1, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/replicas/{replicaName}", httpMethod: "DELETE", responses: { 200: {}, @@ -472,8 +466,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -481,29 +475,29 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.replicaName1 + Parameters.replicaName1, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByConfigurationStoreNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReplicaListResult + bodyMapper: Mappers.ReplicaListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.configStoreName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operations/snapshots.ts b/sdk/appconfiguration/arm-appconfiguration/src/operations/snapshots.ts new file mode 100644 index 00000000000..6c3c6de3e90 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/src/operations/snapshots.ts @@ -0,0 +1,222 @@ +/* + * 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 { Snapshots } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AppConfigurationManagementClient } from "../appConfigurationManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + SnapshotsGetOptionalParams, + SnapshotsGetResponse, + Snapshot, + SnapshotsCreateOptionalParams, + SnapshotsCreateResponse, +} from "../models"; + +/** Class containing Snapshots operations. */ +export class SnapshotsImpl implements Snapshots { + private readonly client: AppConfigurationManagementClient; + + /** + * Initialize a new instance of the class Snapshots class. + * @param client Reference to the service client + */ + constructor(client: AppConfigurationManagementClient) { + this.client = client; + } + + /** + * Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure + * Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration + * snapshots the data plane API should be used instead. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configStoreName The name of the configuration store. + * @param snapshotName The name of the snapshot. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + configStoreName: string, + snapshotName: string, + options?: SnapshotsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, configStoreName, snapshotName, options }, + getOperationSpec, + ); + } + + /** + * Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) + * Template deployments. For all other scenarios involving App Configuration snapshots the data plane + * API should be used instead. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configStoreName The name of the configuration store. + * @param snapshotName The name of the snapshot. + * @param body The parameters for creating a snapshot. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + configStoreName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SnapshotsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, configStoreName, snapshotName, body, options }, + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + SnapshotsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) + * Template deployments. For all other scenarios involving App Configuration snapshots the data plane + * API should be used instead. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configStoreName The name of the configuration store. + * @param snapshotName The name of the snapshot. + * @param body The parameters for creating a snapshot. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + configStoreName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams, + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + configStoreName, + snapshotName, + body, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/snapshots/{snapshotName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Snapshot, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.configStoreName, + Parameters.resourceGroupName1, + Parameters.snapshotName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppConfiguration/configurationStores/{configStoreName}/snapshots/{snapshotName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Snapshot, + }, + 201: { + bodyMapper: Mappers.Snapshot, + }, + 202: { + bodyMapper: Mappers.Snapshot, + }, + 204: { + bodyMapper: Mappers.Snapshot, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.body, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.configStoreName, + Parameters.resourceGroupName1, + Parameters.snapshotName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/configurationStores.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/configurationStores.ts index dbe75b37501..fd7c9608ec6 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/configurationStores.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/configurationStores.ts @@ -29,7 +29,7 @@ import { ConfigurationStoresRegenerateKeyResponse, ConfigurationStoresGetDeletedOptionalParams, ConfigurationStoresGetDeletedResponse, - ConfigurationStoresPurgeDeletedOptionalParams + ConfigurationStoresPurgeDeletedOptionalParams, } from "../models"; /// @@ -40,7 +40,7 @@ export interface ConfigurationStores { * @param options The options parameters. */ list( - options?: ConfigurationStoresListOptionalParams + options?: ConfigurationStoresListOptionalParams, ): PagedAsyncIterableIterator; /** * Lists the configuration stores for a given resource group. @@ -49,7 +49,7 @@ export interface ConfigurationStores { */ listByResourceGroup( resourceGroupName: string, - options?: ConfigurationStoresListByResourceGroupOptionalParams + options?: ConfigurationStoresListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Lists the access key for the specified configuration store. @@ -60,14 +60,14 @@ export interface ConfigurationStores { listKeys( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresListKeysOptionalParams + options?: ConfigurationStoresListKeysOptionalParams, ): PagedAsyncIterableIterator; /** * Gets information about the deleted configuration stores in a subscription. * @param options The options parameters. */ listDeleted( - options?: ConfigurationStoresListDeletedOptionalParams + options?: ConfigurationStoresListDeletedOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the properties of the specified configuration store. @@ -78,7 +78,7 @@ export interface ConfigurationStores { get( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresGetOptionalParams + options?: ConfigurationStoresGetOptionalParams, ): Promise; /** * Creates a configuration store with the specified parameters. @@ -91,7 +91,7 @@ export interface ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreCreationParameters: ConfigurationStore, - options?: ConfigurationStoresCreateOptionalParams + options?: ConfigurationStoresCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -109,7 +109,7 @@ export interface ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreCreationParameters: ConfigurationStore, - options?: ConfigurationStoresCreateOptionalParams + options?: ConfigurationStoresCreateOptionalParams, ): Promise; /** * Deletes a configuration store. @@ -120,7 +120,7 @@ export interface ConfigurationStores { beginDelete( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresDeleteOptionalParams + options?: ConfigurationStoresDeleteOptionalParams, ): Promise, void>>; /** * Deletes a configuration store. @@ -131,7 +131,7 @@ export interface ConfigurationStores { beginDeleteAndWait( resourceGroupName: string, configStoreName: string, - options?: ConfigurationStoresDeleteOptionalParams + options?: ConfigurationStoresDeleteOptionalParams, ): Promise; /** * Updates a configuration store with the specified parameters. @@ -144,7 +144,7 @@ export interface ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreUpdateParameters: ConfigurationStoreUpdateParameters, - options?: ConfigurationStoresUpdateOptionalParams + options?: ConfigurationStoresUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -162,7 +162,7 @@ export interface ConfigurationStores { resourceGroupName: string, configStoreName: string, configStoreUpdateParameters: ConfigurationStoreUpdateParameters, - options?: ConfigurationStoresUpdateOptionalParams + options?: ConfigurationStoresUpdateOptionalParams, ): Promise; /** * Regenerates an access key for the specified configuration store. @@ -175,7 +175,7 @@ export interface ConfigurationStores { resourceGroupName: string, configStoreName: string, regenerateKeyParameters: RegenerateKeyParameters, - options?: ConfigurationStoresRegenerateKeyOptionalParams + options?: ConfigurationStoresRegenerateKeyOptionalParams, ): Promise; /** * Gets a deleted Azure app configuration store. @@ -186,7 +186,7 @@ export interface ConfigurationStores { getDeleted( location: string, configStoreName: string, - options?: ConfigurationStoresGetDeletedOptionalParams + options?: ConfigurationStoresGetDeletedOptionalParams, ): Promise; /** * Permanently deletes the specified configuration store. @@ -197,7 +197,7 @@ export interface ConfigurationStores { beginPurgeDeleted( location: string, configStoreName: string, - options?: ConfigurationStoresPurgeDeletedOptionalParams + options?: ConfigurationStoresPurgeDeletedOptionalParams, ): Promise, void>>; /** * Permanently deletes the specified configuration store. @@ -208,6 +208,6 @@ export interface ConfigurationStores { beginPurgeDeletedAndWait( location: string, configStoreName: string, - options?: ConfigurationStoresPurgeDeletedOptionalParams + options?: ConfigurationStoresPurgeDeletedOptionalParams, ): Promise; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/index.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/index.ts index d89b9023712..2a23425b1db 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/index.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/index.ts @@ -12,3 +12,4 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./keyValues"; export * from "./replicas"; +export * from "./snapshots"; diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/keyValues.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/keyValues.ts index 446763557a1..f3cf7fe3502 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/keyValues.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/keyValues.ts @@ -12,13 +12,15 @@ import { KeyValuesGetResponse, KeyValuesCreateOrUpdateOptionalParams, KeyValuesCreateOrUpdateResponse, - KeyValuesDeleteOptionalParams + KeyValuesDeleteOptionalParams, } from "../models"; /** Interface representing a KeyValues. */ export interface KeyValues { /** - * Gets the properties of the specified key-value. + * Gets the properties of the specified key-value. NOTE: This operation is intended for use in ARM + * Template deployments. For all other scenarios involving App Configuration key-values the data plane + * API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -29,10 +31,11 @@ export interface KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesGetOptionalParams + options?: KeyValuesGetOptionalParams, ): Promise; /** - * Creates a key-value. + * Creates a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all + * other scenarios involving App Configuration key-values the data plane API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -43,10 +46,11 @@ export interface KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesCreateOrUpdateOptionalParams + options?: KeyValuesCreateOrUpdateOptionalParams, ): Promise; /** - * Deletes a key-value. + * Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all + * other scenarios involving App Configuration key-values the data plane API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -57,10 +61,11 @@ export interface KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesDeleteOptionalParams + options?: KeyValuesDeleteOptionalParams, ): Promise, void>>; /** - * Deletes a key-value. + * Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all + * other scenarios involving App Configuration key-values the data plane API should be used instead. * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param configStoreName The name of the configuration store. * @param keyValueName Identifier of key and label combination. Key and label are joined by $ @@ -71,6 +76,6 @@ export interface KeyValues { resourceGroupName: string, configStoreName: string, keyValueName: string, - options?: KeyValuesDeleteOptionalParams + options?: KeyValuesDeleteOptionalParams, ): Promise; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/operations.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/operations.ts index 39f495c2bdd..867179f7f9f 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/operations.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/operations.ts @@ -14,7 +14,7 @@ import { OperationsCheckNameAvailabilityOptionalParams, OperationsCheckNameAvailabilityResponse, OperationsRegionalCheckNameAvailabilityOptionalParams, - OperationsRegionalCheckNameAvailabilityResponse + OperationsRegionalCheckNameAvailabilityResponse, } from "../models"; /// @@ -25,7 +25,7 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; /** * Checks whether the configuration store name is available for use. @@ -35,7 +35,7 @@ export interface Operations { */ checkNameAvailability( checkNameAvailabilityParameters: CheckNameAvailabilityParameters, - options?: OperationsCheckNameAvailabilityOptionalParams + options?: OperationsCheckNameAvailabilityOptionalParams, ): Promise; /** * Checks whether the configuration store name is available for use. @@ -47,6 +47,6 @@ export interface Operations { regionalCheckNameAvailability( location: string, checkNameAvailabilityParameters: CheckNameAvailabilityParameters, - options?: OperationsRegionalCheckNameAvailabilityOptionalParams + options?: OperationsRegionalCheckNameAvailabilityOptionalParams, ): Promise; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateEndpointConnections.ts index ad6cfe1f229..cab02d216e5 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateEndpointConnections.ts @@ -15,7 +15,7 @@ import { PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface PrivateEndpointConnections { listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams + options?: PrivateEndpointConnectionsListByConfigurationStoreOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the specified private endpoint connection associated with the configuration store. @@ -43,7 +43,7 @@ export interface PrivateEndpointConnections { resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise; /** * Update the state of the specified private endpoint connection associated with the configuration @@ -60,7 +60,7 @@ export interface PrivateEndpointConnections { configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -82,7 +82,7 @@ export interface PrivateEndpointConnections { configStoreName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams + options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams, ): Promise; /** * Deletes a private endpoint connection. @@ -95,7 +95,7 @@ export interface PrivateEndpointConnections { resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise, void>>; /** * Deletes a private endpoint connection. @@ -108,6 +108,6 @@ export interface PrivateEndpointConnections { resourceGroupName: string, configStoreName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateLinkResources.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateLinkResources.ts index c9c528826c8..fd4a8f6f04a 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/privateLinkResources.ts @@ -11,7 +11,7 @@ import { PrivateLinkResource, PrivateLinkResourcesListByConfigurationStoreOptionalParams, PrivateLinkResourcesGetOptionalParams, - PrivateLinkResourcesGetResponse + PrivateLinkResourcesGetResponse, } from "../models"; /// @@ -26,7 +26,7 @@ export interface PrivateLinkResources { listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams + options?: PrivateLinkResourcesListByConfigurationStoreOptionalParams, ): PagedAsyncIterableIterator; /** * Gets a private link resource that need to be created for a configuration store. @@ -39,6 +39,6 @@ export interface PrivateLinkResources { resourceGroupName: string, configStoreName: string, groupName: string, - options?: PrivateLinkResourcesGetOptionalParams + options?: PrivateLinkResourcesGetOptionalParams, ): Promise; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/replicas.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/replicas.ts index 20ee6bf8a54..a5a2884d40b 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/replicas.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/replicas.ts @@ -15,7 +15,7 @@ import { ReplicasGetResponse, ReplicasCreateOptionalParams, ReplicasCreateResponse, - ReplicasDeleteOptionalParams + ReplicasDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface Replicas { listByConfigurationStore( resourceGroupName: string, configStoreName: string, - options?: ReplicasListByConfigurationStoreOptionalParams + options?: ReplicasListByConfigurationStoreOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the properties of the specified replica. @@ -43,7 +43,7 @@ export interface Replicas { resourceGroupName: string, configStoreName: string, replicaName: string, - options?: ReplicasGetOptionalParams + options?: ReplicasGetOptionalParams, ): Promise; /** * Creates a replica with the specified parameters. @@ -58,7 +58,7 @@ export interface Replicas { configStoreName: string, replicaName: string, replicaCreationParameters: Replica, - options?: ReplicasCreateOptionalParams + options?: ReplicasCreateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -78,7 +78,7 @@ export interface Replicas { configStoreName: string, replicaName: string, replicaCreationParameters: Replica, - options?: ReplicasCreateOptionalParams + options?: ReplicasCreateOptionalParams, ): Promise; /** * Deletes a replica. @@ -91,7 +91,7 @@ export interface Replicas { resourceGroupName: string, configStoreName: string, replicaName: string, - options?: ReplicasDeleteOptionalParams + options?: ReplicasDeleteOptionalParams, ): Promise, void>>; /** * Deletes a replica. @@ -104,6 +104,6 @@ export interface Replicas { resourceGroupName: string, configStoreName: string, replicaName: string, - options?: ReplicasDeleteOptionalParams + options?: ReplicasDeleteOptionalParams, ): Promise; } diff --git a/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/snapshots.ts b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/snapshots.ts new file mode 100644 index 00000000000..1e4dc8c67ab --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/src/operationsInterfaces/snapshots.ts @@ -0,0 +1,74 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + SnapshotsGetOptionalParams, + SnapshotsGetResponse, + Snapshot, + SnapshotsCreateOptionalParams, + SnapshotsCreateResponse, +} from "../models"; + +/** Interface representing a Snapshots. */ +export interface Snapshots { + /** + * Gets the properties of the specified snapshot. NOTE: This operation is intended for use in Azure + * Resource Manager (ARM) Template deployments. For all other scenarios involving App Configuration + * snapshots the data plane API should be used instead. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configStoreName The name of the configuration store. + * @param snapshotName The name of the snapshot. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + configStoreName: string, + snapshotName: string, + options?: SnapshotsGetOptionalParams, + ): Promise; + /** + * Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) + * Template deployments. For all other scenarios involving App Configuration snapshots the data plane + * API should be used instead. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configStoreName The name of the configuration store. + * @param snapshotName The name of the snapshot. + * @param body The parameters for creating a snapshot. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + configStoreName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SnapshotsCreateResponse + > + >; + /** + * Creates a snapshot. NOTE: This operation is intended for use in Azure Resource Manager (ARM) + * Template deployments. For all other scenarios involving App Configuration snapshots the data plane + * API should be used instead. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param configStoreName The name of the configuration store. + * @param snapshotName The name of the snapshot. + * @param body The parameters for creating a snapshot. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + configStoreName: string, + snapshotName: string, + body: Snapshot, + options?: SnapshotsCreateOptionalParams, + ): Promise; +} diff --git a/sdk/appconfiguration/arm-appconfiguration/src/pagingHelper.ts b/sdk/appconfiguration/arm-appconfiguration/src/pagingHelper.ts index 269a2b9814b..205cccc2659 100644 --- a/sdk/appconfiguration/arm-appconfiguration/src/pagingHelper.ts +++ b/sdk/appconfiguration/arm-appconfiguration/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/appconfiguration/arm-appconfiguration/test/appconfiguration_operations_test.spec.ts b/sdk/appconfiguration/arm-appconfiguration/test/appconfiguration_operations_test.spec.ts new file mode 100644 index 00000000000..1f0368d5f24 --- /dev/null +++ b/sdk/appconfiguration/arm-appconfiguration/test/appconfiguration_operations_test.spec.ts @@ -0,0 +1,112 @@ +/* + * 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 { + env, + Recorder, + RecorderStartOptions, + delay, + isPlaybackMode, +} from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert } from "chai"; +import { Context } from "mocha"; +import { AppConfigurationManagementClient } from "../src/appConfigurationManagementClient"; + +const replaceableVariables: Record = { + SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, + removeCentralSanitizers: [ + "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section + "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section + ], +}; + +export const testPollingOptions = { + updateIntervalInMs: isPlaybackMode() ? 0 : undefined, +}; + +describe("AppConfiguration test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: AppConfigurationManagementClient; + let location: string; + let resourceGroup: string; + let resourcename: string; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + subscriptionId = env.SUBSCRIPTION_ID || ''; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new AppConfigurationManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); + location = "eastus"; + resourceGroup = "myjstest"; + resourcename = "resourcetest"; + + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("operations list test", async function () { + const resArray = new Array(); + for await (let item of client.operations.list()) { + resArray.push(item); + } + assert.notEqual(resArray.length, 0); + }); + + + it("configurationStores create test", async function () { + const res = await client.configurationStores.beginCreateAndWait( + resourceGroup, + resourcename, + { + dataPlaneProxy: { + authenticationMode: "Pass-through", + privateLinkDelegation: "Enabled", + }, + location, + sku: { name: "Standard" }, + }, + testPollingOptions); + assert.equal(res.name, resourcename); + }); + + it("configurationStores get test", async function () { + const res = await client.configurationStores.get( + resourceGroup, + resourcename + ); + assert.equal(res.name, resourcename); + }); + + it("configurationStores list test", async function () { + const resArray = new Array(); + for await (let item of client.configurationStores.listByResourceGroup(resourceGroup)) { + resArray.push(item); + } + assert.equal(resArray.length, 1); + }); + + it("configurationStores delete test", async function () { + const resArray = new Array(); + const res = await client.configurationStores.beginDeleteAndWait(resourceGroup, resourcename + ) + for await (let item of client.configurationStores.listByResourceGroup(resourceGroup)) { + resArray.push(item); + } + assert.equal(resArray.length, 0); + }); +}) diff --git a/sdk/appconfiguration/arm-appconfiguration/test/sampleTest.ts b/sdk/appconfiguration/arm-appconfiguration/test/sampleTest.ts deleted file mode 100644 index 8ff7deb0acb..00000000000 --- a/sdk/appconfiguration/arm-appconfiguration/test/sampleTest.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - 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, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -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!"); - }); -});