diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 218cd259689d..b1964cc15cd2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2937,7 +2937,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3192,7 +3192,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3342,7 +3342,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3476,7 +3476,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3539,7 +3539,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3641,7 +3641,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.0: @@ -3895,7 +3895,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220927 + typescript: 4.9.0-dev.20220928 dev: false /downlevel-dts/0.8.0: @@ -3914,11 +3914,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.262: @@ -4803,7 +4803,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -4943,7 +4943,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6340,7 +6340,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6350,7 +6350,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -6771,7 +6771,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -8827,8 +8827,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220927: - resolution: {integrity: sha512-MXTYXCsE60y6eXtLu2aAgeV0LD/e5HCBPPRETcH+UMPoVusk9RjJNzj1/9gkNRryIoqeeL3w2AlxYHbiHPtQog==} + /typescript/4.9.0-dev.20220928: + resolution: {integrity: sha512-6hidLWDJy4HwPovwzGe0tGhTosozmSRNmu4BXuzaWSS1Qt39XiWvND8KYhOl/C27BnMw4DlTSzUh/LDTpqNklg==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -8951,7 +8951,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -10160,12 +10160,12 @@ packages: dev: false file:projects/arm-appcontainers.tgz: - resolution: {integrity: sha512-zJBlR/FqrpfdpOXdxwPE4l0PhaF5InR3FEFgysDDqmcBSWn5aPFOv7BlE7SYB/uTrlYri8LSh2iai7P2MXQkpA==, tarball: file:projects/arm-appcontainers.tgz} + resolution: {integrity: sha512-cTSZDpPVjhGQdBWgLuzFu3Y21IHtA2gnGlSXflNTW7zD+FDPKv12VfHeYhAJrCECWzuIrDEUK/g2iHW3wDk1dA==, tarball: file:projects/arm-appcontainers.tgz} name: '@rush-temp/arm-appcontainers' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.31.2 + '@microsoft/api-extractor': 7.18.11 '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 @@ -10179,7 +10179,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.17.2 transitivePeerDependencies: - '@types/node' diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index f2188ded34d3..93fa3b39f7ad 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,15 +1,198 @@ # Release History + +## 2.0.0-beta.1 (2022-09-28) + +**Features** -## 1.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group AvailableWorkloadProfiles + - Added operation group BillingMeters + - Added operation group ConnectedEnvironments + - Added operation group ConnectedEnvironmentsCertificates + - Added operation group ConnectedEnvironmentsDaprComponents + - Added operation group ConnectedEnvironmentsStorages + - Added operation group ContainerAppsDiagnostics + - Added operation group ManagedEnvironmentDiagnostics + - Added operation group ManagedEnvironmentsDiagnostics + - Added operation ContainerApps.getAuthToken + - Added operation ManagedEnvironments.getAuthToken + - Added Interface AvailableWorkloadProfile + - Added Interface AvailableWorkloadProfileProperties + - Added Interface AvailableWorkloadProfilesCollection + - Added Interface AvailableWorkloadProfilesGetNextOptionalParams + - Added Interface AvailableWorkloadProfilesGetOptionalParams + - Added Interface BaseContainer + - Added Interface BillingMeter + - Added Interface BillingMeterCollection + - Added Interface BillingMeterProperties + - Added Interface BillingMetersGetOptionalParams + - Added Interface ConnectedEnvironment + - Added Interface ConnectedEnvironmentCollection + - Added Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams + - Added Interface ConnectedEnvironmentsCertificatesDeleteOptionalParams + - Added Interface ConnectedEnvironmentsCertificatesGetOptionalParams + - Added Interface ConnectedEnvironmentsCertificatesListNextOptionalParams + - Added Interface ConnectedEnvironmentsCertificatesListOptionalParams + - Added Interface ConnectedEnvironmentsCertificatesUpdateOptionalParams + - Added Interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams + - Added Interface ConnectedEnvironmentsCreateOrUpdateOptionalParams + - Added Interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams + - Added Interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams + - Added Interface ConnectedEnvironmentsDaprComponentsGetOptionalParams + - Added Interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams + - Added Interface ConnectedEnvironmentsDaprComponentsListOptionalParams + - Added Interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams + - Added Interface ConnectedEnvironmentsDeleteOptionalParams + - Added Interface ConnectedEnvironmentsGetOptionalParams + - Added Interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams + - Added Interface ConnectedEnvironmentsListByResourceGroupOptionalParams + - Added Interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams + - Added Interface ConnectedEnvironmentsListBySubscriptionOptionalParams + - Added Interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams + - Added Interface ConnectedEnvironmentsStoragesDeleteOptionalParams + - Added Interface ConnectedEnvironmentsStoragesGetOptionalParams + - Added Interface ConnectedEnvironmentsStoragesListOptionalParams + - Added Interface ConnectedEnvironmentStorage + - Added Interface ConnectedEnvironmentStorageProperties + - Added Interface ConnectedEnvironmentStoragesCollection + - Added Interface ConnectedEnvironmentsUpdateOptionalParams + - Added Interface ContainerAppAuthToken + - Added Interface ContainerAppsDiagnosticsGetDetectorOptionalParams + - Added Interface ContainerAppsDiagnosticsGetRevisionOptionalParams + - Added Interface ContainerAppsDiagnosticsGetRootOptionalParams + - Added Interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams + - Added Interface ContainerAppsDiagnosticsListDetectorsOptionalParams + - Added Interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams + - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams + - Added Interface ContainerAppsGetAuthTokenOptionalParams + - Added Interface CustomDomainConfiguration + - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo + - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem + - Added Interface DiagnosticDataProviderMetadata + - Added Interface DiagnosticDataProviderMetadataPropertyBagItem + - Added Interface DiagnosticDataTableResponseColumn + - Added Interface DiagnosticDataTableResponseObject + - Added Interface DiagnosticRendering + - Added Interface Diagnostics + - Added Interface DiagnosticsCollection + - Added Interface DiagnosticsDataApiResponse + - Added Interface DiagnosticsDefinition + - Added Interface DiagnosticsProperties + - Added Interface DiagnosticsStatus + - Added Interface DiagnosticSupportTopic + - Added Interface EnvironmentAuthToken + - Added Interface EnvironmentSkuProperties + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface ExtendedLocation + - Added Interface InitContainer + - Added Interface IpSecurityRestrictionRule + - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + - Added Interface ManagedEnvironmentOutboundSettings + - Added Interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams + - Added Interface ManagedEnvironmentsGetAuthTokenOptionalParams + - Added Interface TcpScaleRule + - Added Interface WorkloadProfile + - Added Type Alias Action + - Added Type Alias Applicability + - Added Type Alias AvailableWorkloadProfilesGetNextResponse + - Added Type Alias AvailableWorkloadProfilesGetResponse + - Added Type Alias BillingMetersGetResponse + - Added Type Alias Category + - Added Type Alias ConnectedEnvironmentProvisioningState + - Added Type Alias ConnectedEnvironmentsCertificatesCreateOrUpdateResponse + - Added Type Alias ConnectedEnvironmentsCertificatesGetResponse + - Added Type Alias ConnectedEnvironmentsCertificatesListNextResponse + - Added Type Alias ConnectedEnvironmentsCertificatesListResponse + - Added Type Alias ConnectedEnvironmentsCertificatesUpdateResponse + - Added Type Alias ConnectedEnvironmentsCheckNameAvailabilityResponse + - Added Type Alias ConnectedEnvironmentsCreateOrUpdateResponse + - Added Type Alias ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse + - Added Type Alias ConnectedEnvironmentsDaprComponentsGetResponse + - Added Type Alias ConnectedEnvironmentsDaprComponentsListNextResponse + - Added Type Alias ConnectedEnvironmentsDaprComponentsListResponse + - Added Type Alias ConnectedEnvironmentsDaprComponentsListSecretsResponse + - Added Type Alias ConnectedEnvironmentsGetResponse + - Added Type Alias ConnectedEnvironmentsListByResourceGroupNextResponse + - Added Type Alias ConnectedEnvironmentsListByResourceGroupResponse + - Added Type Alias ConnectedEnvironmentsListBySubscriptionNextResponse + - Added Type Alias ConnectedEnvironmentsListBySubscriptionResponse + - Added Type Alias ConnectedEnvironmentsStoragesCreateOrUpdateResponse + - Added Type Alias ConnectedEnvironmentsStoragesGetResponse + - Added Type Alias ConnectedEnvironmentsStoragesListResponse + - Added Type Alias ConnectedEnvironmentsUpdateResponse + - Added Type Alias ContainerAppsDiagnosticsGetDetectorResponse + - Added Type Alias ContainerAppsDiagnosticsGetRevisionResponse + - Added Type Alias ContainerAppsDiagnosticsGetRootResponse + - Added Type Alias ContainerAppsDiagnosticsListDetectorsNextResponse + - Added Type Alias ContainerAppsDiagnosticsListDetectorsResponse + - Added Type Alias ContainerAppsDiagnosticsListRevisionsNextResponse + - Added Type Alias ContainerAppsDiagnosticsListRevisionsResponse + - Added Type Alias ContainerAppsGetAuthTokenResponse + - Added Type Alias ExtendedLocationTypes + - Added Type Alias LogLevel + - Added Type Alias ManagedEnvironmentDiagnosticsGetDetectorResponse + - Added Type Alias ManagedEnvironmentDiagnosticsListDetectorsResponse + - Added Type Alias ManagedEnvironmentOutBoundType + - Added Type Alias ManagedEnvironmentsDiagnosticsGetRootResponse + - Added Type Alias ManagedEnvironmentsGetAuthTokenResponse + - Added Type Alias SkuName + - Interface CertificateProperties has a new optional parameter subjectAlternativeNames + - Interface Configuration has a new optional parameter maxInactiveRevisions + - Interface ContainerApp has a new optional parameter environmentId + - Interface ContainerApp has a new optional parameter eventStreamEndpoint + - Interface ContainerApp has a new optional parameter extendedLocation + - Interface ContainerApp has a new optional parameter workloadProfileType + - Interface CustomHostnameAnalysisResult has a new optional parameter conflictWithEnvironmentCustomDomain + - Interface Dapr has a new optional parameter enableApiLogging + - Interface Dapr has a new optional parameter httpMaxRequestSize + - Interface Dapr has a new optional parameter httpReadBufferSize + - Interface Dapr has a new optional parameter logLevel + - Interface DaprComponent has a new optional parameter secretStoreComponent + - Interface Ingress has a new optional parameter exposedPort + - Interface Ingress has a new optional parameter ipSecurityRestrictions + - Interface ManagedEnvironment has a new optional parameter customDomainConfiguration + - Interface ManagedEnvironment has a new optional parameter eventStreamEndpoint + - Interface ManagedEnvironment has a new optional parameter sku + - Interface ManagedEnvironment has a new optional parameter workloadProfiles + - Interface ReplicaContainer has a new optional parameter execEndpoint + - Interface ReplicaContainer has a new optional parameter logStreamEndpoint + - Interface Revision has a new optional parameter lastActiveTime + - Interface ScaleRule has a new optional parameter tcp + - Interface Template has a new optional parameter initContainers + - Interface VnetConfiguration has a new optional parameter outboundSettings + - Class ContainerAppsAPIClient has a new parameter availableWorkloadProfiles + - Class ContainerAppsAPIClient has a new parameter billingMeters + - Class ContainerAppsAPIClient has a new parameter connectedEnvironments + - Class ContainerAppsAPIClient has a new parameter connectedEnvironmentsCertificates + - Class ContainerAppsAPIClient has a new parameter connectedEnvironmentsDaprComponents + - Class ContainerAppsAPIClient has a new parameter connectedEnvironmentsStorages + - Class ContainerAppsAPIClient has a new parameter containerAppsDiagnostics + - Class ContainerAppsAPIClient has a new parameter managedEnvironmentDiagnostics + - Class ContainerAppsAPIClient has a new parameter managedEnvironmentsDiagnostics + - Added Enum KnownAction + - Added Enum KnownApplicability + - Added Enum KnownCategory + - Added Enum KnownConnectedEnvironmentProvisioningState + - Added Enum KnownExtendedLocationTypes + - Added Enum KnownLogLevel + - Added Enum KnownManagedEnvironmentOutBoundType + - Added Enum KnownSkuName + - Enum KnownContainerAppProvisioningState has a new value Deleting + - Enum KnownIngressTransportMethod has a new value Tcp -### Other Changes +**Breaking Changes** + - Interface Container no longer has parameter args + - Interface Container no longer has parameter command + - Interface Container no longer has parameter env + - Interface Container no longer has parameter image + - Interface Container no longer has parameter name + - Interface Container no longer has parameter resources + - Interface Container no longer has parameter volumeMounts + + ## 1.1.0 (2022-08-02) **Features** diff --git a/sdk/appcontainers/arm-appcontainers/README.md b/sdk/appcontainers/arm-appcontainers/README.md index 1272651c6c63..6aed934c3b3d 100644 --- a/sdk/appcontainers/arm-appcontainers/README.md +++ b/sdk/appcontainers/arm-appcontainers/README.md @@ -6,14 +6,14 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-appcontainers) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 8c9eff4bc253..9c7396a8d476 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1dd79c416cdccde274113ec03b92b75069fad464", + "commit": "910f631537ac05ab27470158b465d67a5d8df914", "readme": "specification/app/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.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\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220721.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220721.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.3", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index 340cb4a1767a..57ffc5e6a2df 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "1.1.1", + "version": "2.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -28,7 +28,7 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-appcontainers.d.ts", "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-multi-entry": "^4.1.0", @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_create_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_create_test.json deleted file mode 100644 index 8e8d8abd46e0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_create_test.json +++ /dev/null @@ -1,752 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerApps/mycontainerappxxx?api-version=2022-03-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "358", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "9d8b4909-7ae3-4e60-a7b9-9f5ce51255d3" - }, - "RequestBody": { - "location": "eastus", - "properties": { - "managedEnvironmentId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12", - "template": { - "containers": [ - { - "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld", - "name": "simple-hello-world-container", - "resources": { - "cpu": 0.25, - "memory": "0.5Gi" - } - } - ] - } - } - }, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "Cache-Control": "no-cache", - "Content-Length": "1175", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:40 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-async-operation-timeout": "PT15M", - "x-ms-correlation-request-id": "53d4e006-3c97-4e08-b9bd-187b37d766f7", - "x-ms-ratelimit-remaining-subscription-resource-requests": "499", - "x-ms-request-id": "53d4e006-3c97-4e08-b9bd-187b37d766f7", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062940Z:53d4e006-3c97-4e08-b9bd-187b37d766f7", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerapps/mycontainerappxxx", - "name": "mycontainerappxxx", - "type": "Microsoft.App/containerApps", - "location": "East US", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2022-08-24T06:29:36.994158Z", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2022-08-24T06:29:36.994158Z" - }, - "properties": { - "provisioningState": "InProgress", - "managedEnvironmentId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12", - "outboundIpAddresses": [ - "20.237.48.184", - "20.237.51.128", - "20.237.51.169" - ], - "latestRevisionName": "", - "latestRevisionFqdn": "", - "customDomainVerificationId": "55F2E4435A6748F0C3A4666505B3672446A9A9AEFDDC20F98EFEE4B5DCC7807E", - "configuration": { - "activeRevisionsMode": "Single" - }, - "template": { - "revisionSuffix": "", - "containers": [ - { - "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld", - "name": "simple-hello-world-container", - "resources": { - "cpu": 0.25, - "memory": "0.5Gi", - "ephemeralStorage": "" - } - } - ], - "scale": { - "maxReplicas": 10 - } - } - }, - "identity": { - "type": "None" - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "e8c0175a-4caa-4245-b691-95c1fbc1afe1" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:41 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "aab72b98-4d5a-4a85-8d31-40ff33f41183", - "x-ms-ratelimit-remaining-subscription-reads": "11999", - "x-ms-request-id": "aab72b98-4d5a-4a85-8d31-40ff33f41183", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062941Z:aab72b98-4d5a-4a85-8d31-40ff33f41183", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "5c0f5c3c-9e61-4f84-86a2-b784949354c2" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:41 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9d52d2b2-1646-4dbb-b1b7-d9714c89ba3e", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "9d52d2b2-1646-4dbb-b1b7-d9714c89ba3e", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062941Z:9d52d2b2-1646-4dbb-b1b7-d9714c89ba3e", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "33446da6-8e9e-4f71-aa27-af7ec05d7feb" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:44 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1bc65c8e-3781-4cb8-ab0d-12f0a912cbae", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "1bc65c8e-3781-4cb8-ab0d-12f0a912cbae", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062944Z:1bc65c8e-3781-4cb8-ab0d-12f0a912cbae", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "53f53c79-985e-4d08-8a31-95f327c37c01" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:46 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7d611d4f-6e9e-4f0a-963f-5e9f831b5dd9", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "7d611d4f-6e9e-4f0a-963f-5e9f831b5dd9", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062946Z:7d611d4f-6e9e-4f0a-963f-5e9f831b5dd9", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "e9528834-b192-4179-affe-2649e5c69041" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:49 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1d139347-f1fe-4f89-9d6e-4f91f394fe40", - "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-request-id": "1d139347-f1fe-4f89-9d6e-4f91f394fe40", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062949Z:1d139347-f1fe-4f89-9d6e-4f91f394fe40", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "367cb0e1-e788-40fc-be9c-8ce55bee64cc" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:51 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a57a0b71-f7e5-4861-a772-7228de2a6557", - "x-ms-ratelimit-remaining-subscription-reads": "11994", - "x-ms-request-id": "a57a0b71-f7e5-4861-a772-7228de2a6557", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062951Z:a57a0b71-f7e5-4861-a772-7228de2a6557", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "26ca24e7-d520-4757-a321-3c53dfc20a16" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:53 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "875b12c7-fb87-4516-af19-aacb3752a804", - "x-ms-ratelimit-remaining-subscription-reads": "11993", - "x-ms-request-id": "875b12c7-fb87-4516-af19-aacb3752a804", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062954Z:875b12c7-fb87-4516-af19-aacb3752a804", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "852e1dca-77d2-49d9-93ad-baf56bc39f6b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:56 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1422d411-a6a9-4a40-b272-b144eb3b2e22", - "x-ms-ratelimit-remaining-subscription-reads": "11992", - "x-ms-request-id": "1422d411-a6a9-4a40-b272-b144eb3b2e22", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062956Z:1422d411-a6a9-4a40-b272-b144eb3b2e22", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "36329ec4-2a42-4ed6-b91c-0d2076b14f74" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:29:58 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "537927a2-436a-4352-b431-7735a1be2721", - "x-ms-ratelimit-remaining-subscription-reads": "11991", - "x-ms-request-id": "537927a2-436a-4352-b431-7735a1be2721", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T062959Z:537927a2-436a-4352-b431-7735a1be2721", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "2b0f6579-3464-46ad-92fd-cf2e7dd491b2" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:30:01 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c91c37bf-e073-4593-8b4c-0d5badcde6e5", - "x-ms-ratelimit-remaining-subscription-reads": "11990", - "x-ms-request-id": "c91c37bf-e073-4593-8b4c-0d5badcde6e5", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T063001Z:c91c37bf-e073-4593-8b4c-0d5badcde6e5", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "a7e59681-3b91-4ba7-b88d-1e415dcc443b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:30:03 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6b819d89-e749-45cb-abae-744aee13986f", - "x-ms-ratelimit-remaining-subscription-reads": "11989", - "x-ms-request-id": "6b819d89-e749-45cb-abae-744aee13986f", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T063004Z:6b819d89-e749-45cb-abae-744aee13986f", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "9ae5d86c-811f-4c1e-8cdb-835386e2f1e7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:30:06 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b7225e46-4db4-455f-9372-cc8bf193994e", - "x-ms-ratelimit-remaining-subscription-reads": "11988", - "x-ms-request-id": "b7225e46-4db4-455f-9372-cc8bf193994e", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T063006Z:b7225e46-4db4-455f-9372-cc8bf193994e", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "InProgress", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "26df50af-de24-474e-b3e5-3fd93c0e1ccc" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:30:08 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "eff5ce05-422e-487c-9d5b-d754faa16eda", - "x-ms-ratelimit-remaining-subscription-reads": "11987", - "x-ms-request-id": "eff5ce05-422e-487c-9d5b-d754faa16eda", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T063009Z:eff5ce05-422e-487c-9d5b-d754faa16eda", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/containerappOperationStatuses/6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "name": "6a2aa81b-ec53-4269-9975-0fdeb02dc297", - "status": "Succeeded", - "startTime": "2022-08-24T06:29:38.7052429" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerApps/mycontainerappxxx?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "2f1a3770-c60c-43f5-bff9-8f2960578dbf" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 06:30:12 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bf9d5d01-a4c2-467a-ac8e-09f9cc7fdebd", - "x-ms-ratelimit-remaining-subscription-reads": "11986", - "x-ms-request-id": "bf9d5d01-a4c2-467a-ac8e-09f9cc7fdebd", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T063012Z:bf9d5d01-a4c2-467a-ac8e-09f9cc7fdebd", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerapps/mycontainerappxxx", - "name": "mycontainerappxxx", - "type": "Microsoft.App/containerApps", - "location": "East US", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2022-08-24T06:29:36.994158", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2022-08-24T06:29:36.994158" - }, - "properties": { - "provisioningState": "Succeeded", - "managedEnvironmentId": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12", - "outboundIpAddresses": [ - "20.237.48.184", - "20.237.51.128", - "20.237.51.169" - ], - "latestRevisionName": "mycontainerappxxx--eq4i1ih", - "latestRevisionFqdn": "", - "customDomainVerificationId": "55F2E4435A6748F0C3A4666505B3672446A9A9AEFDDC20F98EFEE4B5DCC7807E", - "configuration": { - "activeRevisionsMode": "Single" - }, - "template": { - "revisionSuffix": "", - "containers": [ - { - "image": "mcr.microsoft.com/azuredocs/containerapps-helloworld", - "name": "simple-hello-world-container", - "resources": { - "cpu": 0.25, - "memory": "0.5Gi", - "ephemeralStorage": "" - } - } - ], - "scale": { - "maxReplicas": 10 - } - } - }, - "identity": { - "type": "None" - } - } - } - ], - "Variables": {} -} diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_delete_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_delete_test.json deleted file mode 100644 index 6fedd3d012ce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_delete_test.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerApps/mycontainerappxxx?api-version=2022-03-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "fa75696a-0304-4d59-9386-920cfa515cdb" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:41:27 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "dfadb082-9bd6-4d16-a827-ab4e4eeaed87", - "x-ms-ratelimit-remaining-subscription-deletes": "14998", - "x-ms-request-id": "dfadb082-9bd6-4d16-a827-ab4e4eeaed87", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064127Z:dfadb082-9bd6-4d16-a827-ab4e4eeaed87", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "e57d7e70-c6c9-4088-a893-fcd67c7487e1" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:41:27 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bfe0d47b-8ba5-42ab-aba5-ff1ba923c383", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "bfe0d47b-8ba5-42ab-aba5-ff1ba923c383", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064128Z:bfe0d47b-8ba5-42ab-aba5-ff1ba923c383", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "082190a8-1817-4488-adb9-aa966435f269" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:41:28 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1d3eb6f5-f68c-4dbd-9504-ed429f33c7d8", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "1d3eb6f5-f68c-4dbd-9504-ed429f33c7d8", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064128Z:1d3eb6f5-f68c-4dbd-9504-ed429f33c7d8", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "9944ee1a-edb2-4574-8db1-c4e7a5a7bfbd" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:41:33 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e859b3df-ab17-4f4f-a67a-a0e47f46a1a2", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "e859b3df-ab17-4f4f-a67a-a0e47f46a1a2", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064134Z:e859b3df-ab17-4f4f-a67a-a0e47f46a1a2", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/containerappOperationResults/eba5a0dd-ff88-47ab-8703-b68bc6fa123c?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "c80c2c10-4768-432e-ae95-6e81260696e3" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Date": "Mon, 22 Aug 2022 06:41:38 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d311b5d6-5ac9-4d74-ab13-cd7ca2486341", - "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-request-id": "d311b5d6-5ac9-4d74-ab13-cd7ca2486341", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064139Z:d311b5d6-5ac9-4d74-ab13-cd7ca2486341", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerApps?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "e50ea025-4877-4e5f-ae2d-42521bb8205b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 22 Aug 2022 06:41:39 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2e8b59ab-93f4-4863-8aa5-fc44d39d68f8", - "x-ms-ratelimit-remaining-subscription-reads": "11994", - "x-ms-request-id": "2e8b59ab-93f4-4863-8aa5-fc44d39d68f8", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064139Z:2e8b59ab-93f4-4863-8aa5-fc44d39d68f8", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "value": [] - } - } - ], - "Variables": {} -} diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_list_secrets_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_list_secrets_test.json deleted file mode 100644 index 0a9f800b5da2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_containerapp_list_secrets_test.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/containerApps/mycontainerappxxx/listSecrets?api-version=2022-03-01", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "0", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "a9e112a0-042d-409e-a8de-ba65fd24f8c2" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 22 Aug 2022 06:41:24 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fa39bc09-cac8-443e-bbe1-11f73333646a", - "x-ms-ratelimit-remaining-subscription-writes": "1198", - "x-ms-request-id": "fa39bc09-cac8-443e-bbe1-11f73333646a", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064125Z:fa39bc09-cac8-443e-bbe1-11f73333646a", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "value": [] - } - } - ], - "Variables": {} -} diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_managedenvironments_create_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_managedenvironments_create_test.json deleted file mode 100644 index de0eea67d2c9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_managedenvironments_create_test.json +++ /dev/null @@ -1,1118 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12?api-version=2022-03-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "59", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "c90a24d7-c485-4521-bf4e-43a39de58b25" - }, - "RequestBody": { - "location": "East US", - "properties": { - "zoneRedundant": false - } - }, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "Cache-Control": "no-cache", - "Content-Length": "675", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:15 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-async-operation-timeout": "PT15M", - "x-ms-correlation-request-id": "f0e3a27f-5d46-43ca-b4d5-b88032db2d98", - "x-ms-ratelimit-remaining-subscription-resource-requests": "99", - "x-ms-request-id": "f0e3a27f-5d46-43ca-b4d5-b88032db2d98", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023116Z:f0e3a27f-5d46-43ca-b4d5-b88032db2d98", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12", - "name": "testcontainerenv12", - "type": "Microsoft.App/managedEnvironments", - "location": "eastus", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2022-08-24T02:31:12.8396246Z", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2022-08-24T02:31:12.8396246Z" - }, - "properties": { - "provisioningState": "Waiting", - "defaultDomain": "grayforest-f7f9a478.eastus.azurecontainerapps.io", - "staticIp": "40.88.225.63", - "appLogsConfiguration": { - "logAnalyticsConfiguration": {} - }, - "zoneRedundant": false - } - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "638893fc-56c0-40d4-8441-2edacbc3fea8" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:15 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ae1ab059-9f5a-4400-aa39-516fe5633b4a", - "x-ms-ratelimit-remaining-subscription-reads": "11999", - "x-ms-request-id": "ae1ab059-9f5a-4400-aa39-516fe5633b4a", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023116Z:ae1ab059-9f5a-4400-aa39-516fe5633b4a", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "582b5a64-23f8-4202-bcff-f06d06b81bef" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:15 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fbf8f4e7-fc9e-47b6-b1b0-af5c6447d1ee", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "fbf8f4e7-fc9e-47b6-b1b0-af5c6447d1ee", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023116Z:fbf8f4e7-fc9e-47b6-b1b0-af5c6447d1ee", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "04719fcc-980c-4d4b-81c9-d128d01ba200" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:18 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7db55ad8-9644-401e-93fc-6fac8ac433c4", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "7db55ad8-9644-401e-93fc-6fac8ac433c4", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023119Z:7db55ad8-9644-401e-93fc-6fac8ac433c4", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "655f1aeb-3ad9-493d-84fc-82f2d337e7a4" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:20 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d55708bb-ad32-4800-a31d-abffd3c297f1", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "d55708bb-ad32-4800-a31d-abffd3c297f1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023121Z:d55708bb-ad32-4800-a31d-abffd3c297f1", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "be66339f-2449-4ece-8a9e-d526953eb719" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:23 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e1076714-f867-460b-a387-60437f4679e3", - "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-request-id": "e1076714-f867-460b-a387-60437f4679e3", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023123Z:e1076714-f867-460b-a387-60437f4679e3", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "93f50181-0b88-4bb1-8887-b08fd0c61fbd" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:26 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b4225f66-e90c-4139-a5b2-8f496244780f", - "x-ms-ratelimit-remaining-subscription-reads": "11994", - "x-ms-request-id": "b4225f66-e90c-4139-a5b2-8f496244780f", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023126Z:b4225f66-e90c-4139-a5b2-8f496244780f", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "c5ba824e-e299-42ca-93e2-c63c8023ad58" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:28 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cad5af4c-9db2-4eed-a9af-8bda54447758", - "x-ms-ratelimit-remaining-subscription-reads": "11993", - "x-ms-request-id": "cad5af4c-9db2-4eed-a9af-8bda54447758", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023128Z:cad5af4c-9db2-4eed-a9af-8bda54447758", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "c21fef65-a806-45f2-ab20-19a1c6eb1ff6" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:31 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "32ae8adb-26a2-48d8-aace-9baad61e9319", - "x-ms-ratelimit-remaining-subscription-reads": "11992", - "x-ms-request-id": "32ae8adb-26a2-48d8-aace-9baad61e9319", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023131Z:32ae8adb-26a2-48d8-aace-9baad61e9319", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "f011f452-3cf6-47f9-87d9-20809bcfa0b7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:33 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d807775e-5070-49bd-9625-0f71ca95d19b", - "x-ms-ratelimit-remaining-subscription-reads": "11991", - "x-ms-request-id": "d807775e-5070-49bd-9625-0f71ca95d19b", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023133Z:d807775e-5070-49bd-9625-0f71ca95d19b", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "1dae3dc4-dc7c-44d4-b8c1-f8a08c06ccb7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:35 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "dde01891-d0db-4e19-8e88-985194c4d483", - "x-ms-ratelimit-remaining-subscription-reads": "11990", - "x-ms-request-id": "dde01891-d0db-4e19-8e88-985194c4d483", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023135Z:dde01891-d0db-4e19-8e88-985194c4d483", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "5ee92d6a-76f6-4c3e-9c30-f92efc4700d0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:38 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7c846920-5444-4e34-acd0-bfc3bcbcc5ed", - "x-ms-ratelimit-remaining-subscription-reads": "11989", - "x-ms-request-id": "7c846920-5444-4e34-acd0-bfc3bcbcc5ed", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023138Z:7c846920-5444-4e34-acd0-bfc3bcbcc5ed", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "e1aa60f3-0cbf-49f3-9b8e-75b8d0d33275" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:40 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "93b485db-244c-46a7-8252-43bc392d1b20", - "x-ms-ratelimit-remaining-subscription-reads": "11988", - "x-ms-request-id": "93b485db-244c-46a7-8252-43bc392d1b20", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023140Z:93b485db-244c-46a7-8252-43bc392d1b20", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "f8624dd4-df23-4619-a02b-6c282c63b18f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:42 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a7cf729e-7d1a-48f9-9a9d-7a4d45f3722f", - "x-ms-ratelimit-remaining-subscription-reads": "11987", - "x-ms-request-id": "a7cf729e-7d1a-48f9-9a9d-7a4d45f3722f", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023142Z:a7cf729e-7d1a-48f9-9a9d-7a4d45f3722f", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "64be832b-341a-4f4b-90a6-0af27ab954ed" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:44 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e0a9d2da-498c-4059-87a4-362c96086925", - "x-ms-ratelimit-remaining-subscription-reads": "11986", - "x-ms-request-id": "e0a9d2da-498c-4059-87a4-362c96086925", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023145Z:e0a9d2da-498c-4059-87a4-362c96086925", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "7849ad5d-0222-4b53-9a65-ccffbd360bf5" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:47 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7e374606-693d-448d-887b-e5039d81e0dc", - "x-ms-ratelimit-remaining-subscription-reads": "11985", - "x-ms-request-id": "7e374606-693d-448d-887b-e5039d81e0dc", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023147Z:7e374606-693d-448d-887b-e5039d81e0dc", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "22a1361a-f9f9-449f-be93-da3a4a5b7da3" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:49 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6fffae5b-a2fe-4ff0-b50e-54dc3824d53c", - "x-ms-ratelimit-remaining-subscription-reads": "11984", - "x-ms-request-id": "6fffae5b-a2fe-4ff0-b50e-54dc3824d53c", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023149Z:6fffae5b-a2fe-4ff0-b50e-54dc3824d53c", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "d8da32be-53ce-494a-935f-0ff31a4c51a9" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:51 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ff120f19-3baf-44ce-8e2e-ca04960822e2", - "x-ms-ratelimit-remaining-subscription-reads": "11983", - "x-ms-request-id": "ff120f19-3baf-44ce-8e2e-ca04960822e2", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023152Z:ff120f19-3baf-44ce-8e2e-ca04960822e2", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "5cbd42d2-56e9-43cb-8a0b-6fd25d89a957" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:54 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "24d76cac-41e2-41f2-a962-ff2bd017b53c", - "x-ms-ratelimit-remaining-subscription-reads": "11982", - "x-ms-request-id": "24d76cac-41e2-41f2-a962-ff2bd017b53c", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023154Z:24d76cac-41e2-41f2-a962-ff2bd017b53c", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "a4823471-5538-4a6a-a1d4-24852d72ce0f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:56 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8b771fec-81f4-4d54-b00b-81d56ab7d54a", - "x-ms-ratelimit-remaining-subscription-reads": "11981", - "x-ms-request-id": "8b771fec-81f4-4d54-b00b-81d56ab7d54a", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023157Z:8b771fec-81f4-4d54-b00b-81d56ab7d54a", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "6f924b1d-1626-43b4-8a31-8ce43bb189d9" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:31:58 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c8813891-47f9-4bbf-a97c-b0ec50bfb352", - "x-ms-ratelimit-remaining-subscription-reads": "11980", - "x-ms-request-id": "c8813891-47f9-4bbf-a97c-b0ec50bfb352", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023159Z:c8813891-47f9-4bbf-a97c-b0ec50bfb352", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "2cb9c7fa-b295-44d1-b02c-1056bc7ea056" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:32:01 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8f84a763-722e-4949-a30a-5b742286a3bf", - "x-ms-ratelimit-remaining-subscription-reads": "11979", - "x-ms-request-id": "8f84a763-722e-4949-a30a-5b742286a3bf", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023201Z:8f84a763-722e-4949-a30a-5b742286a3bf", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "e5d51225-e8b6-4c6a-8b48-90d5f488b511" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:32:03 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9c17301f-c8e0-4cfd-a56a-ec40a5b37ad1", - "x-ms-ratelimit-remaining-subscription-reads": "11978", - "x-ms-request-id": "9c17301f-c8e0-4cfd-a56a-ec40a5b37ad1", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023204Z:9c17301f-c8e0-4cfd-a56a-ec40a5b37ad1", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "InProgress", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9?api-version=2022-03-01\u0026azureAsyncOperation=true", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "a681a732-693a-4110-bdfc-5acc0e118c80" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:32:05 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "36774c7a-861a-4a82-887b-da720afcafa6", - "x-ms-ratelimit-remaining-subscription-reads": "11977", - "x-ms-request-id": "36774c7a-861a-4a82-887b-da720afcafa6", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023206Z:36774c7a-861a-4a82-887b-da720afcafa6", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/eastus/managedEnvironmentOperationStatuses/e7ae634a-69d2-491a-920a-68fc402273d9", - "name": "e7ae634a-69d2-491a-920a-68fc402273d9", - "status": "Succeeded", - "startTime": "2022-08-24T02:31:14.8472452" - } - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "48ca5029-b386-485e-88df-e2831d38b7b7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 24 Aug 2022 02:32:08 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f3f55cbe-462a-4cb9-a1a7-4fd75ffabfb4", - "x-ms-ratelimit-remaining-subscription-reads": "11976", - "x-ms-request-id": "f3f55cbe-462a-4cb9-a1a7-4fd75ffabfb4", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220824T023209Z:f3f55cbe-462a-4cb9-a1a7-4fd75ffabfb4", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12", - "name": "testcontainerenv12", - "type": "Microsoft.App/managedEnvironments", - "location": "eastus", - "systemData": { - "createdBy": "azure_client_id", - "createdByType": "Application", - "createdAt": "2022-08-24T02:31:12.8396246", - "lastModifiedBy": "azure_client_id", - "lastModifiedByType": "Application", - "lastModifiedAt": "2022-08-24T02:31:12.8396246" - }, - "properties": { - "provisioningState": "Succeeded", - "defaultDomain": "grayforest-f7f9a478.eastus.azurecontainerapps.io", - "staticIp": "40.88.225.63", - "appLogsConfiguration": { - "logAnalyticsConfiguration": {} - }, - "zoneRedundant": false - } - } - } - ], - "Variables": {} -} diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_managedenvironments_delete_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_managedenvironments_delete_test.json deleted file mode 100644 index d41920e19911..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/appcontainer_test/recording_managedenvironments_delete_test.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments/testcontainerenv12?api-version=2022-03-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "4e9f771f-265a-4351-ab64-ce7680f69ff0" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:45:27 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/managedEnvironmentOperationResults/47ce890c-d1b6-439a-9a75-c1c7071cc912?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b869a1b4-4b88-4415-9445-4ee32fb19a74", - "x-ms-ratelimit-remaining-subscription-deletes": "14999", - "x-ms-request-id": "b869a1b4-4b88-4415-9445-4ee32fb19a74", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064527Z:b869a1b4-4b88-4415-9445-4ee32fb19a74", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/managedEnvironmentOperationResults/47ce890c-d1b6-439a-9a75-c1c7071cc912?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "7ddc87c7-a75b-49ef-a47c-f1c18fb7f29e" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:45:27 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/managedEnvironmentOperationResults/47ce890c-d1b6-439a-9a75-c1c7071cc912?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f5e6c403-b190-4156-b908-24a3f1d1315b", - "x-ms-ratelimit-remaining-subscription-reads": "11999", - "x-ms-request-id": "f5e6c403-b190-4156-b908-24a3f1d1315b", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064528Z:f5e6c403-b190-4156-b908-24a3f1d1315b", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/managedEnvironmentOperationResults/47ce890c-d1b6-439a-9a75-c1c7071cc912?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "5ad37c12-5f04-47c3-b389-5bdd387198fa" - }, - "RequestBody": null, - "StatusCode": 202, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Mon, 22 Aug 2022 06:45:27 GMT", - "Expires": "-1", - "Location": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/managedEnvironmentOperationResults/47ce890c-d1b6-439a-9a75-c1c7071cc912?api-version=2022-03-01", - "Pragma": "no-cache", - "Retry-After": "5", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "84636fb5-4cf3-4295-a8bc-f1564ca6bbdc", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "84636fb5-4cf3-4295-a8bc-f1564ca6bbdc", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064528Z:84636fb5-4cf3-4295-a8bc-f1564ca6bbdc", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.App/locations/canadacentral/managedEnvironmentOperationResults/47ce890c-d1b6-439a-9a75-c1c7071cc912?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "33ed3705-8bed-4d8c-9cca-e67cff1c2561" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Date": "Mon, 22 Aug 2022 06:45:33 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "aed1a330-3efb-426a-90ef-1733cc4c11fb", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "aed1a330-3efb-426a-90ef-1733cc4c11fb", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064533Z:aed1a330-3efb-426a-90ef-1733cc4c11fb", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.App/managedEnvironments?api-version=2022-03-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-arm-appcontainers/1.1.0 core-rest-pipeline/1.9.2 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22000)", - "x-ms-client-request-id": "8ac49841-255b-43e0-a6b9-ea33d8ba7415" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2022-01-01-preview, 2022-03-01, 2022-05-01, 2022-06-01-preview", - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 22 Aug 2022 06:45:33 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Server": "Microsoft-IIS/10.0", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "Transfer-Encoding": "chunked", - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f2811c3a-bf97-462d-b260-4c2d14ba3814", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "f2811c3a-bf97-462d-b260-4c2d14ba3814", - "x-ms-routing-request-id": "SOUTHEASTASIA:20220822T064534Z:f2811c3a-bf97-462d-b260-4c2d14ba3814", - "X-Powered-By": "ASP.NET" - }, - "ResponseBody": { - "value": [] - } - } - ], - "Variables": {} -} diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md index c22c0ab5d095..f5ab17e05950 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -13,6 +13,9 @@ import { PollOperationState } from '@azure/core-lro'; // @public export type AccessMode = string; +// @public +export type Action = string; + // @public export type ActiveRevisionsMode = string; @@ -40,6 +43,9 @@ export interface AppleRegistration { clientSecretSettingName?: string; } +// @public +export type Applicability = string; + // @public export interface AppLogsConfiguration { destination?: string; @@ -82,6 +88,46 @@ export interface AvailableOperations { value?: OperationDetail[]; } +// @public +export interface AvailableWorkloadProfile extends ProxyResource { + location?: string; + properties?: AvailableWorkloadProfileProperties; +} + +// @public +export interface AvailableWorkloadProfileProperties { + applicability?: Applicability; + billingMeterCategory?: Category; + cores?: number; + displayName?: string; + memoryGiB?: number; +} + +// @public +export interface AvailableWorkloadProfiles { + list(location: string, options?: AvailableWorkloadProfilesGetOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AvailableWorkloadProfilesCollection { + readonly nextLink?: string; + value: AvailableWorkloadProfile[]; +} + +// @public +export interface AvailableWorkloadProfilesGetNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableWorkloadProfilesGetNextResponse = AvailableWorkloadProfilesCollection; + +// @public +export interface AvailableWorkloadProfilesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; + // @public export interface AzureActiveDirectory { enabled?: boolean; @@ -141,9 +187,53 @@ export interface AzureStaticWebAppsRegistration { clientId?: string; } +// @public +export interface BaseContainer { + args?: string[]; + command?: string[]; + env?: EnvironmentVar[]; + image?: string; + name?: string; + resources?: ContainerResources; + volumeMounts?: VolumeMount[]; +} + +// @public +export interface BillingMeter extends ProxyResource { + location?: string; + properties?: BillingMeterProperties; +} + +// @public +export interface BillingMeterCollection { + value: BillingMeter[]; +} + +// @public +export interface BillingMeterProperties { + category?: Category; + displayName?: string; + meterType?: string; +} + +// @public +export interface BillingMeters { + get(location: string, options?: BillingMetersGetOptionalParams): Promise; +} + +// @public +export interface BillingMetersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BillingMetersGetResponse = BillingMeterCollection; + // @public export type BindingType = string; +// @public +export type Category = string; + // @public export interface Certificate extends TrackedResource { properties?: CertificateProperties; @@ -170,6 +260,7 @@ export interface CertificateProperties { password?: string; readonly provisioningState?: CertificateProvisioningState; readonly publicKeyHash?: string; + readonly subjectAlternativeNames?: string[]; readonly subjectName?: string; readonly thumbprint?: string; readonly valid?: boolean; @@ -255,26 +346,265 @@ export interface Configuration { activeRevisionsMode?: ActiveRevisionsMode; dapr?: Dapr; ingress?: Ingress; + maxInactiveRevisions?: number; registries?: RegistryCredentials[]; secrets?: Secret[]; } // @public -export interface Container { - args?: string[]; - command?: string[]; - env?: EnvironmentVar[]; - image?: string; - name?: string; +export interface ConnectedEnvironment extends TrackedResource { + customDomainConfiguration?: CustomDomainConfiguration; + daprAIConnectionString?: string; + readonly defaultDomain?: string; + readonly deploymentErrors?: string; + extendedLocation?: ExtendedLocation; + readonly provisioningState?: ConnectedEnvironmentProvisioningState; + staticIp?: string; +} + +// @public +export interface ConnectedEnvironmentCollection { + readonly nextLink?: string; + value?: ConnectedEnvironment[]; +} + +// @public +export type ConnectedEnvironmentProvisioningState = string; + +// @public +export interface ConnectedEnvironments { + beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, connectedEnvironmentName: string, environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams): Promise; + checkNameAvailability(resourceGroupName: string, connectedEnvironmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: ConnectedEnvironmentsCheckNameAvailabilityOptionalParams): Promise; + get(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ConnectedEnvironmentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ConnectedEnvironmentsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsUpdateOptionalParams): Promise; +} + +// @public +export interface ConnectedEnvironmentsCertificates { + createOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams): Promise; + get(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesGetOptionalParams): Promise; + list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsCertificatesListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, certificateEnvelope: CertificatePatch, options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams): Promise; +} + +// @public +export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + certificateEnvelope?: Certificate; +} + +// @public +export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; + +// @public +export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConnectedEnvironmentsCertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsCertificatesGetResponse = Certificate; + +// @public +export interface ConnectedEnvironmentsCertificatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsCertificatesListNextResponse = CertificateCollection; + +// @public +export interface ConnectedEnvironmentsCertificatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsCertificatesListResponse = CertificateCollection; + +// @public +export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; + +// @public +export interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + +// @public +export interface ConnectedEnvironmentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectedEnvironmentsCreateOrUpdateResponse = ConnectedEnvironment; + +// @public +export interface ConnectedEnvironmentsDaprComponents { + createOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, daprComponentEnvelope: DaprComponent, options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams): Promise; + get(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsGetOptionalParams): Promise; + list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams): PagedAsyncIterableIterator; + listSecrets(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams): Promise; +} + +// @public +export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = DaprComponent; + +// @public +export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; + +// @public +export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsDaprComponentsListNextResponse = DaprComponentsCollection; + +// @public +export interface ConnectedEnvironmentsDaprComponentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; + +// @public +export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsDaprComponentsListSecretsResponse = DaprSecretsCollection; + +// @public +export interface ConnectedEnvironmentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ConnectedEnvironmentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsGetResponse = ConnectedEnvironment; + +// @public +export interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsListByResourceGroupNextResponse = ConnectedEnvironmentCollection; + +// @public +export interface ConnectedEnvironmentsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsListByResourceGroupResponse = ConnectedEnvironmentCollection; + +// @public +export interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsListBySubscriptionNextResponse = ConnectedEnvironmentCollection; + +// @public +export interface ConnectedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsListBySubscriptionResponse = ConnectedEnvironmentCollection; + +// @public +export interface ConnectedEnvironmentsStorages { + createOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, storageEnvelope: ConnectedEnvironmentStorage, options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesDeleteOptionalParams): Promise; + get(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesGetOptionalParams): Promise; + list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsStoragesListOptionalParams): Promise; +} + +// @public +export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = ConnectedEnvironmentStorage; + +// @public +export interface ConnectedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ConnectedEnvironmentsStoragesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsStoragesGetResponse = ConnectedEnvironmentStorage; + +// @public +export interface ConnectedEnvironmentsStoragesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsStoragesListResponse = ConnectedEnvironmentStoragesCollection; + +// @public +export interface ConnectedEnvironmentStorage extends ProxyResource { + properties?: ConnectedEnvironmentStorageProperties; +} + +// @public +export interface ConnectedEnvironmentStorageProperties { + azureFile?: AzureFileProperties; +} + +// @public +export interface ConnectedEnvironmentStoragesCollection { + value: ConnectedEnvironmentStorage[]; +} + +// @public +export interface ConnectedEnvironmentsUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedEnvironmentsUpdateResponse = ConnectedEnvironment; + +// @public +export interface Container extends BaseContainer { probes?: ContainerAppProbe[]; - resources?: ContainerResources; - volumeMounts?: VolumeMount[]; } // @public export interface ContainerApp extends TrackedResource { configuration?: Configuration; readonly customDomainVerificationId?: string; + environmentId?: string; + readonly eventStreamEndpoint?: string; + extendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; readonly latestRevisionFqdn?: string; readonly latestRevisionName?: string; @@ -282,6 +612,13 @@ export interface ContainerApp extends TrackedResource { readonly outboundIpAddresses?: string[]; readonly provisioningState?: ContainerAppProvisioningState; template?: Template; + workloadProfileType?: string; +} + +// @public +export interface ContainerAppAuthToken extends TrackedResource { + readonly expires?: Date; + readonly token?: string; } // @public @@ -336,6 +673,7 @@ export interface ContainerApps { beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, void>>; beginUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; get(resourceGroupName: string, containerAppName: string, options?: ContainerAppsGetOptionalParams): Promise; + getAuthToken(resourceGroupName: string, containerAppName: string, options?: ContainerAppsGetAuthTokenOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ContainerAppsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: ContainerAppsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; listCustomHostNameAnalysis(resourceGroupName: string, containerAppName: string, options?: ContainerAppsListCustomHostNameAnalysisOptionalParams): Promise; @@ -350,12 +688,26 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + availableWorkloadProfiles: AvailableWorkloadProfiles; + // (undocumented) + billingMeters: BillingMeters; + // (undocumented) certificates: Certificates; // (undocumented) + connectedEnvironments: ConnectedEnvironments; + // (undocumented) + connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; + // (undocumented) + connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; + // (undocumented) + connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; + // (undocumented) containerApps: ContainerApps; // (undocumented) containerAppsAuthConfigs: ContainerAppsAuthConfigs; // (undocumented) + containerAppsDiagnostics: ContainerAppsDiagnostics; + // (undocumented) containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; // (undocumented) containerAppsRevisions: ContainerAppsRevisions; @@ -364,8 +716,12 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) daprComponents: DaprComponents; // (undocumented) + managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; + // (undocumented) managedEnvironments: ManagedEnvironments; // (undocumented) + managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; + // (undocumented) managedEnvironmentsStorages: ManagedEnvironmentsStorages; // (undocumented) namespaces: Namespaces; @@ -437,12 +793,79 @@ export interface ContainerAppsDeleteOptionalParams extends coreClient.OperationO updateIntervalInMs?: number; } +// @public +export interface ContainerAppsDiagnostics { + getDetector(resourceGroupName: string, containerAppName: string, detectorName: string, options?: ContainerAppsDiagnosticsGetDetectorOptionalParams): Promise; + getRevision(resourceGroupName: string, containerAppName: string, revisionName: string, options?: ContainerAppsDiagnosticsGetRevisionOptionalParams): Promise; + getRoot(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDiagnosticsGetRootOptionalParams): Promise; + listDetectors(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDiagnosticsListDetectorsOptionalParams): PagedAsyncIterableIterator; + listRevisions(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDiagnosticsListRevisionsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; + +// @public +export interface ContainerAppsDiagnosticsGetRevisionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; + +// @public +export interface ContainerAppsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; + +// @public +export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; + +// @public +export interface ContainerAppsDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; + +// @public +export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; + +// @public +export interface ContainerAppsDiagnosticsListRevisionsOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; + // @public export interface ContainerAppSecret { readonly name?: string; readonly value?: string; } +// @public +export interface ContainerAppsGetAuthTokenOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsGetAuthTokenResponse = ContainerAppAuthToken; + // @public export interface ContainerAppsGetOptionalParams extends coreClient.OperationOptions { } @@ -635,6 +1058,17 @@ export interface CustomDomain { name: string; } +// @public +export interface CustomDomainConfiguration { + certificatePassword?: Uint8Array; + certificateValue?: Uint8Array; + readonly customDomainVerificationId?: string; + dnsSuffix?: string; + readonly expirationDate?: Date; + readonly subjectName?: string; + readonly thumbprint?: string; +} + // @public export interface CustomHostnameAnalysisResult { alternateCNameRecords?: string[]; @@ -642,7 +1076,8 @@ export interface CustomHostnameAnalysisResult { aRecords?: string[]; cNameRecords?: string[]; readonly conflictingContainerAppResourceId?: string; - readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; + readonly conflictWithEnvironmentCustomDomain?: boolean; + readonly customDomainVerificationFailureInfo?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; readonly customDomainVerificationTest?: DnsVerificationTestResult; readonly hasConflictOnManagedEnvironment?: boolean; readonly hostName?: string; @@ -650,6 +1085,21 @@ export interface CustomHostnameAnalysisResult { txtRecords?: string[]; } +// @public +export interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { + readonly code?: string; + details?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { + readonly code?: string; + readonly message?: string; + readonly target?: string; +} + // @public export interface CustomOpenIdConnectProvider { enabled?: boolean; @@ -671,7 +1121,11 @@ export interface Dapr { appId?: string; appPort?: number; appProtocol?: AppProtocol; + enableApiLogging?: boolean; enabled?: boolean; + httpMaxRequestSize?: number; + httpReadBufferSize?: number; + logLevel?: LogLevel; } // @public @@ -682,6 +1136,7 @@ export interface DaprComponent extends ProxyResource { metadata?: DaprMetadata[]; scopes?: string[]; secrets?: Secret[]; + secretStoreComponent?: string; version?: string; } @@ -778,12 +1233,107 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } +// @public +export interface DiagnosticDataProviderMetadata { + propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; + providerName?: string; +} + +// @public +export interface DiagnosticDataProviderMetadataPropertyBagItem { + name?: string; + value?: string; +} + +// @public +export interface DiagnosticDataTableResponseColumn { + columnName?: string; + columnType?: string; + dataType?: string; +} + +// @public +export interface DiagnosticDataTableResponseObject { + columns?: DiagnosticDataTableResponseColumn[]; + rows?: Record[]; + tableName?: string; +} + +// @public +export interface DiagnosticRendering { + description?: string; + isVisible?: boolean; + title?: string; + type?: number; +} + +// @public +export interface Diagnostics extends ProxyResource { + properties?: DiagnosticsProperties; +} + +// @public +export interface DiagnosticsCollection { + readonly nextLink?: string; + value: Diagnostics[]; +} + +// @public +export interface DiagnosticsDataApiResponse { + renderingProperties?: DiagnosticRendering; + table?: DiagnosticDataTableResponseObject; +} + +// @public +export interface DiagnosticsDefinition { + analysisTypes?: string[]; + readonly author?: string; + readonly category?: string; + readonly description?: string; + readonly id?: string; + readonly name?: string; + readonly score?: number; + supportTopicList?: DiagnosticSupportTopic[]; + readonly type?: string; +} + +// @public +export interface DiagnosticsProperties { + dataProviderMetadata?: DiagnosticDataProviderMetadata; + dataset?: DiagnosticsDataApiResponse[]; + metadata?: DiagnosticsDefinition; + status?: DiagnosticsStatus; +} + +// @public +export interface DiagnosticsStatus { + message?: string; + statusId?: number; +} + +// @public +export interface DiagnosticSupportTopic { + readonly id?: string; + readonly pesId?: string; +} + // @public export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; +// @public +export interface EnvironmentAuthToken extends TrackedResource { + readonly expires?: Date; + readonly token?: string; +} + // @public export type EnvironmentProvisioningState = string; +// @public +export interface EnvironmentSkuProperties { + name: SkuName; +} + // @public export interface EnvironmentVar { name?: string; @@ -791,6 +1341,35 @@ export interface EnvironmentVar { value?: string; } +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + 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 ErrorResponse { + error?: ErrorDetail; +} + +// @public +export interface ExtendedLocation { + name?: string; + type?: ExtendedLocationTypes; +} + +// @public +export type ExtendedLocationTypes = string; + // @public export interface Facebook { enabled?: boolean; @@ -881,8 +1460,10 @@ export interface IdentityProviders { export interface Ingress { allowInsecure?: boolean; customDomains?: CustomDomain[]; + exposedPort?: number; external?: boolean; readonly fqdn?: string; + ipSecurityRestrictions?: IpSecurityRestrictionRule[]; targetPort?: number; traffic?: TrafficWeight[]; transport?: IngressTransportMethod; @@ -891,6 +1472,18 @@ export interface Ingress { // @public export type IngressTransportMethod = string; +// @public +export interface InitContainer extends BaseContainer { +} + +// @public +export interface IpSecurityRestrictionRule { + action: Action; + description?: string; + ipAddressRange: string; + name: string; +} + // @public export interface JwtClaimChecks { allowedClientApplications?: string[]; @@ -903,12 +1496,24 @@ export enum KnownAccessMode { ReadWrite = "ReadWrite" } +// @public +export enum KnownAction { + Allow = "Allow", + Deny = "Deny" +} + // @public export enum KnownActiveRevisionsMode { Multiple = "Multiple", Single = "Single" } +// @public +export enum KnownApplicability { + Custom = "Custom", + LocationDefault = "LocationDefault" +} + // @public export enum KnownAppProtocol { Grpc = "grpc", @@ -921,6 +1526,13 @@ export enum KnownBindingType { SniEnabled = "SniEnabled" } +// @public +export enum KnownCategory { + PremiumSkuComputeOptimized = "PremiumSkuComputeOptimized", + PremiumSkuGeneralPurpose = "PremiumSkuGeneralPurpose", + PremiumSkuMemoryOptimized = "PremiumSkuMemoryOptimized" +} + // @public export enum KnownCertificateProvisioningState { Canceled = "Canceled", @@ -936,9 +1548,22 @@ export enum KnownCheckNameAvailabilityReason { Invalid = "Invalid" } +// @public +export enum KnownConnectedEnvironmentProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + InfrastructureSetupComplete = "InfrastructureSetupComplete", + InfrastructureSetupInProgress = "InfrastructureSetupInProgress", + InitializationInProgress = "InitializationInProgress", + ScheduledForDelete = "ScheduledForDelete", + Succeeded = "Succeeded", + Waiting = "Waiting" +} + // @public export enum KnownContainerAppProvisioningState { Canceled = "Canceled", + Deleting = "Deleting", Failed = "Failed", InProgress = "InProgress", Succeeded = "Succeeded" @@ -966,11 +1591,31 @@ export enum KnownEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownExtendedLocationTypes { + CustomLocation = "CustomLocation" +} + // @public export enum KnownIngressTransportMethod { Auto = "auto", Http = "http", - Http2 = "http2" + Http2 = "http2", + Tcp = "tcp" +} + +// @public +export enum KnownLogLevel { + Debug = "debug", + Error = "error", + Info = "info", + Warn = "warn" +} + +// @public +export enum KnownManagedEnvironmentOutBoundType { + LoadBalancer = "LoadBalancer", + UserDefinedRouting = "UserDefinedRouting" } // @public @@ -1003,6 +1648,12 @@ export enum KnownScheme { Https = "HTTPS" } +// @public +export enum KnownSkuName { + Consumption = "Consumption", + Premium = "Premium" +} + // @public export enum KnownSourceControlOperationState { Canceled = "Canceled", @@ -1049,19 +1700,55 @@ export interface LoginScopes { scopes?: string[]; } +// @public +export type LogLevel = string; + // @public export interface ManagedEnvironment extends TrackedResource { appLogsConfiguration?: AppLogsConfiguration; + customDomainConfiguration?: CustomDomainConfiguration; daprAIConnectionString?: string; daprAIInstrumentationKey?: string; readonly defaultDomain?: string; readonly deploymentErrors?: string; + readonly eventStreamEndpoint?: string; readonly provisioningState?: EnvironmentProvisioningState; + sku?: EnvironmentSkuProperties; readonly staticIp?: string; vnetConfiguration?: VnetConfiguration; + workloadProfiles?: WorkloadProfile[]; zoneRedundant?: boolean; } +// @public +export interface ManagedEnvironmentDiagnostics { + getDetector(resourceGroupName: string, environmentName: string, detectorName: string, options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams): Promise; + listDetectors(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams): Promise; +} + +// @public +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; + +// @public +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; + +// @public +export interface ManagedEnvironmentOutboundSettings { + outBoundType?: ManagedEnvironmentOutBoundType; + virtualNetworkApplianceIp?: string; +} + +// @public +export type ManagedEnvironmentOutBoundType = string; + // @public export interface ManagedEnvironments { beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; @@ -1071,6 +1758,7 @@ export interface ManagedEnvironments { beginUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, void>>; beginUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; get(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsGetOptionalParams): Promise; + getAuthToken(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsGetAuthTokenOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: ManagedEnvironmentsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: ManagedEnvironmentsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; } @@ -1096,6 +1784,25 @@ export interface ManagedEnvironmentsDeleteOptionalParams extends coreClient.Oper updateIntervalInMs?: number; } +// @public +export interface ManagedEnvironmentsDiagnostics { + getRoot(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDiagnosticsGetRootOptionalParams): Promise; +} + +// @public +export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; + +// @public +export interface ManagedEnvironmentsGetAuthTokenOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentsGetAuthTokenResponse = EnvironmentAuthToken; + // @public export interface ManagedEnvironmentsGetOptionalParams extends coreClient.OperationOptions { } @@ -1319,6 +2026,8 @@ export interface ReplicaCollection { // @public export interface ReplicaContainer { containerId?: string; + readonly execEndpoint?: string; + readonly logStreamEndpoint?: string; name?: string; ready?: boolean; restartCount?: number; @@ -1339,6 +2048,7 @@ export interface Revision extends ProxyResource { readonly createdTime?: Date; readonly fqdn?: string; readonly healthState?: RevisionHealthState; + readonly lastActiveTime?: Date; readonly provisioningError?: string; readonly provisioningState?: RevisionProvisioningState; readonly replicas?: number; @@ -1371,6 +2081,7 @@ export interface ScaleRule { custom?: CustomScaleRule; http?: HttpScaleRule; name?: string; + tcp?: TcpScaleRule; } // @public @@ -1393,6 +2104,9 @@ export interface SecretsCollection { value: ContainerAppSecret[]; } +// @public +export type SkuName = string; + // @public export interface SourceControl extends ProxyResource { branch?: string; @@ -1423,9 +2137,18 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export interface TcpScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: { + [propertyName: string]: string; + }; +} + // @public export interface Template { containers?: Container[]; + initContainers?: InitContainer[]; revisionSuffix?: string; scale?: Scale; volumes?: Volume[]; @@ -1476,6 +2199,7 @@ export interface VnetConfiguration { dockerBridgeCidr?: string; infrastructureSubnetId?: string; internal?: boolean; + outboundSettings?: ManagedEnvironmentOutboundSettings; platformReservedCidr?: string; platformReservedDnsIP?: string; runtimeSubnetId?: string; @@ -1494,6 +2218,13 @@ export interface VolumeMount { volumeName?: string; } +// @public +export interface WorkloadProfile { + maximumCount: number; + minimumCount: number; + workloadProfileType: string; +} + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 6986bdb4013d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob") - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts deleted file mode 100644 index 26138b00ab38..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts deleted file mode 100644 index 6a6cf8cd5d67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts deleted file mode 100644 index c1df14a0467a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts deleted file mode 100644 index 8ee68aee5eac..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index eed4db83c8bb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index b8a418fb8848..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 5dadb882a757..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 8f01b3631bc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 7865bd9656af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,97 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - } - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts deleted file mode 100644 index 4babaab2596f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts deleted file mode 100644 index c12b9b8ea3af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index 5b4f07a34b8e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 083de99fa8f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 0eaf4a1b2ca4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index 5099327d3e1a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 6581e7ce8f54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 2ad7914f417e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index f479ab618d9c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index 7e4de8a401df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 8602f6543c76..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 98dc8a984250..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index ca5b9c238052..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 7ad01837feda..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SourceControl, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - contextPath: "./", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index d87e139105be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index 2ad344455f98..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index 4bde4d923044..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 9a82da9e801f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,96 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - } - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 497bb397cad4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DaprComponent, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts deleted file mode 100644 index e95941713bc2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts deleted file mode 100644 index 5f011d873aa5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts deleted file mode 100644 index 505eb2ace62b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts deleted file mode 100644 index 534895b9acca..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 6aea6e454ea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index b7359c4b8228..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts deleted file mode 100644 index 025177e41a75..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 7fbbf3dde8b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index 5f2338939282..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 9134c71e5932..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index aacb37ea0832..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 204faff5dc5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 6f4742373ae6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index 9213af785b0d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index bd9a06d62f5f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -certificatesCheckNameAvailability().catch(console.error); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -containerAppsCheckNameAvailability().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts deleted file mode 100644 index 550f15fed140..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/README.md deleted file mode 100644 index bca109cfa8ca..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [certificatesCreateOrUpdateSample.js][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.js][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json | -| [certificatesGetSample.js][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json | -| [certificatesListSample.js][certificateslistsample] | Get the Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json | -| [certificatesUpdateSample.js][certificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.js][containerappsauthconfigscreateorupdatesample] | Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.js][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.js][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json | -| [containerAppsAuthConfigsListByContainerAppSample.js][containerappsauthconfigslistbycontainerappsample] | Get the Container App AuthConfigs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.js][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.js][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json | -| [containerAppsGetSample.js][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json | -| [containerAppsListByResourceGroupSample.js][containerappslistbyresourcegroupsample] | Get the Container Apps in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json | -| [containerAppsListBySubscriptionSample.js][containerappslistbysubscriptionsample] | Get the Container Apps in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json | -| [containerAppsListCustomHostNameAnalysisSample.js][containerappslistcustomhostnameanalysissample] | Analyzes a custom hostname for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.js][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.js][containerappsrevisionreplicasgetreplicasample] | Get a replica for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.js][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.js][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.js][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.js][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json | -| [containerAppsRevisionsListRevisionsSample.js][containerappsrevisionslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.js][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.js][containerappssourcecontrolscreateorupdatesample] | Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.js][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.js][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json | -| [containerAppsSourceControlsListByContainerAppSample.js][containerappssourcecontrolslistbycontainerappsample] | Get the Container App SourceControls in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.js][containerappsupdatesample] | Patches a Container App using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json | -| [daprComponentsCreateOrUpdateSample.js][daprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json | -| [daprComponentsDeleteSample.js][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.js][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json | -| [daprComponentsListSample.js][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.js][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json | -| [managedEnvironmentsCreateOrUpdateSample.js][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.js][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsGetSample.js][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.js][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.js][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.js][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.js][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.js][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.js][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.js][managedenvironmentsupdatesample] | Patches a Managed Environment using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.js][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node certificatesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node certificatesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesDeleteSample.js -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesGetSample.js -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesListSample.js -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesUpdateSample.js -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsDeleteSample.js -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsGetSample.js -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsListByContainerAppSample.js -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsCreateOrUpdateSample.js -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsDeleteSample.js -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsGetSample.js -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListByResourceGroupSample.js -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListBySubscriptionSample.js -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListCustomHostNameAnalysisSample.js -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListSecretsSample.js -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasGetReplicaSample.js -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasListReplicasSample.js -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsActivateRevisionSample.js -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsDeactivateRevisionSample.js -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsGetRevisionSample.js -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsListRevisionsSample.js -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsRestartRevisionSample.js -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsCreateOrUpdateSample.js -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsDeleteSample.js -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsGetSample.js -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsListByContainerAppSample.js -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsUpdateSample.js -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsCreateOrUpdateSample.js -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsDeleteSample.js -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsGetSample.js -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSample.js -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSecretsSample.js -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsCreateOrUpdateSample.js -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsDeleteSample.js -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsGetSample.js -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListByResourceGroupSample.js -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListBySubscriptionSample.js -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesDeleteSample.js -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesGetSample.js -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesListSample.js -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsUpdateSample.js -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/namespacesCheckNameAvailabilitySample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/operationsListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/README.md diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js deleted file mode 100644 index 358c3afc4982..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob"), - }, - }; - const options = { - certificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesDeleteSample.js deleted file mode 100644 index 26960a6b3e11..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesDeleteSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesGetSample.js deleted file mode 100644 index caa878f9cd5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesGetSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get(resourceGroupName, environmentName, certificateName); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesListSample.js deleted file mode 100644 index 6883691a24fe..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesListSample.js +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesUpdateSample.js deleted file mode 100644 index abf04a76fb9b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesUpdateSample.js +++ /dev/null @@ -1,39 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js deleted file mode 100644 index ff8190820dff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" }, - }, - }, - platform: { enabled: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsDeleteSample.js deleted file mode 100644 index e57f0ff84ef9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsDeleteSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsGetSample.js deleted file mode 100644 index 2cc703300983..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsGetSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsListByContainerAppSample.js deleted file mode 100644 index ec0e495db116..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsAuthConfigsListByContainerAppSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsCreateOrUpdateSample.js deleted file mode 100644 index 5cc9594c8da7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,97 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com", - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com", - }, - ], - external: true, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100, - }, - ], - }, - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsDeleteSample.js deleted file mode 100644 index 531fe32a5131..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsDeleteSample.js +++ /dev/null @@ -1,30 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait(resourceGroupName, containerAppName); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsGetSample.js deleted file mode 100644 index 7a30bce65b8a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsGetSample.js +++ /dev/null @@ -1,30 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, containerAppName); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListByResourceGroupSample.js deleted file mode 100644 index 81db87e5d829..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListBySubscriptionSample.js deleted file mode 100644 index 763a89dca89e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListCustomHostNameAnalysisSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListCustomHostNameAnalysisSample.js deleted file mode 100644 index 3e8456c7bb91..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListCustomHostNameAnalysisSample.js +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListSecretsSample.js deleted file mode 100644 index 9e005cdd9749..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsListSecretsSample.js +++ /dev/null @@ -1,30 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets(resourceGroupName, containerAppName); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasGetReplicaSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasGetReplicaSample.js deleted file mode 100644 index 127c0b693a4f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasGetReplicaSample.js +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasListReplicasSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasListReplicasSample.js deleted file mode 100644 index cb073b31ca5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionReplicasListReplicasSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsActivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsActivateRevisionSample.js deleted file mode 100644 index b29d5ce8ebc1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsActivateRevisionSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsDeactivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsDeactivateRevisionSample.js deleted file mode 100644 index 7b70019c1e14..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsDeactivateRevisionSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsGetRevisionSample.js deleted file mode 100644 index 45591bc0c272..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsGetRevisionSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsListRevisionsSample.js deleted file mode 100644 index 03ddcf44d3ee..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsListRevisionsSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsRestartRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsRestartRevisionSample.js deleted file mode 100644 index da0e7b6afe44..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsRevisionsRestartRevisionSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsCreateOrUpdateSample.js deleted file mode 100644 index af48f7d1c47a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsCreateOrUpdateSample.js +++ /dev/null @@ -1,54 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "", - }, - contextPath: "./", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg", - }, - }, - repoUrl: "https://github.com/xwang971/ghatest", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsDeleteSample.js deleted file mode 100644 index c78f7b0ba888..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsDeleteSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsGetSample.js deleted file mode 100644 index 4c2ed4788bba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsGetSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsListByContainerAppSample.js deleted file mode 100644 index cad8f83554a7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsSourceControlsListByContainerAppSample.js +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsUpdateSample.js deleted file mode 100644 index 5a3486e82481..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,96 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com", - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com", - }, - ], - external: true, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100, - }, - ], - }, - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 420e94238a9a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsDeleteSample.js deleted file mode 100644 index 9df37d2677ae..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsDeleteSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsGetSample.js deleted file mode 100644 index c8e64db30d9e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsGetSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, componentName); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSample.js deleted file mode 100644 index ca0d8eb409bb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSample.js +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSecretsSample.js deleted file mode 100644 index 2ae85dd027ef..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/daprComponentsListSecretsSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index f894cf729dec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,43 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsDeleteSample.js deleted file mode 100644 index 92d4a01e6217..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsGetSample.js deleted file mode 100644 index 7f0ba021c03f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsGetSample.js +++ /dev/null @@ -1,30 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, environmentName); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index 04206e51ab7a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,32 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index b9fa96ff0b13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index de1e74eddc42..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 1392683b6d47..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesDeleteSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesGetSample.js deleted file mode 100644 index de795b73b6c3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesGetSample.js +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesListSample.js deleted file mode 100644 index 9b1f16390370..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,30 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list(resourceGroupName, environmentName); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsUpdateSample.js deleted file mode 100644 index 29ba19235066..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/managedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,38 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/namespacesCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/namespacesCheckNameAvailabilitySample.js deleted file mode 100644 index 4d1dea327781..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/namespacesCheckNameAvailabilitySample.js +++ /dev/null @@ -1,64 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -certificatesCheckNameAvailability().catch(console.error); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -containerAppsCheckNameAvailability().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/operationsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/operationsListSample.js deleted file mode 100644 index 125edc9131a3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/operationsListSample.js +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/package.json deleted file mode 100644 index a0423da95963..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=12.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcontainers/arm-appcontainers" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "dependencies": { - "@azure/arm-appcontainers": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/README.md deleted file mode 100644 index b4c51491c127..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/README.md +++ /dev/null @@ -1,151 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [certificatesCreateOrUpdateSample.ts][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.ts][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json | -| [certificatesGetSample.ts][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json | -| [certificatesListSample.ts][certificateslistsample] | Get the Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json | -| [certificatesUpdateSample.ts][certificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.ts][containerappsauthconfigscreateorupdatesample] | Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.ts][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.ts][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json | -| [containerAppsAuthConfigsListByContainerAppSample.ts][containerappsauthconfigslistbycontainerappsample] | Get the Container App AuthConfigs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.ts][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.ts][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json | -| [containerAppsGetSample.ts][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json | -| [containerAppsListByResourceGroupSample.ts][containerappslistbyresourcegroupsample] | Get the Container Apps in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json | -| [containerAppsListBySubscriptionSample.ts][containerappslistbysubscriptionsample] | Get the Container Apps in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json | -| [containerAppsListCustomHostNameAnalysisSample.ts][containerappslistcustomhostnameanalysissample] | Analyzes a custom hostname for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.ts][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.ts][containerappsrevisionreplicasgetreplicasample] | Get a replica for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.ts][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.ts][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.ts][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.ts][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json | -| [containerAppsRevisionsListRevisionsSample.ts][containerappsrevisionslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.ts][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json | -| [containerAppsSourceControlsCreateOrUpdateSample.ts][containerappssourcecontrolscreateorupdatesample] | Create or update the SourceControl for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.ts][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.ts][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json | -| [containerAppsSourceControlsListByContainerAppSample.ts][containerappssourcecontrolslistbycontainerappsample] | Get the Container App SourceControls in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json | -| [containerAppsUpdateSample.ts][containerappsupdatesample] | Patches a Container App using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json | -| [daprComponentsCreateOrUpdateSample.ts][daprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json | -| [daprComponentsDeleteSample.ts][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.ts][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json | -| [daprComponentsListSample.ts][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.ts][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json | -| [managedEnvironmentsCreateOrUpdateSample.ts][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json | -| [managedEnvironmentsDeleteSample.ts][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsGetSample.ts][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.ts][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.ts][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.ts][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.ts][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.ts][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.ts][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.ts][managedenvironmentsupdatesample] | Patches a Managed Environment using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.ts][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/certificatesCreateOrUpdateSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env node dist/certificatesCreateOrUpdateSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesDeleteSample.ts -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesGetSample.ts -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesListSample.ts -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesUpdateSample.ts -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsDeleteSample.ts -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsGetSample.ts -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsCreateOrUpdateSample.ts -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsDeleteSample.ts -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsGetSample.ts -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListByResourceGroupSample.ts -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListBySubscriptionSample.ts -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListSecretsSample.ts -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsActivateRevisionSample.ts -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsGetRevisionSample.ts -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsListRevisionsSample.ts -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsRestartRevisionSample.ts -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsDeleteSample.ts -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsGetSample.ts -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsUpdateSample.ts -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsCreateOrUpdateSample.ts -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsDeleteSample.ts -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsGetSample.ts -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSample.ts -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSecretsSample.ts -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsDeleteSample.ts -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsGetSample.ts -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListByResourceGroupSample.ts -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListBySubscriptionSample.ts -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesDeleteSample.ts -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesGetSample.ts -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesListSample.ts -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsUpdateSample.ts -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/namespacesCheckNameAvailabilitySample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/operationsListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json deleted file mode 100644 index 1748a252b821..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=12.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcontainers/arm-appcontainers" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "dependencies": { - "@azure/arm-appcontainers": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^12.0.0", - "typescript": "~4.6.0", - "rimraf": "latest" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 6986bdb4013d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,50 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or Update a Certificate. - * - * @summary Create or Update a Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("PFX-or-PEM-blob") - } - }; - const options: CertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.createOrUpdate( - resourceGroupName, - environmentName, - certificateName, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesDeleteSample.ts deleted file mode 100644 index 26138b00ab38..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deletes the specified Certificate. - * - * @summary Deletes the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesGetSample.ts deleted file mode 100644 index 6a6cf8cd5d67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesListSample.ts deleted file mode 100644 index c1df14a0467a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesListSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Certificates in a given managed environment. - * - * @summary Get the Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesUpdateSample.ts deleted file mode 100644 index 8ee68aee5eac..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesUpdateSample.ts +++ /dev/null @@ -1,42 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CertificatePatch, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported - * - * @summary Patches a certificate. Currently only patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index eed4db83c8bb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,45 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { AuthConfig, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update the AuthConfig for a Container App. - * - * @summary Create or update the AuthConfig for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope: AuthConfig = { - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" } - } - }, - platform: { enabled: true } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index b8a418fb8848..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Container App AuthConfig. - * - * @summary Delete a Container App AuthConfig. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -deleteContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 5dadb882a757..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a AuthConfig of a Container App. - * - * @summary Get a AuthConfig of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json - */ -async function getContainerAppAuthConfig() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName - ); - console.log(result); -} - -getContainerAppAuthConfig().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 8f01b3631bc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App AuthConfigs in a given resource group. - * - * @summary Get the Container App AuthConfigs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAuthConfigsByContainerApps().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 7865bd9656af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,97 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - } - }, - location: "East US", - managedEnvironmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsDeleteSample.ts deleted file mode 100644 index 4babaab2596f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsDeleteSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Container App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testWorkerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -deleteContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsGetSample.ts deleted file mode 100644 index c12b9b8ea3af..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsGetSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Container App. - * - * @summary Get the properties of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index 5b4f07a34b8e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given resource group. - * - * @summary Get the Container Apps in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json - */ -async function listContainerAppsByResourceGroup() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 083de99fa8f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container Apps in a given subscription. - * - * @summary Get the Container Apps in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json - */ -async function listContainerAppsBySubscription() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 0eaf4a1b2ca4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Analyzes a custom hostname for a Container App - * - * @summary Analyzes a custom hostname for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options - ); - console.log(result); -} - -analyzeCustomHostname().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListSecretsSample.ts deleted file mode 100644 index 5099327d3e1a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a container app - * - * @summary List secrets for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 6581e7ce8f54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,37 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a replica for a Container App Revision. - * - * @summary Get a replica for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName - ); - console.log(result); -} - -getContainerAppRevisionReplica().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 2ad7914f417e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List replicas for a Container App Revision. - * - * @summary List replicas for a Container App Revision. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json - */ -async function listContainerAppReplicas() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -listContainerAppReplicas().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index f479ab618d9c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Activates a revision for a Container App - * - * @summary Activates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json - */ -async function activateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -activateContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index 7e4de8a401df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Deactivates a revision for a Container App - * - * @summary Deactivates a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json - */ -async function deactivateContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -deactivateContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 8602f6543c76..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a revision of a Container App. - * - * @summary Get a revision of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json - */ -async function getContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 98dc8a984250..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Revisions for a given Container App. - * - * @summary Get the Revisions for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json - */ -async function listContainerAppRevisions() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index ca5b9c238052..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Restarts a revision for a Container App - * - * @summary Restarts a revision for a Container App - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json - */ -async function restartContainerAppRevision() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -restartContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 7ad01837feda..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,57 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - SourceControl, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update the SourceControl for a Container App. - * - * @summary Create or update the SourceControl for a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - tenantId: "" - }, - contextPath: "./", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - repoUrl: "https://github.com/xwang971/ghatest" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope - ); - console.log(result); -} - -createOrUpdateContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index d87e139105be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Container App SourceControl. - * - * @summary Delete a Container App SourceControl. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -deleteContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index 2ad344455f98..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a SourceControl of a Container App. - * - * @summary Get a SourceControl of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json - */ -async function getContainerAppSourceControl() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName - ); - console.log(result); -} - -getContainerAppSourceControl().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index 4bde4d923044..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Container App SourceControls in a given resource group. - * - * @summary Get the Container App SourceControls in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json - */ -async function listAppSourceControls() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listAppSourceControls().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsUpdateSample.ts deleted file mode 100644 index 9a82da9e801f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,96 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Container App using JSON Merge Patch - * - * @summary Patches a Container App using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { appPort: 3000, appProtocol: "http", enabled: true }, - ingress: { - customDomains: [ - { - name: "www.my-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com" - }, - { - name: "www.my-other-name.com", - bindingType: "SniEnabled", - certificateId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com" - } - ], - external: true, - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - } - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - template: { - containers: [ - { - name: "testcontainerApp0", - image: "repo/testcontainerApp0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080 - }, - initialDelaySeconds: 3, - periodSeconds: 3 - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -patchContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 497bb397cad4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,53 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - DaprComponent, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment. - * - * @summary Creates or updates a Dapr Component in a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" } - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsDeleteSample.ts deleted file mode 100644 index e95941713bc2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsGetSample.ts deleted file mode 100644 index 5f011d873aa5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSample.ts deleted file mode 100644 index 505eb2ace62b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSample.ts +++ /dev/null @@ -1,36 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSecretsSample.ts deleted file mode 100644 index 534895b9acca..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to List secrets for a dapr component - * - * @summary List secrets for a dapr component - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 6aea6e454ea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,46 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" } - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - zoneRedundant: true - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -createEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index b7359c4b8228..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName - ); - console.log(result); -} - -deleteEnvironmentByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsGetSample.ts deleted file mode 100644 index 025177e41a75..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 7fbbf3dde8b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,34 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index 5f2338939282..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 9134c71e5932..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,49 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index aacb37ea0832..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 204faff5dc5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,35 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 6f4742373ae6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,33 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index 9213af785b0d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,41 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - ManagedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index bd9a06d62f5f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,67 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -certificatesCheckNameAvailability().catch(console.error); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -containerAppsCheckNameAvailability().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/operationsListSample.ts deleted file mode 100644 index 550f15fed140..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,31 +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. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json - */ -async function listAllOperations() { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -listAllOperations().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/tsconfig.json b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index 25c334f2e928..2db5f018972b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -20,12 +20,21 @@ import { ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, DaprComponentsImpl, + ContainerAppsDiagnosticsImpl, + ManagedEnvironmentDiagnosticsImpl, + ManagedEnvironmentsDiagnosticsImpl, OperationsImpl, ManagedEnvironmentsImpl, CertificatesImpl, NamespacesImpl, ManagedEnvironmentsStoragesImpl, - ContainerAppsSourceControlsImpl + ContainerAppsSourceControlsImpl, + ConnectedEnvironmentsImpl, + ConnectedEnvironmentsCertificatesImpl, + ConnectedEnvironmentsDaprComponentsImpl, + ConnectedEnvironmentsStoragesImpl, + AvailableWorkloadProfilesImpl, + BillingMetersImpl } from "./operations"; import { ContainerAppsAuthConfigs, @@ -33,12 +42,21 @@ import { ContainerAppsRevisions, ContainerAppsRevisionReplicas, DaprComponents, + ContainerAppsDiagnostics, + ManagedEnvironmentDiagnostics, + ManagedEnvironmentsDiagnostics, Operations, ManagedEnvironments, Certificates, Namespaces, ManagedEnvironmentsStorages, - ContainerAppsSourceControls + ContainerAppsSourceControls, + ConnectedEnvironments, + ConnectedEnvironmentsCertificates, + ConnectedEnvironmentsDaprComponents, + ConnectedEnvironmentsStorages, + AvailableWorkloadProfiles, + BillingMeters } from "./operationsInterfaces"; import { ContainerAppsAPIClientOptionalParams } from "./models"; @@ -74,7 +92,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-appcontainers/1.1.1`; + const packageDetails = `azsdk-js-arm-appcontainers/2.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -94,41 +112,34 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-03-01"; + this.apiVersion = options.apiVersion || "2022-06-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); this.containerApps = new ContainerAppsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); @@ -136,6 +147,13 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.daprComponents = new DaprComponentsImpl(this); + this.containerAppsDiagnostics = new ContainerAppsDiagnosticsImpl(this); + this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsImpl( + this + ); + this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsImpl( + this + ); this.operations = new OperationsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); @@ -146,6 +164,18 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( this ); + this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl( + this + ); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsImpl( + this + ); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesImpl( + this + ); + this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); + this.billingMeters = new BillingMetersImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -182,10 +212,19 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; daprComponents: DaprComponents; + containerAppsDiagnostics: ContainerAppsDiagnostics; + managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; + managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; operations: Operations; managedEnvironments: ManagedEnvironments; certificates: Certificates; namespaces: Namespaces; managedEnvironmentsStorages: ManagedEnvironmentsStorages; containerAppsSourceControls: ContainerAppsSourceControls; + connectedEnvironments: ConnectedEnvironments; + connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; + connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; + connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; + availableWorkloadProfiles: AvailableWorkloadProfiles; + billingMeters: BillingMeters; } diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 27985e70410b..f5c4a7383b35 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -505,6 +505,14 @@ export interface ContainerAppCollection { readonly nextLink?: string; } +/** The complex type of the extended location. */ +export interface ExtendedLocation { + /** The name of the extended location. */ + name?: string; + /** The type of the extended location. */ + type?: ExtendedLocationTypes; +} + /** Managed service identity (system assigned and/or user assigned identities) */ export interface ManagedServiceIdentity { /** @@ -552,6 +560,8 @@ export interface Configuration { registries?: RegistryCredentials[]; /** Dapr configuration for the Container App. */ dapr?: Dapr; + /** Optional. Max inactive revisions a Container App can have. */ + maxInactiveRevisions?: number; } /** Secret definition. */ @@ -573,6 +583,8 @@ export interface Ingress { external?: boolean; /** Target Port in containers for traffic from ingress */ targetPort?: number; + /** Exposed Port in containers for TCP traffic from ingress */ + exposedPort?: number; /** Ingress transport protocol */ transport?: IngressTransportMethod; /** Traffic weights for app's revisions */ @@ -581,6 +593,8 @@ export interface Ingress { customDomains?: CustomDomain[]; /** Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections */ allowInsecure?: boolean; + /** Rules to restrict incoming IP address. */ + ipSecurityRestrictions?: IpSecurityRestrictionRule[]; } /** Traffic weight assigned to a revision */ @@ -605,6 +619,18 @@ export interface CustomDomain { certificateId: string; } +/** Rule to restrict incoming IP address. */ +export interface IpSecurityRestrictionRule { + /** Name for the IP restriction rule. */ + name: string; + /** Describe the IP restriction rule that is being sent to the container-app. This is an optional field. */ + description?: string; + /** CIDR notation to match incoming IP address */ + ipAddressRange: string; + /** Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny */ + action: Action; +} + /** Container App Private Registry */ export interface RegistryCredentials { /** Container Registry Server */ @@ -627,6 +653,14 @@ export interface Dapr { appProtocol?: AppProtocol; /** Tells Dapr which port your application is listening on */ appPort?: number; + /** Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. */ + httpReadBufferSize?: number; + /** Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. Default is 4 MB. */ + httpMaxRequestSize?: number; + /** Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. */ + logLevel?: LogLevel; + /** Enables API logging for the Dapr sidecar */ + enableApiLogging?: boolean; } /** @@ -637,6 +671,8 @@ export interface Dapr { export interface Template { /** User friendly suffix that is appended to the revision name */ revisionSuffix?: string; + /** List of specialized containers that run before app containers. */ + initContainers?: InitContainer[]; /** List of container definitions for the Container App. */ containers?: Container[]; /** Scaling properties for the Container App. */ @@ -645,8 +681,8 @@ export interface Template { volumes?: Volume[]; } -/** Container App container definition. */ -export interface Container { +/** Container App base container definition. */ +export interface BaseContainer { /** Container image tag. */ image?: string; /** Custom container name. */ @@ -659,8 +695,6 @@ export interface Container { env?: EnvironmentVar[]; /** Container resource requirements. */ resources?: ContainerResources; - /** List of probes for the container. */ - probes?: ContainerAppProbe[]; /** Container volume mounts. */ volumeMounts?: VolumeMount[]; } @@ -688,6 +722,14 @@ export interface ContainerResources { readonly ephemeralStorage?: string; } +/** Volume mount for the Container App. */ +export interface VolumeMount { + /** This must match the Name of a Volume. */ + volumeName?: string; + /** Path within the container at which the volume should be mounted.Must not contain ':'. */ + mountPath?: string; +} + /** Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ export interface ContainerAppProbe { /** Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. */ @@ -740,14 +782,6 @@ export interface ContainerAppProbeTcpSocket { port: number; } -/** Volume mount for the Container App. */ -export interface VolumeMount { - /** This must match the Name of a Volume. */ - volumeName?: string; - /** Path within the container at which the volume should be mounted.Must not contain ':'. */ - mountPath?: string; -} - /** Container App scaling configurations. */ export interface Scale { /** Optional. Minimum number of container replicas. */ @@ -768,6 +802,8 @@ export interface ScaleRule { custom?: CustomScaleRule; /** HTTP requests based scaling. */ http?: HttpScaleRule; + /** Tcp requests based scaling. */ + tcp?: TcpScaleRule; } /** Container App container Azure Queue based scaling rule. */ @@ -801,7 +837,7 @@ export interface CustomScaleRule { auth?: ScaleRuleAuth[]; } -/** Container App container Custom scaling rule. */ +/** Container App container Http scaling rule. */ export interface HttpScaleRule { /** Metadata properties to describe http scale rule. */ metadata?: { [propertyName: string]: string }; @@ -809,6 +845,14 @@ export interface HttpScaleRule { auth?: ScaleRuleAuth[]; } +/** Container App container Tcp scaling rule. */ +export interface TcpScaleRule { + /** Metadata properties to describe tcp scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the tcp scale rule. */ + auth?: ScaleRuleAuth[]; +} + /** Volume definitions for the Container App. */ export interface Volume { /** Volume name. */ @@ -840,12 +884,17 @@ export interface CustomHostnameAnalysisResult { * Raw failure information if DNS verification fails. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; + readonly customDomainVerificationFailureInfo?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; /** * true if there is a conflict on the Container App's managed environment; otherwise, false. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly hasConflictOnManagedEnvironment?: boolean; + /** + * true if there is a conflict on the Container App's managed environment level custom domain; otherwise, false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly conflictWithEnvironmentCustomDomain?: boolean; /** * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -863,6 +912,46 @@ export interface CustomHostnameAnalysisResult { alternateTxtRecords?: string[]; } +/** Raw failure information if DNS verification fails. */ +export interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { + /** + * Standardized string to programmatically identify the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** Details or the error */ + details?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem[]; +} + +/** Detailed errors. */ +export interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { + /** + * Standardized string to programmatically identify the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; +} + /** Container App Secrets Collection ARM resource. */ export interface SecretsCollection { /** Collection of resources. */ @@ -906,6 +995,16 @@ export interface ReplicaContainer { started?: boolean; /** The container restart count */ restartCount?: number; + /** + * Log Stream endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly logStreamEndpoint?: string; + /** + * Container exec endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly execEndpoint?: string; } /** Container App Revision Replicas collection ARM resource. */ @@ -941,6 +1040,238 @@ export interface DaprSecretsCollection { value: Secret[]; } +/** Diagnostics data collection for a resource. */ +export interface DiagnosticsCollection { + /** Collection of diagnostic data. */ + value: Diagnostics[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Diagnostics resource specific properties */ +export interface DiagnosticsProperties { + /** Metadata of the diagnostics response. */ + metadata?: DiagnosticsDefinition; + /** Set of data collections associated with the response. */ + dataset?: DiagnosticsDataApiResponse[]; + /** Status of the diagnostics response. */ + status?: DiagnosticsStatus; + /** List of data providers' metadata. */ + dataProviderMetadata?: DiagnosticDataProviderMetadata; +} + +/** Metadata of the diagnostics response */ +export interface DiagnosticsDefinition { + /** + * Unique detector name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Display Name of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Details of the diagnostics info + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Authors' names of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly author?: string; + /** + * Category of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly category?: string; + /** List of support topics */ + supportTopicList?: DiagnosticSupportTopic[]; + /** List of analysis types */ + analysisTypes?: string[]; + /** + * Authors' names of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Authors' names of the detector + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly score?: number; +} + +/** Support topic information */ +export interface DiagnosticSupportTopic { + /** + * Unique topic identifier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * PES identifier + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly pesId?: string; +} + +/** Diagnostics data returned from a detector */ +export interface DiagnosticsDataApiResponse { + /** Table response */ + table?: DiagnosticDataTableResponseObject; + /** Details of the table response */ + renderingProperties?: DiagnosticRendering; +} + +/** Diagnostics data table */ +export interface DiagnosticDataTableResponseObject { + /** Table name */ + tableName?: string; + /** Columns in the table */ + columns?: DiagnosticDataTableResponseColumn[]; + /** Rows in the table */ + rows?: Record[]; +} + +/** Diagnostics data column */ +export interface DiagnosticDataTableResponseColumn { + /** Column name */ + columnName?: string; + /** Data type of the column */ + dataType?: string; + /** Column type */ + columnType?: string; +} + +/** Rendering details of a diagnostics table */ +export interface DiagnosticRendering { + /** Rendering type */ + type?: number; + /** Title of the table */ + title?: string; + /** Description of the table */ + description?: string; + /** Flag if the table should be rendered */ + isVisible?: boolean; +} + +/** Rendering details of a diagnostics table */ +export interface DiagnosticsStatus { + /** Diagnostic message */ + message?: string; + /** Status */ + statusId?: number; +} + +/** Details of a diagnostics data provider */ +export interface DiagnosticDataProviderMetadata { + /** Name of data provider */ + providerName?: string; + /** Collection of properties */ + propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; +} + +/** Property details */ +export interface DiagnosticDataProviderMetadataPropertyBagItem { + /** Property name */ + name?: string; + /** Property value */ + value?: string; +} + +/** Managed Environment resource SKU properties. */ +export interface EnvironmentSkuProperties { + /** Name of the Sku. */ + name: SkuName; +} + +/** Configuration properties for apps environment to join a Virtual Network */ +export interface VnetConfiguration { + /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property */ + internal?: boolean; + /** Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ + infrastructureSubnetId?: string; + /** Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ + runtimeSubnetId?: string; + /** CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ + dockerBridgeCidr?: string; + /** IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ + platformReservedCidr?: string; + /** An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ + platformReservedDnsIP?: string; + /** Configuration used to control the Environment Egress outbound traffic */ + outboundSettings?: ManagedEnvironmentOutboundSettings; +} + +/** Configuration used to control the Environment Egress outbound traffic */ +export interface ManagedEnvironmentOutboundSettings { + /** Outbound type for the cluster */ + outBoundType?: ManagedEnvironmentOutBoundType; + /** Virtual Appliance IP used as the Egress controller for the Environment */ + virtualNetworkApplianceIp?: string; +} + +/** Configuration of application logs */ +export interface AppLogsConfiguration { + /** Logs destination */ + destination?: string; + /** Log Analytics configuration */ + logAnalyticsConfiguration?: LogAnalyticsConfiguration; +} + +/** Log analytics configuration */ +export interface LogAnalyticsConfiguration { + /** Log analytics customer id */ + customerId?: string; + /** Log analytics customer key */ + sharedKey?: string; +} + +/** Configuration properties for apps environment custom domain */ +export interface CustomDomainConfiguration { + /** + * Id used to verify domain name ownership + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationId?: string; + /** Dns suffix for the environment domain */ + dnsSuffix?: string; + /** PFX or PEM blob */ + certificateValue?: Uint8Array; + /** Certificate password */ + certificatePassword?: Uint8Array; + /** + * Certificate expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expirationDate?: Date; + /** + * Certificate thumbprint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; + /** + * Subject name of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectName?: string; +} + +/** Workload profile to scope container app execution. */ +export interface WorkloadProfile { + /** Workload profile type for the workloads to run on. */ + workloadProfileType: string; + /** The minimum capacity. */ + minimumCount: number; + /** The maximum capacity. */ + maximumCount: number; +} + /** Available operations of the service */ export interface AvailableOperations { /** Collection of available operation details */ @@ -987,38 +1318,6 @@ export interface ManagedEnvironmentsCollection { readonly nextLink?: string; } -/** Configuration properties for apps environment to join a Virtual Network */ -export interface VnetConfiguration { - /** Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property */ - internal?: boolean; - /** Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ - infrastructureSubnetId?: string; - /** Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ - runtimeSubnetId?: string; - /** CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ - dockerBridgeCidr?: string; - /** IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ - platformReservedCidr?: string; - /** An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ - platformReservedDnsIP?: string; -} - -/** Configuration of application logs */ -export interface AppLogsConfiguration { - /** Logs destination */ - destination?: string; - /** Log Analytics configuration */ - logAnalyticsConfiguration?: LogAnalyticsConfiguration; -} - -/** Log analytics configuration */ -export interface LogAnalyticsConfiguration { - /** Log analytics customer id */ - customerId?: string; - /** Log analytics customer key */ - sharedKey?: string; -} - /** Collection of Certificates. */ export interface CertificateCollection { /** Collection of resources. */ @@ -1044,6 +1343,11 @@ export interface CertificateProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly subjectName?: string; + /** + * Subject alternative names the certificate applies to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subjectAlternativeNames?: string[]; /** PFX or PEM blob */ value?: Uint8Array; /** @@ -1179,23 +1483,145 @@ export interface AzureCredentials { subscriptionId?: string; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export interface ProxyResource extends Resource {} +/** Collection of connectedEnvironments */ +export interface ConnectedEnvironmentCollection { + /** Collection of resources. */ + value?: ConnectedEnvironment[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; +/** Collection of Storage for Environments */ +export interface ConnectedEnvironmentStoragesCollection { + /** Collection of storage resources. */ + value: ConnectedEnvironmentStorage[]; } -/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ -export interface AuthConfig extends ProxyResource { - /** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ - platform?: AuthPlatform; - /** The configuration settings that determines the validation flow of users using Service Authentication/Authorization. */ - globalValidation?: GlobalValidation; +/** Storage properties */ +export interface ConnectedEnvironmentStorageProperties { + /** Azure file properties */ + azureFile?: AzureFileProperties; +} + +/** Collection of available workload profiles in the location. */ +export interface AvailableWorkloadProfilesCollection { + /** Collection of workload profiles. */ + value: AvailableWorkloadProfile[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Revision resource specific properties */ +export interface AvailableWorkloadProfileProperties { + /** Used to map workload profile types to billing meter. */ + billingMeterCategory?: Category; + /** indicates whether the profile is default for the location. */ + applicability?: Applicability; + /** Number of cores in CPU. */ + cores?: number; + /** Memory in GiB. */ + memoryGiB?: number; + /** The everyday name of the workload profile. */ + displayName?: 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 ErrorResponse { + /** 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 resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + +/** Collection of premium workload billing meters. */ +export interface BillingMeterCollection { + /** Collection of billing meters. */ + value: BillingMeter[]; +} + +/** Revision resource specific properties */ +export interface BillingMeterProperties { + /** Used to map workload profile types to billing meter. */ + category?: Category; + /** Billing meter type. */ + meterType?: string; + /** The everyday name of the billing meter. */ + displayName?: string; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export interface ProxyResource extends Resource {} + +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** Container App init container definition */ +export interface InitContainer extends BaseContainer {} + +/** Container App container definition */ +export interface Container extends BaseContainer { + /** List of probes for the container. */ + probes?: ContainerAppProbe[]; +} + +/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ +export interface AuthConfig extends ProxyResource { + /** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ + platform?: AuthPlatform; + /** The configuration settings that determines the validation flow of users using Service Authentication/Authorization. */ + globalValidation?: GlobalValidation; /** The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ identityProviders?: IdentityProviders; /** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ @@ -1212,6 +1638,11 @@ export interface Revision extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdTime?: Date; + /** + * Timestamp describing when the revision was last active. Only meaningful when revision is inactive + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastActiveTime?: Date; /** * Fully qualified domain name of the revision * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1279,12 +1710,20 @@ export interface DaprComponent extends ProxyResource { initTimeout?: string; /** Collection of secrets used by a Dapr component */ secrets?: Secret[]; + /** Name of a Dapr component to retrieve component secrets from */ + secretStoreComponent?: string; /** Component metadata */ metadata?: DaprMetadata[]; /** Names of container apps that can use this Dapr component */ scopes?: string[]; } +/** Diagnostics data for a resource. */ +export interface Diagnostics extends ProxyResource { + /** Diagnostics resource specific properties */ + properties?: DiagnosticsProperties; +} + /** Storage resource for managedEnvironment. */ export interface ManagedEnvironmentStorage extends ProxyResource { /** Storage properties */ @@ -1310,8 +1749,32 @@ export interface SourceControl extends ProxyResource { githubActionConfiguration?: GithubActionConfiguration; } +/** Storage resource for connectedEnvironment. */ +export interface ConnectedEnvironmentStorage extends ProxyResource { + /** Storage properties */ + properties?: ConnectedEnvironmentStorageProperties; +} + +/** A premium workload profile. */ +export interface AvailableWorkloadProfile extends ProxyResource { + /** Region of the workload profile. */ + location?: string; + /** Revision resource specific properties */ + properties?: AvailableWorkloadProfileProperties; +} + +/** A premium billing meter. */ +export interface BillingMeter extends ProxyResource { + /** Region for the billing meter. */ + location?: string; + /** Revision resource specific properties */ + properties?: BillingMeterProperties; +} + /** Container App. */ export interface ContainerApp extends TrackedResource { + /** The complex type of the extended location. */ + extendedLocation?: ExtendedLocation; /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ identity?: ManagedServiceIdentity; /** @@ -1319,8 +1782,12 @@ export interface ContainerApp extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ContainerAppProvisioningState; - /** Resource ID of the Container App's environment. */ + /** Deprecated. Resource ID of the Container App's environment. */ managedEnvironmentId?: string; + /** Resource ID of environment. */ + environmentId?: string; + /** Workload profile type to pin for container app execution. */ + workloadProfileType?: string; /** * Name of the latest revision of the Container App. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1345,10 +1812,31 @@ export interface ContainerApp extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly outboundIpAddresses?: string[]; + /** + * The endpoint of the eventstream of the container app. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventStreamEndpoint?: string; +} + +/** Container App Auth Token. */ +export interface ContainerAppAuthToken extends TrackedResource { + /** + * Auth token value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly token?: string; + /** + * Token expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expires?: Date; } /** An environment for hosting container apps */ export interface ManagedEnvironment extends TrackedResource { + /** SKU properties of the Environment. */ + sku?: EnvironmentSkuProperties; /** * Provisioning state of the Environment. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1383,6 +1871,15 @@ export interface ManagedEnvironment extends TrackedResource { appLogsConfiguration?: AppLogsConfiguration; /** Whether or not this Managed Environment is zone-redundant. */ zoneRedundant?: boolean; + /** Custom domain configuration for the environment */ + customDomainConfiguration?: CustomDomainConfiguration; + /** + * The endpoint of the eventstream of the Environment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventStreamEndpoint?: string; + /** Workload profiles configured for the Managed Environment. */ + workloadProfiles?: WorkloadProfile[]; } /** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ @@ -1391,6 +1888,47 @@ export interface Certificate extends TrackedResource { properties?: CertificateProperties; } +/** Environment Auth Token. */ +export interface EnvironmentAuthToken extends TrackedResource { + /** + * Auth token value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly token?: string; + /** + * Token expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expires?: Date; +} + +/** An environment for Kubernetes cluster specialized for web workloads by Azure App Service */ +export interface ConnectedEnvironment extends TrackedResource { + /** The complex type of the extended location. */ + extendedLocation?: ExtendedLocation; + /** + * Provisioning state of the Kubernetes Environment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ConnectedEnvironmentProvisioningState; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; + /** + * Default Domain Name for the cluster + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultDomain?: string; + /** Static IP of the connectedEnvironment */ + staticIp?: string; + /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ + daprAIConnectionString?: string; + /** Custom domain configuration for the environment */ + customDomainConfiguration?: CustomDomainConfiguration; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -1415,6 +1953,21 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link ExtendedLocationTypes} that the service accepts. */ +export enum KnownExtendedLocationTypes { + /** CustomLocation */ + CustomLocation = "CustomLocation" +} + +/** + * Defines values for ExtendedLocationTypes. \ + * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CustomLocation** + */ +export type ExtendedLocationTypes = string; + /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ export enum KnownManagedServiceIdentityType { /** None */ @@ -1448,7 +2001,9 @@ export enum KnownContainerAppProvisioningState { /** Failed */ Failed = "Failed", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting" } /** @@ -1459,7 +2014,8 @@ export enum KnownContainerAppProvisioningState { * **InProgress** \ * **Succeeded** \ * **Failed** \ - * **Canceled** + * **Canceled** \ + * **Deleting** */ export type ContainerAppProvisioningState = string; @@ -1488,7 +2044,9 @@ export enum KnownIngressTransportMethod { /** Http */ Http = "http", /** Http2 */ - Http2 = "http2" + Http2 = "http2", + /** Tcp */ + Tcp = "tcp" } /** @@ -1498,7 +2056,8 @@ export enum KnownIngressTransportMethod { * ### Known values supported by the service * **auto** \ * **http** \ - * **http2** + * **http2** \ + * **tcp** */ export type IngressTransportMethod = string; @@ -1520,6 +2079,24 @@ export enum KnownBindingType { */ export type BindingType = string; +/** Known values of {@link Action} that the service accepts. */ +export enum KnownAction { + /** Allow */ + Allow = "Allow", + /** Deny */ + Deny = "Deny" +} + +/** + * Defines values for Action. \ + * {@link KnownAction} can be used interchangeably with Action, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Allow** \ + * **Deny** + */ +export type Action = string; + /** Known values of {@link AppProtocol} that the service accepts. */ export enum KnownAppProtocol { /** Http */ @@ -1538,6 +2115,30 @@ export enum KnownAppProtocol { */ export type AppProtocol = string; +/** Known values of {@link LogLevel} that the service accepts. */ +export enum KnownLogLevel { + /** Info */ + Info = "info", + /** Debug */ + Debug = "debug", + /** Warn */ + Warn = "warn", + /** Error */ + Error = "error" +} + +/** + * Defines values for LogLevel. \ + * {@link KnownLogLevel} can be used interchangeably with LogLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **info** \ + * **debug** \ + * **warn** \ + * **error** + */ +export type LogLevel = string; + /** Known values of {@link Scheme} that the service accepts. */ export enum KnownScheme { /** Http */ @@ -1643,6 +2244,24 @@ export enum KnownRevisionProvisioningState { */ export type RevisionProvisioningState = string; +/** Known values of {@link SkuName} that the service accepts. */ +export enum KnownSkuName { + /** Consumption SKU of Managed Environment. */ + Consumption = "Consumption", + /** Premium SKU of Managed Environment. */ + Premium = "Premium" +} + +/** + * Defines values for SkuName. \ + * {@link KnownSkuName} can be used interchangeably with SkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Consumption**: Consumption SKU of Managed Environment. \ + * **Premium**: Premium SKU of Managed Environment. + */ +export type SkuName = string; + /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { /** Succeeded */ @@ -1685,6 +2304,24 @@ export enum KnownEnvironmentProvisioningState { */ export type EnvironmentProvisioningState = string; +/** Known values of {@link ManagedEnvironmentOutBoundType} that the service accepts. */ +export enum KnownManagedEnvironmentOutBoundType { + /** LoadBalancer */ + LoadBalancer = "LoadBalancer", + /** UserDefinedRouting */ + UserDefinedRouting = "UserDefinedRouting" +} + +/** + * Defines values for ManagedEnvironmentOutBoundType. \ + * {@link KnownManagedEnvironmentOutBoundType} can be used interchangeably with ManagedEnvironmentOutBoundType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LoadBalancer** \ + * **UserDefinedRouting** + */ +export type ManagedEnvironmentOutBoundType = string; + /** Known values of {@link CertificateProvisioningState} that the service accepts. */ export enum KnownCertificateProvisioningState { /** Succeeded */ @@ -1771,6 +2408,81 @@ export enum KnownSourceControlOperationState { * **Canceled** */ export type SourceControlOperationState = string; + +/** Known values of {@link ConnectedEnvironmentProvisioningState} that the service accepts. */ +export enum KnownConnectedEnvironmentProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Waiting */ + Waiting = "Waiting", + /** InitializationInProgress */ + InitializationInProgress = "InitializationInProgress", + /** InfrastructureSetupInProgress */ + InfrastructureSetupInProgress = "InfrastructureSetupInProgress", + /** InfrastructureSetupComplete */ + InfrastructureSetupComplete = "InfrastructureSetupComplete", + /** ScheduledForDelete */ + ScheduledForDelete = "ScheduledForDelete" +} + +/** + * Defines values for ConnectedEnvironmentProvisioningState. \ + * {@link KnownConnectedEnvironmentProvisioningState} can be used interchangeably with ConnectedEnvironmentProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Waiting** \ + * **InitializationInProgress** \ + * **InfrastructureSetupInProgress** \ + * **InfrastructureSetupComplete** \ + * **ScheduledForDelete** + */ +export type ConnectedEnvironmentProvisioningState = string; + +/** Known values of {@link Category} that the service accepts. */ +export enum KnownCategory { + /** PremiumSkuGeneralPurpose */ + PremiumSkuGeneralPurpose = "PremiumSkuGeneralPurpose", + /** PremiumSkuMemoryOptimized */ + PremiumSkuMemoryOptimized = "PremiumSkuMemoryOptimized", + /** PremiumSkuComputeOptimized */ + PremiumSkuComputeOptimized = "PremiumSkuComputeOptimized" +} + +/** + * Defines values for Category. \ + * {@link KnownCategory} can be used interchangeably with Category, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PremiumSkuGeneralPurpose** \ + * **PremiumSkuMemoryOptimized** \ + * **PremiumSkuComputeOptimized** + */ +export type Category = string; + +/** Known values of {@link Applicability} that the service accepts. */ +export enum KnownApplicability { + /** LocationDefault */ + LocationDefault = "LocationDefault", + /** Custom */ + Custom = "Custom" +} + +/** + * Defines values for Applicability. \ + * {@link KnownApplicability} can be used interchangeably with Applicability, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LocationDefault** \ + * **Custom** + */ +export type Applicability = string; /** Defines values for UnauthenticatedClientActionV2. */ export type UnauthenticatedClientActionV2 = | "RedirectToLoginPage" @@ -1886,6 +2598,13 @@ export interface ContainerAppsListSecretsOptionalParams /** Contains response data for the listSecrets operation. */ export type ContainerAppsListSecretsResponse = SecretsCollection; +/** Optional parameters. */ +export interface ContainerAppsGetAuthTokenOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getAuthToken operation. */ +export type ContainerAppsGetAuthTokenResponse = ContainerAppAuthToken; + /** Optional parameters. */ export interface ContainerAppsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} @@ -1992,6 +2711,82 @@ export interface DaprComponentsListNextOptionalParams /** Contains response data for the listNext operation. */ export type DaprComponentsListNextResponse = DaprComponentsCollection; +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsListDetectorsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDetectors operation. */ +export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsGetDetectorOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDetector operation. */ +export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsListRevisionsOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listRevisions operation. */ +export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsGetRevisionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getRevision operation. */ +export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsGetRootOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getRoot operation. */ +export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDetectorsNext operation. */ +export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; + +/** Optional parameters. */ +export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listRevisionsNext operation. */ +export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listDetectors operation. */ +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; + +/** Optional parameters. */ +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getDetector operation. */ +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; + +/** Optional parameters. */ +export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getRoot operation. */ +export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -2057,6 +2852,13 @@ export interface ManagedEnvironmentsUpdateOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ManagedEnvironmentsGetAuthTokenOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getAuthToken operation. */ +export type ManagedEnvironmentsGetAuthTokenResponse = EnvironmentAuthToken; + /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} @@ -2187,6 +2989,203 @@ export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams /** Contains response data for the listByContainerAppNext operation. */ export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; +/** Optional parameters. */ +export interface ConnectedEnvironmentsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ConnectedEnvironmentsListBySubscriptionResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ConnectedEnvironmentsListByResourceGroupResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsGetResponse = ConnectedEnvironment; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCreateOrUpdateOptionalParams + 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 createOrUpdate operation. */ +export type ConnectedEnvironmentsCreateOrUpdateResponse = ConnectedEnvironment; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ConnectedEnvironmentsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ConnectedEnvironmentsUpdateResponse = ConnectedEnvironment; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameAvailability operation. */ +export type ConnectedEnvironmentsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ConnectedEnvironmentsListBySubscriptionNextResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ConnectedEnvironmentsListByResourceGroupNextResponse = ConnectedEnvironmentCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsCertificatesListResponse = CertificateCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsCertificatesGetResponse = Certificate; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Certificate to be created or updated */ + certificateEnvelope?: Certificate; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectedEnvironmentsCertificatesListNextResponse = CertificateCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = DaprComponent; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type ConnectedEnvironmentsDaprComponentsListSecretsResponse = DaprSecretsCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectedEnvironmentsDaprComponentsListNextResponse = DaprComponentsCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsStoragesListResponse = ConnectedEnvironmentStoragesCollection; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedEnvironmentsStoragesGetResponse = ConnectedEnvironmentStorage; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = ConnectedEnvironmentStorage; + +/** Optional parameters. */ +export interface ConnectedEnvironmentsStoragesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AvailableWorkloadProfilesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; + +/** Optional parameters. */ +export interface AvailableWorkloadProfilesGetNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getNext operation. */ +export type AvailableWorkloadProfilesGetNextResponse = AvailableWorkloadProfilesCollection; + +/** Optional parameters. */ +export interface BillingMetersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BillingMetersGetResponse = BillingMeterCollection; + /** Optional parameters. */ export interface ContainerAppsAPIClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index aa428860d929..5893d9712206 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -1243,6 +1243,27 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { } }; +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1353,6 +1374,12 @@ export const Configuration: coreClient.CompositeMapper = { name: "Composite", className: "Dapr" } + }, + maxInactiveRevisions: { + serializedName: "maxInactiveRevisions", + type: { + name: "Number" + } } } } @@ -1404,6 +1431,12 @@ export const Ingress: coreClient.CompositeMapper = { name: "Number" } }, + exposedPort: { + serializedName: "exposedPort", + type: { + name: "Number" + } + }, transport: { serializedName: "transport", type: { @@ -1439,6 +1472,18 @@ export const Ingress: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + ipSecurityRestrictions: { + serializedName: "ipSecurityRestrictions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpSecurityRestrictionRule" + } + } + } } } } @@ -1507,6 +1552,42 @@ export const CustomDomain: coreClient.CompositeMapper = { } }; +export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IpSecurityRestrictionRule", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + ipAddressRange: { + serializedName: "ipAddressRange", + required: true, + type: { + name: "String" + } + }, + action: { + serializedName: "action", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1568,6 +1649,30 @@ export const Dapr: coreClient.CompositeMapper = { type: { name: "Number" } + }, + httpReadBufferSize: { + serializedName: "httpReadBufferSize", + type: { + name: "Number" + } + }, + httpMaxRequestSize: { + serializedName: "httpMaxRequestSize", + type: { + name: "Number" + } + }, + logLevel: { + serializedName: "logLevel", + type: { + name: "String" + } + }, + enableApiLogging: { + serializedName: "enableApiLogging", + type: { + name: "Boolean" + } } } } @@ -1584,6 +1689,18 @@ export const Template: coreClient.CompositeMapper = { name: "String" } }, + initContainers: { + serializedName: "initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InitContainer" + } + } + } + }, containers: { serializedName: "containers", type: { @@ -1619,10 +1736,10 @@ export const Template: coreClient.CompositeMapper = { } }; -export const Container: coreClient.CompositeMapper = { +export const BaseContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Container", + className: "BaseContainer", modelProperties: { image: { serializedName: "image", @@ -1677,18 +1794,6 @@ export const Container: coreClient.CompositeMapper = { className: "ContainerResources" } }, - probes: { - serializedName: "probes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbe" - } - } - } - }, volumeMounts: { serializedName: "volumeMounts", type: { @@ -1760,6 +1865,27 @@ export const ContainerResources: coreClient.CompositeMapper = { } }; +export const VolumeMount: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VolumeMount", + modelProperties: { + volumeName: { + serializedName: "volumeName", + type: { + name: "String" + } + }, + mountPath: { + serializedName: "mountPath", + type: { + name: "String" + } + } + } + } +}; + export const ContainerAppProbe: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1916,27 +2042,6 @@ export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { } }; -export const VolumeMount: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VolumeMount", - modelProperties: { - volumeName: { - serializedName: "volumeName", - type: { - name: "String" - } - }, - mountPath: { - serializedName: "mountPath", - type: { - name: "String" - } - } - } - } -}; - export const Scale: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2001,6 +2106,13 @@ export const ScaleRule: coreClient.CompositeMapper = { name: "Composite", className: "HttpScaleRule" } + }, + tcp: { + serializedName: "tcp", + type: { + name: "Composite", + className: "TcpScaleRule" + } } } } @@ -2122,6 +2234,34 @@ export const HttpScaleRule: coreClient.CompositeMapper = { } }; +export const TcpScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TcpScaleRule", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + export const Volume: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2180,7 +2320,8 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { serializedName: "customDomainVerificationFailureInfo", type: { name: "Composite", - className: "DefaultErrorResponse" + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo" } }, hasConflictOnManagedEnvironment: { @@ -2190,6 +2331,13 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { name: "Boolean" } }, + conflictWithEnvironmentCustomDomain: { + serializedName: "conflictWithEnvironmentCustomDomain", + readOnly: true, + type: { + name: "Boolean" + } + }, conflictingContainerAppResourceId: { serializedName: "conflictingContainerAppResourceId", readOnly: true, @@ -2256,6 +2404,81 @@ export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { } }; +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + 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", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem" + } + } + } + } + } + } +}; + +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + 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" + } + } + } + } +}; + export const SecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2364,13 +2587,27 @@ export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Number" } - } - } - } -}; - -export const ReplicaCollection: coreClient.CompositeMapper = { - type: { + }, + logStreamEndpoint: { + serializedName: "logStreamEndpoint", + readOnly: true, + type: { + name: "String" + } + }, + execEndpoint: { + serializedName: "execEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ReplicaCollection: coreClient.CompositeMapper = { + type: { name: "Composite", className: "ReplicaCollection", modelProperties: { @@ -2469,25 +2706,27 @@ export const DaprSecretsCollection: coreClient.CompositeMapper = { } }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const DiagnosticsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "DiagnosticsCollection", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail" + className: "Diagnostics" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2496,59 +2735,254 @@ export const AvailableOperations: coreClient.CompositeMapper = { } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const DiagnosticsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "DiagnosticsProperties", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "DiagnosticsDefinition" + } + }, + dataset: { + serializedName: "dataset", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse" + } + } + } + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "DiagnosticsStatus" + } + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata" + } + } + } + } +}; + +export const DiagnosticsDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsDefinition", modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, name: { serializedName: "name", + readOnly: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + description: { + serializedName: "description", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - display: { - serializedName: "display", + author: { + serializedName: "author", + readOnly: true, + type: { + name: "String" + } + }, + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + supportTopicList: { + serializedName: "supportTopicList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticSupportTopic" + } + } + } + }, + analysisTypes: { + serializedName: "analysisTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + score: { + serializedName: "score", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticSupportTopic", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + pesId: { + serializedName: "pesId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse", + modelProperties: { + table: { + serializedName: "table", type: { name: "Composite", - className: "OperationDisplay" + className: "DiagnosticDataTableResponseObject" } }, - origin: { - serializedName: "origin", + renderingProperties: { + serializedName: "renderingProperties", + type: { + name: "Composite", + className: "DiagnosticRendering" + } + } + } + } +}; + +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseObject", + modelProperties: { + tableName: { + serializedName: "tableName", type: { name: "String" } + }, + columns: { + serializedName: "columns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseColumn" + } + } + } + }, + rows: { + serializedName: "rows", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "DiagnosticDataTableResponseColumn", modelProperties: { - provider: { - serializedName: "provider", + columnName: { + serializedName: "columnName", type: { name: "String" } }, - resource: { - serializedName: "resource", + dataType: { + serializedName: "dataType", type: { name: "String" } }, - operation: { - serializedName: "operation", + columnType: { + serializedName: "columnType", + type: { + name: "String" + } + } + } + } +}; + +export const DiagnosticRendering: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticRendering", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "Number" + } + }, + title: { + serializedName: "title", type: { name: "String" } @@ -2558,32 +2992,94 @@ export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "String" } + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean" + } } } } }; -export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { +export const DiagnosticsStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentsCollection", + className: "DiagnosticsStatus", modelProperties: { - value: { - serializedName: "value", - required: true, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + statusId: { + serializedName: "statusId", + type: { + name: "Number" + } + } + } + } +}; + +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata", + modelProperties: { + providerName: { + serializedName: "providerName", + type: { + name: "String" + } + }, + propertyBag: { + serializedName: "propertyBag", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagedEnvironment" + className: "DiagnosticDataProviderMetadataPropertyBagItem" } } } + } + } + } +}; + +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadataPropertyBagItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const EnvironmentSkuProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentSkuProperties", + modelProperties: { + name: { + serializedName: "name", + required: true, type: { name: "String" } @@ -2632,6 +3128,34 @@ export const VnetConfiguration: coreClient.CompositeMapper = { type: { name: "String" } + }, + outboundSettings: { + serializedName: "outboundSettings", + type: { + name: "Composite", + className: "ManagedEnvironmentOutboundSettings" + } + } + } + } +}; + +export const ManagedEnvironmentOutboundSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentOutboundSettings", + modelProperties: { + outBoundType: { + serializedName: "outBoundType", + type: { + name: "String" + } + }, + virtualNetworkApplianceIp: { + serializedName: "virtualNetworkApplianceIp", + type: { + name: "String" + } } } } @@ -2670,8 +3194,216 @@ export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { name: "String" } }, - sharedKey: { - serializedName: "sharedKey", + sharedKey: { + serializedName: "sharedKey", + type: { + name: "String" + } + } + } + } +}; + +export const CustomDomainConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomDomainConfiguration", + modelProperties: { + customDomainVerificationId: { + serializedName: "customDomainVerificationId", + readOnly: true, + type: { + name: "String" + } + }, + dnsSuffix: { + serializedName: "dnsSuffix", + type: { + name: "String" + } + }, + certificateValue: { + serializedName: "certificateValue", + type: { + name: "ByteArray" + } + }, + certificatePassword: { + serializedName: "certificatePassword", + type: { + name: "ByteArray" + } + }, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + subjectName: { + serializedName: "subjectName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfile", + modelProperties: { + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, + type: { + name: "String" + } + }, + minimumCount: { + serializedName: "minimumCount", + required: true, + type: { + name: "Number" + } + }, + maximumCount: { + serializedName: "maximumCount", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const AvailableOperations: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableOperations", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDetail" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDetail", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironment" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -2734,6 +3466,18 @@ export const CertificateProperties: coreClient.CompositeMapper = { name: "String" } }, + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, value: { serializedName: "value", type: { @@ -3029,38 +3773,317 @@ export const RegistryInfo: coreClient.CompositeMapper = { registryPassword: { serializedName: "registryPassword", type: { - name: "String" + name: "String" + } + } + } + } +}; + +export const AzureCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureCredentials", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + clientSecret: { + serializedName: "clientSecret", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironment" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStoragesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorage" + } + } + } + } + } + } +}; + +export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorageProperties", + modelProperties: { + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties" + } + } + } + } +}; + +export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableWorkloadProfilesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableWorkloadProfile" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableWorkloadProfileProperties", + modelProperties: { + billingMeterCategory: { + serializedName: "billingMeterCategory", + type: { + name: "String" + } + }, + applicability: { + serializedName: "applicability", + type: { + name: "String" + } + }, + cores: { + serializedName: "cores", + type: { + name: "Number" + } + }, + memoryGiB: { + serializedName: "memoryGiB", + type: { + name: "Number" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + 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 ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } + } + } +}; + +export const BillingMeterCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingMeterCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingMeter" + } + } } } } } }; -export const AzureCredentials: coreClient.CompositeMapper = { +export const BillingMeterProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureCredentials", + className: "BillingMeterProperties", modelProperties: { - clientId: { - serializedName: "clientId", - type: { - name: "String" - } - }, - clientSecret: { - serializedName: "clientSecret", + category: { + serializedName: "category", type: { name: "String" } }, - tenantId: { - serializedName: "tenantId", + meterType: { + serializedName: "meterType", type: { name: "String" } }, - subscriptionId: { - serializedName: "subscriptionId", + displayName: { + serializedName: "displayName", type: { name: "String" } @@ -3103,6 +4126,38 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; +export const InitContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InitContainer", + modelProperties: { + ...BaseContainer.type.modelProperties + } + } +}; + +export const Container: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Container", + modelProperties: { + ...BaseContainer.type.modelProperties, + probes: { + serializedName: "probes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbe" + } + } + } + } + } + } +}; + export const AuthConfig: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3161,6 +4216,13 @@ export const Revision: coreClient.CompositeMapper = { name: "DateTime" } }, + lastActiveTime: { + serializedName: "properties.lastActiveTime", + readOnly: true, + type: { + name: "DateTime" + } + }, fqdn: { serializedName: "properties.fqdn", readOnly: true, @@ -3292,6 +4354,12 @@ export const DaprComponent: coreClient.CompositeMapper = { } } }, + secretStoreComponent: { + serializedName: "properties.secretStoreComponent", + type: { + name: "String" + } + }, metadata: { serializedName: "properties.metadata", type: { @@ -3319,6 +4387,23 @@ export const DaprComponent: coreClient.CompositeMapper = { } }; +export const Diagnostics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Diagnostics", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DiagnosticsProperties" + } + } + } + } +}; + export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3372,12 +4457,82 @@ export const SourceControl: coreClient.CompositeMapper = { } }; +export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorage", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ConnectedEnvironmentStorageProperties" + } + } + } + } +}; + +export const AvailableWorkloadProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableWorkloadProfile", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AvailableWorkloadProfileProperties" + } + } + } + } +}; + +export const BillingMeter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingMeter", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BillingMeterProperties" + } + } + } + } +}; + export const ContainerApp: coreClient.CompositeMapper = { type: { name: "Composite", className: "ContainerApp", modelProperties: { ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, identity: { serializedName: "identity", type: { @@ -3398,6 +4553,18 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String" } }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + workloadProfileType: { + serializedName: "properties.workloadProfileType", + type: { + name: "String" + } + }, latestRevisionName: { serializedName: "properties.latestRevisionName", readOnly: true, @@ -3444,6 +4611,37 @@ export const ContainerApp: coreClient.CompositeMapper = { } } } + }, + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppAuthToken: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppAuthToken", + modelProperties: { + ...TrackedResource.type.modelProperties, + token: { + serializedName: "properties.token", + readOnly: true, + type: { + name: "String" + } + }, + expires: { + serializedName: "properties.expires", + readOnly: true, + type: { + name: "DateTime" + } } } } @@ -3455,6 +4653,13 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { className: "ManagedEnvironment", modelProperties: { ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "EnvironmentSkuProperties" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -3514,6 +4719,32 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + customDomainConfiguration: { + serializedName: "properties.customDomainConfiguration", + type: { + name: "Composite", + className: "CustomDomainConfiguration" + } + }, + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, + type: { + name: "String" + } + }, + workloadProfiles: { + serializedName: "properties.workloadProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadProfile" + } + } + } } } } @@ -3535,3 +4766,84 @@ export const Certificate: coreClient.CompositeMapper = { } } }; + +export const EnvironmentAuthToken: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentAuthToken", + modelProperties: { + ...TrackedResource.type.modelProperties, + token: { + serializedName: "properties.token", + readOnly: true, + type: { + name: "String" + } + }, + expires: { + serializedName: "properties.expires", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const ConnectedEnvironment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironment", + modelProperties: { + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + deploymentErrors: { + serializedName: "properties.deploymentErrors", + readOnly: true, + type: { + name: "String" + } + }, + defaultDomain: { + serializedName: "properties.defaultDomain", + readOnly: true, + type: { + name: "String" + } + }, + staticIp: { + serializedName: "properties.staticIp", + type: { + name: "String" + } + }, + daprAIConnectionString: { + serializedName: "properties.daprAIConnectionString", + type: { + name: "String" + } + }, + customDomainConfiguration: { + serializedName: "properties.customDomainConfiguration", + type: { + name: "Composite", + className: "CustomDomainConfiguration" + } + } + } + } +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index 24d86d380904..8f3673eadcad 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -20,7 +20,9 @@ import { CertificatePatch as CertificatePatchMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper, - SourceControl as SourceControlMapper + SourceControl as SourceControlMapper, + ConnectedEnvironment as ConnectedEnvironmentMapper, + ConnectedEnvironmentStorage as ConnectedEnvironmentStorageMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -90,7 +92,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-03-01", + defaultValue: "2022-06-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -213,6 +215,17 @@ export const daprComponentEnvelope: OperationParameter = { mapper: DaprComponentMapper }; +export const detectorName: OperationURLParameter = { + parameterPath: "detectorName", + mapper: { + serializedName: "detectorName", + required: true, + type: { + name: "String" + } + } +}; + export const environmentEnvelope: OperationParameter = { parameterPath: "environmentEnvelope", mapper: ManagedEnvironmentMapper @@ -275,3 +288,38 @@ export const sourceControlEnvelope: OperationParameter = { parameterPath: "sourceControlEnvelope", mapper: SourceControlMapper }; + +export const connectedEnvironmentName: OperationURLParameter = { + parameterPath: "connectedEnvironmentName", + mapper: { + serializedName: "connectedEnvironmentName", + required: true, + type: { + name: "String" + } + } +}; + +export const environmentEnvelope1: OperationParameter = { + parameterPath: "environmentEnvelope", + mapper: ConnectedEnvironmentMapper +}; + +export const storageEnvelope1: OperationParameter = { + parameterPath: "storageEnvelope", + mapper: ConnectedEnvironmentStorageMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts b/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts new file mode 100644 index 000000000000..54f86275228d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts @@ -0,0 +1,159 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AvailableWorkloadProfiles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + AvailableWorkloadProfile, + AvailableWorkloadProfilesGetNextOptionalParams, + AvailableWorkloadProfilesGetOptionalParams, + AvailableWorkloadProfilesGetResponse, + AvailableWorkloadProfilesGetNextResponse +} from "../models"; + +/// +/** Class containing AvailableWorkloadProfiles operations. */ +export class AvailableWorkloadProfilesImpl + implements AvailableWorkloadProfiles { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class AvailableWorkloadProfiles class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get all available workload profiles for a location. + * @param location The name of Azure region. + * @param options The options parameters. + */ + public list( + location: string, + options?: AvailableWorkloadProfilesGetOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.getPagingAll(location, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.getPagingPage(location, options); + } + }; + } + + private async *getPagingPage( + location: string, + options?: AvailableWorkloadProfilesGetOptionalParams + ): AsyncIterableIterator { + let result = await this._get(location, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._getNext(location, continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *getPagingAll( + location: string, + options?: AvailableWorkloadProfilesGetOptionalParams + ): AsyncIterableIterator { + for await (const page of this.getPagingPage(location, options)) { + yield* page; + } + } + + /** + * Get all available workload profiles for a location. + * @param location The name of Azure region. + * @param options The options parameters. + */ + private _get( + location: string, + options?: AvailableWorkloadProfilesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + getOperationSpec + ); + } + + /** + * GetNext + * @param location The name of Azure region. + * @param nextLink The nextLink from the previous successful call to the Get method. + * @param options The options parameters. + */ + private _getNext( + location: string, + nextLink: string, + options?: AvailableWorkloadProfilesGetNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, nextLink, options }, + getNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/availableManagedEnvironmentsWorkloadProfileTypes", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableWorkloadProfilesCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; +const getNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AvailableWorkloadProfilesCollection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/billingMeters.ts b/sdk/appcontainers/arm-appcontainers/src/operations/billingMeters.ts new file mode 100644 index 000000000000..5416762a1e4c --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/billingMeters.ts @@ -0,0 +1,69 @@ +/* + * 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 { BillingMeters } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + BillingMetersGetOptionalParams, + BillingMetersGetResponse +} from "../models"; + +/** Class containing BillingMeters operations. */ +export class BillingMetersImpl implements BillingMeters { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class BillingMeters class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get all billingMeters for a location. + * @param location The name of Azure region. + * @param options The options parameters. + */ + get( + location: string, + options?: BillingMetersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, options }, + getOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BillingMeterCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts new file mode 100644 index 000000000000..238500ce39f0 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts @@ -0,0 +1,649 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ConnectedEnvironments } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ConnectedEnvironment, + ConnectedEnvironmentsListBySubscriptionNextOptionalParams, + ConnectedEnvironmentsListBySubscriptionOptionalParams, + ConnectedEnvironmentsListByResourceGroupNextOptionalParams, + ConnectedEnvironmentsListByResourceGroupOptionalParams, + ConnectedEnvironmentsListBySubscriptionResponse, + ConnectedEnvironmentsListByResourceGroupResponse, + ConnectedEnvironmentsGetOptionalParams, + ConnectedEnvironmentsGetResponse, + ConnectedEnvironmentsCreateOrUpdateOptionalParams, + ConnectedEnvironmentsCreateOrUpdateResponse, + ConnectedEnvironmentsDeleteOptionalParams, + ConnectedEnvironmentsUpdateOptionalParams, + ConnectedEnvironmentsUpdateResponse, + CheckNameAvailabilityRequest, + ConnectedEnvironmentsCheckNameAvailabilityOptionalParams, + ConnectedEnvironmentsCheckNameAvailabilityResponse, + ConnectedEnvironmentsListBySubscriptionNextResponse, + ConnectedEnvironmentsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing ConnectedEnvironments operations. */ +export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ConnectedEnvironments class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get all connectedEnvironments for a subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ConnectedEnvironmentsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: ConnectedEnvironmentsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: ConnectedEnvironmentsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get all connectedEnvironments in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ConnectedEnvironmentsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ConnectedEnvironmentsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ConnectedEnvironmentsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get all connectedEnvironments for a subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ConnectedEnvironmentsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get all connectedEnvironments in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ConnectedEnvironmentsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get the properties of an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param environmentEnvelope Configuration details of the connectedEnvironment. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + environmentEnvelope: ConnectedEnvironment, + options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ConnectedEnvironmentsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { + resourceGroupName, + connectedEnvironmentName, + environmentEnvelope, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param environmentEnvelope Configuration details of the connectedEnvironment. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + environmentEnvelope: ConnectedEnvironment, + options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + connectedEnvironmentName, + environmentEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, connectedEnvironmentName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Delete an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + connectedEnvironmentName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Patches a Managed Environment. Only patching of tags is supported currently + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, options }, + updateOperationSpec + ); + } + + /** + * Checks if resource connectedEnvironmentName is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Managed Environment. + * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. + * @param options The options parameters. + */ + checkNameAvailability( + resourceGroupName: string, + connectedEnvironmentName: string, + checkNameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: ConnectedEnvironmentsCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + connectedEnvironmentName, + checkNameAvailabilityRequest, + options + }, + checkNameAvailabilityOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ConnectedEnvironmentsListBySubscriptionNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ConnectedEnvironmentsListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironment + }, + 201: { + bodyMapper: Mappers.ConnectedEnvironment + }, + 202: { + bodyMapper: Mappers.ConnectedEnvironment + }, + 204: { + bodyMapper: Mappers.ConnectedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.environmentEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResponse + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.checkNameAvailabilityRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts new file mode 100644 index 000000000000..4cd06d61f734 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts @@ -0,0 +1,377 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ConnectedEnvironmentsCertificates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + Certificate, + ConnectedEnvironmentsCertificatesListNextOptionalParams, + ConnectedEnvironmentsCertificatesListOptionalParams, + ConnectedEnvironmentsCertificatesListResponse, + ConnectedEnvironmentsCertificatesGetOptionalParams, + ConnectedEnvironmentsCertificatesGetResponse, + ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, + ConnectedEnvironmentsCertificatesCreateOrUpdateResponse, + ConnectedEnvironmentsCertificatesDeleteOptionalParams, + CertificatePatch, + ConnectedEnvironmentsCertificatesUpdateOptionalParams, + ConnectedEnvironmentsCertificatesUpdateResponse, + ConnectedEnvironmentsCertificatesListNextResponse +} from "../models"; + +/// +/** Class containing ConnectedEnvironmentsCertificates operations. */ +export class ConnectedEnvironmentsCertificatesImpl + implements ConnectedEnvironmentsCertificates { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ConnectedEnvironmentsCertificates class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Certificates in a given connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsCertificatesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + connectedEnvironmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + connectedEnvironmentName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsCertificatesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + connectedEnvironmentName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + connectedEnvironmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsCertificatesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + connectedEnvironmentName, + options + )) { + yield* page; + } + } + + /** + * Get the Certificates in a given connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsCertificatesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, options }, + listOperationSpec + ); + } + + /** + * Get the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, certificateName, options }, + getOperationSpec + ); + } + + /** + * Create or Update a Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, certificateName, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Deletes the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, certificateName, options }, + deleteOperationSpec + ); + } + + /** + * Patches a certificate. Currently only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + certificateEnvelope: CertificatePatch, + options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + connectedEnvironmentName, + certificateName, + certificateEnvelope, + options + }, + updateOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + connectedEnvironmentName: string, + nextLink: string, + options?: ConnectedEnvironmentsCertificatesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Certificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.certificateName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Certificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.certificateEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.certificateName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.certificateName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Certificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.certificateEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.certificateName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts new file mode 100644 index 000000000000..31e35fc554a9 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts @@ -0,0 +1,374 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ConnectedEnvironmentsDaprComponents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + DaprComponent, + ConnectedEnvironmentsDaprComponentsListNextOptionalParams, + ConnectedEnvironmentsDaprComponentsListOptionalParams, + ConnectedEnvironmentsDaprComponentsListResponse, + ConnectedEnvironmentsDaprComponentsGetOptionalParams, + ConnectedEnvironmentsDaprComponentsGetResponse, + ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, + ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse, + ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, + ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams, + ConnectedEnvironmentsDaprComponentsListSecretsResponse, + ConnectedEnvironmentsDaprComponentsListNextResponse +} from "../models"; + +/// +/** Class containing ConnectedEnvironmentsDaprComponents operations. */ +export class ConnectedEnvironmentsDaprComponentsImpl + implements ConnectedEnvironmentsDaprComponents { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ConnectedEnvironmentsDaprComponents class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Dapr Components for a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDaprComponentsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + connectedEnvironmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + connectedEnvironmentName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDaprComponentsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + connectedEnvironmentName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + connectedEnvironmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDaprComponentsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + connectedEnvironmentName, + options + )) { + yield* page; + } + } + + /** + * Get the Dapr Components for a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDaprComponentsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, options }, + listOperationSpec + ); + } + + /** + * Get a dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, componentName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates a Dapr Component in a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + daprComponentEnvelope: DaprComponent, + options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + connectedEnvironmentName, + componentName, + daprComponentEnvelope, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete a Dapr Component from a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, componentName, options }, + deleteOperationSpec + ); + } + + /** + * List secrets for a dapr component + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, componentName, options }, + listSecretsOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + connectedEnvironmentName: string, + nextLink: string, + options?: ConnectedEnvironmentsDaprComponentsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponent + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.componentName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DaprComponent + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.daprComponentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.componentName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.componentName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listSecretsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DaprSecretsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.componentName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts new file mode 100644 index 000000000000..e1f12b3c7f33 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts @@ -0,0 +1,214 @@ +/* + * 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 { ConnectedEnvironmentsStorages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + ConnectedEnvironmentsStoragesListOptionalParams, + ConnectedEnvironmentsStoragesListResponse, + ConnectedEnvironmentsStoragesGetOptionalParams, + ConnectedEnvironmentsStoragesGetResponse, + ConnectedEnvironmentStorage, + ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, + ConnectedEnvironmentsStoragesCreateOrUpdateResponse, + ConnectedEnvironmentsStoragesDeleteOptionalParams +} from "../models"; + +/** Class containing ConnectedEnvironmentsStorages operations. */ +export class ConnectedEnvironmentsStoragesImpl + implements ConnectedEnvironmentsStorages { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ConnectedEnvironmentsStorages class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get all storages for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsStoragesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, options }, + listOperationSpec + ); + } + + /** + * Get storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + options?: ConnectedEnvironmentsStoragesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, storageName, options }, + getOperationSpec + ); + } + + /** + * Create or update storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + storageEnvelope: ConnectedEnvironmentStorage, + options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + connectedEnvironmentName, + storageName, + storageEnvelope, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Delete storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + options?: ConnectedEnvironmentsStoragesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, connectedEnvironmentName, storageName, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentStoragesCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentStorage + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConnectedEnvironmentStorage + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.storageEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageName, + Parameters.connectedEnvironmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts index 8bdfb89a7856..031db042fd06 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -32,6 +32,8 @@ import { ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, ContainerAppsListSecretsResponse, + ContainerAppsGetAuthTokenOptionalParams, + ContainerAppsGetAuthTokenResponse, ContainerAppsListBySubscriptionNextResponse, ContainerAppsListByResourceGroupNextResponse } from "../models"; @@ -484,6 +486,23 @@ export class ContainerAppsImpl implements ContainerApps { ); } + /** + * Get auth token for a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + getAuthToken( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsGetAuthTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + getAuthTokenOperationSpec + ); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -706,6 +725,31 @@ const listSecretsOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const getAuthTokenOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppAuthToken + }, + 404: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts new file mode 100644 index 000000000000..adeff5ff113d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts @@ -0,0 +1,477 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ContainerAppsDiagnostics } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + Diagnostics, + ContainerAppsDiagnosticsListDetectorsNextOptionalParams, + ContainerAppsDiagnosticsListDetectorsOptionalParams, + Revision, + ContainerAppsDiagnosticsListRevisionsNextOptionalParams, + ContainerAppsDiagnosticsListRevisionsOptionalParams, + ContainerAppsDiagnosticsListDetectorsResponse, + ContainerAppsDiagnosticsGetDetectorOptionalParams, + ContainerAppsDiagnosticsGetDetectorResponse, + ContainerAppsDiagnosticsListRevisionsResponse, + ContainerAppsDiagnosticsGetRevisionOptionalParams, + ContainerAppsDiagnosticsGetRevisionResponse, + ContainerAppsDiagnosticsGetRootOptionalParams, + ContainerAppsDiagnosticsGetRootResponse, + ContainerAppsDiagnosticsListDetectorsNextResponse, + ContainerAppsDiagnosticsListRevisionsNextResponse +} from "../models"; + +/// +/** Class containing ContainerAppsDiagnostics operations. */ +export class ContainerAppsDiagnosticsImpl implements ContainerAppsDiagnostics { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsDiagnostics class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the list of diagnostics for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param options The options parameters. + */ + public listDetectors( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listDetectorsPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listDetectorsPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listDetectorsPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): AsyncIterableIterator { + let result = await this._listDetectors( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listDetectorsNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listDetectorsPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listDetectorsPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + public listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listRevisionsPagingAll( + resourceGroupName, + containerAppName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listRevisionsPagingPage( + resourceGroupName, + containerAppName, + options + ); + } + }; + } + + private async *listRevisionsPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): AsyncIterableIterator { + let result = await this._listRevisions( + resourceGroupName, + containerAppName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listRevisionsNext( + resourceGroupName, + containerAppName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listRevisionsPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listRevisionsPagingPage( + resourceGroupName, + containerAppName, + options + )) { + yield* page; + } + } + + /** + * Get the list of diagnostics for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param options The options parameters. + */ + private _listDetectors( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listDetectorsOperationSpec + ); + } + + /** + * Get a diagnostics result of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param detectorName Name of the Container App Detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + containerAppName: string, + detectorName: string, + options?: ContainerAppsDiagnosticsGetDetectorOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, detectorName, options }, + getDetectorOperationSpec + ); + } + + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + private _listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listRevisionsOperationSpec + ); + } + + /** + * Get a revision of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + getRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsDiagnosticsGetRevisionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, revisionName, options }, + getRevisionOperationSpec + ); + } + + /** + * Get the properties of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsGetRootOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + getRootOperationSpec + ); + } + + /** + * ListDetectorsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param nextLink The nextLink from the previous successful call to the ListDetectors method. + * @param options The options parameters. + */ + private _listDetectorsNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsDiagnosticsListDetectorsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listDetectorsNextOperationSpec + ); + } + + /** + * ListRevisionsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param nextLink The nextLink from the previous successful call to the ListRevisions method. + * @param options The options parameters. + */ + private _listRevisionsNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsDiagnosticsListRevisionsNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listRevisionsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listDetectorsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDetectorOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{detectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Diagnostics + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.detectorName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listRevisionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RevisionCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getRevisionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/{revisionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Revision + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.revisionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getRootOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/rootApi/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 404: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listDetectorsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listRevisionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RevisionCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index 6b480d5a26e4..cb79504dd5c6 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -11,9 +11,18 @@ export * from "./containerApps"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./daprComponents"; +export * from "./containerAppsDiagnostics"; +export * from "./managedEnvironmentDiagnostics"; +export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./namespaces"; export * from "./managedEnvironmentsStorages"; export * from "./containerAppsSourceControls"; +export * from "./connectedEnvironments"; +export * from "./connectedEnvironmentsCertificates"; +export * from "./connectedEnvironmentsDaprComponents"; +export * from "./connectedEnvironmentsStorages"; +export * from "./availableWorkloadProfiles"; +export * from "./billingMeters"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts new file mode 100644 index 000000000000..a74c66507b36 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts @@ -0,0 +1,117 @@ +/* + * 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 { ManagedEnvironmentDiagnostics } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + ManagedEnvironmentDiagnosticsListDetectorsOptionalParams, + ManagedEnvironmentDiagnosticsListDetectorsResponse, + ManagedEnvironmentDiagnosticsGetDetectorOptionalParams, + ManagedEnvironmentDiagnosticsGetDetectorResponse +} from "../models"; + +/** Class containing ManagedEnvironmentDiagnostics operations. */ +export class ManagedEnvironmentDiagnosticsImpl + implements ManagedEnvironmentDiagnostics { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentDiagnostics class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the list of diagnostics for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + listDetectors( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listDetectorsOperationSpec + ); + } + + /** + * Get the diagnostics data for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param detectorName Name of the Managed Environment detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + environmentName: string, + detectorName: string, + options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, detectorName, options }, + getDetectorOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listDetectorsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getDetectorOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Diagnostics + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.detectorName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts index c474dd1cc701..72b2f9806bcf 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts @@ -28,6 +28,8 @@ import { ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsGetAuthTokenOptionalParams, + ManagedEnvironmentsGetAuthTokenResponse, ManagedEnvironmentsListBySubscriptionNextResponse, ManagedEnvironmentsListByResourceGroupNextResponse } from "../models"; @@ -446,6 +448,23 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { return poller.pollUntilDone(); } + /** + * Checks if resource name is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + getAuthToken( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsGetAuthTokenOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + getAuthTokenOperationSpec + ); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -622,6 +641,31 @@ const updateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const getAuthTokenOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/getAuthtoken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.EnvironmentAuthToken + }, + 404: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsDiagnostics.ts new file mode 100644 index 000000000000..a075b565a3ad --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsDiagnostics.ts @@ -0,0 +1,73 @@ +/* + * 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 { ManagedEnvironmentsDiagnostics } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + ManagedEnvironmentsDiagnosticsGetRootOptionalParams, + ManagedEnvironmentsDiagnosticsGetRootResponse +} from "../models"; + +/** Class containing ManagedEnvironmentsDiagnostics operations. */ +export class ManagedEnvironmentsDiagnosticsImpl + implements ManagedEnvironmentsDiagnostics { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentsDiagnostics class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the properties of a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsDiagnosticsGetRootOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + getRootOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getRootOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectorProperties/rootApi/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedEnvironment + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/availableWorkloadProfiles.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/availableWorkloadProfiles.ts new file mode 100644 index 000000000000..e89cfad2e38b --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/availableWorkloadProfiles.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AvailableWorkloadProfile, + AvailableWorkloadProfilesGetOptionalParams +} from "../models"; + +/// +/** Interface representing a AvailableWorkloadProfiles. */ +export interface AvailableWorkloadProfiles { + /** + * Get all available workload profiles for a location. + * @param location The name of Azure region. + * @param options The options parameters. + */ + list( + location: string, + options?: AvailableWorkloadProfilesGetOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/billingMeters.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/billingMeters.ts new file mode 100644 index 000000000000..bf162344bf43 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/billingMeters.ts @@ -0,0 +1,25 @@ +/* + * 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 { + BillingMetersGetOptionalParams, + BillingMetersGetResponse +} from "../models"; + +/** Interface representing a BillingMeters. */ +export interface BillingMeters { + /** + * Get all billingMeters for a location. + * @param location The name of Azure region. + * @param options The options parameters. + */ + get( + location: string, + options?: BillingMetersGetOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts new file mode 100644 index 000000000000..7770413e4575 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts @@ -0,0 +1,134 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ConnectedEnvironment, + ConnectedEnvironmentsListBySubscriptionOptionalParams, + ConnectedEnvironmentsListByResourceGroupOptionalParams, + ConnectedEnvironmentsGetOptionalParams, + ConnectedEnvironmentsGetResponse, + ConnectedEnvironmentsCreateOrUpdateOptionalParams, + ConnectedEnvironmentsCreateOrUpdateResponse, + ConnectedEnvironmentsDeleteOptionalParams, + ConnectedEnvironmentsUpdateOptionalParams, + ConnectedEnvironmentsUpdateResponse, + CheckNameAvailabilityRequest, + ConnectedEnvironmentsCheckNameAvailabilityOptionalParams, + ConnectedEnvironmentsCheckNameAvailabilityResponse +} from "../models"; + +/// +/** Interface representing a ConnectedEnvironments. */ +export interface ConnectedEnvironments { + /** + * Get all connectedEnvironments for a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ConnectedEnvironmentsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get all connectedEnvironments in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ConnectedEnvironmentsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the properties of an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsGetOptionalParams + ): Promise; + /** + * Creates or updates an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param environmentEnvelope Configuration details of the connectedEnvironment. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + environmentEnvelope: ConnectedEnvironment, + options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ConnectedEnvironmentsCreateOrUpdateResponse + > + >; + /** + * Creates or updates an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param environmentEnvelope Configuration details of the connectedEnvironment. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + environmentEnvelope: ConnectedEnvironment, + options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete an connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDeleteOptionalParams + ): Promise; + /** + * Patches a Managed Environment. Only patching of tags is supported currently + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connectedEnvironment. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsUpdateOptionalParams + ): Promise; + /** + * Checks if resource connectedEnvironmentName is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Managed Environment. + * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. + * @param options The options parameters. + */ + checkNameAvailability( + resourceGroupName: string, + connectedEnvironmentName: string, + checkNameAvailabilityRequest: CheckNameAvailabilityRequest, + options?: ConnectedEnvironmentsCheckNameAvailabilityOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts new file mode 100644 index 000000000000..046c23eced28 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Certificate, + ConnectedEnvironmentsCertificatesListOptionalParams, + ConnectedEnvironmentsCertificatesGetOptionalParams, + ConnectedEnvironmentsCertificatesGetResponse, + ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, + ConnectedEnvironmentsCertificatesCreateOrUpdateResponse, + ConnectedEnvironmentsCertificatesDeleteOptionalParams, + CertificatePatch, + ConnectedEnvironmentsCertificatesUpdateOptionalParams, + ConnectedEnvironmentsCertificatesUpdateResponse +} from "../models"; + +/// +/** Interface representing a ConnectedEnvironmentsCertificates. */ +export interface ConnectedEnvironmentsCertificates { + /** + * Get the Certificates in a given connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsCertificatesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesGetOptionalParams + ): Promise; + /** + * Create or Update a Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams + ): Promise; + /** + * Patches a certificate. Currently only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + certificateEnvelope: CertificatePatch, + options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts new file mode 100644 index 000000000000..ff513aad5163 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DaprComponent, + ConnectedEnvironmentsDaprComponentsListOptionalParams, + ConnectedEnvironmentsDaprComponentsGetOptionalParams, + ConnectedEnvironmentsDaprComponentsGetResponse, + ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, + ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse, + ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, + ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams, + ConnectedEnvironmentsDaprComponentsListSecretsResponse +} from "../models"; + +/// +/** Interface representing a ConnectedEnvironmentsDaprComponents. */ +export interface ConnectedEnvironmentsDaprComponents { + /** + * Get the Dapr Components for a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsDaprComponentsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsGetOptionalParams + ): Promise; + /** + * Creates or updates a Dapr Component in a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + daprComponentEnvelope: DaprComponent, + options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Dapr Component from a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams + ): Promise; + /** + * List secrets for a dapr component + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.ts new file mode 100644 index 000000000000..caa3b49e4af7 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.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 { + ConnectedEnvironmentsStoragesListOptionalParams, + ConnectedEnvironmentsStoragesListResponse, + ConnectedEnvironmentsStoragesGetOptionalParams, + ConnectedEnvironmentsStoragesGetResponse, + ConnectedEnvironmentStorage, + ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, + ConnectedEnvironmentsStoragesCreateOrUpdateResponse, + ConnectedEnvironmentsStoragesDeleteOptionalParams +} from "../models"; + +/** Interface representing a ConnectedEnvironmentsStorages. */ +export interface ConnectedEnvironmentsStorages { + /** + * Get all storages for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + connectedEnvironmentName: string, + options?: ConnectedEnvironmentsStoragesListOptionalParams + ): Promise; + /** + * Get storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + options?: ConnectedEnvironmentsStoragesGetOptionalParams + ): Promise; + /** + * Create or update storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + storageEnvelope: ConnectedEnvironmentStorage, + options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + options?: ConnectedEnvironmentsStoragesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts index abbeaa8edd1e..e891805063ca 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts @@ -21,7 +21,9 @@ import { ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, - ContainerAppsListSecretsResponse + ContainerAppsListSecretsResponse, + ContainerAppsGetAuthTokenOptionalParams, + ContainerAppsGetAuthTokenResponse } from "../models"; /// @@ -155,4 +157,15 @@ export interface ContainerApps { containerAppName: string, options?: ContainerAppsListSecretsOptionalParams ): Promise; + /** + * Get auth token for a container app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + getAuthToken( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsGetAuthTokenOptionalParams + ): Promise; } diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsDiagnostics.ts new file mode 100644 index 000000000000..dc92fee57eb2 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsDiagnostics.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Diagnostics, + ContainerAppsDiagnosticsListDetectorsOptionalParams, + Revision, + ContainerAppsDiagnosticsListRevisionsOptionalParams, + ContainerAppsDiagnosticsGetDetectorOptionalParams, + ContainerAppsDiagnosticsGetDetectorResponse, + ContainerAppsDiagnosticsGetRevisionOptionalParams, + ContainerAppsDiagnosticsGetRevisionResponse, + ContainerAppsDiagnosticsGetRootOptionalParams, + ContainerAppsDiagnosticsGetRootResponse +} from "../models"; + +/// +/** Interface representing a ContainerAppsDiagnostics. */ +export interface ContainerAppsDiagnostics { + /** + * Get the list of diagnostics for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which detector info is needed. + * @param options The options parameters. + */ + listDetectors( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListDetectorsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the Revisions for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param options The options parameters. + */ + listRevisions( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsListRevisionsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a diagnostics result of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param detectorName Name of the Container App Detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + containerAppName: string, + detectorName: string, + options?: ContainerAppsDiagnosticsGetDetectorOptionalParams + ): Promise; + /** + * Get a revision of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @param options The options parameters. + */ + getRevision( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + options?: ContainerAppsDiagnosticsGetRevisionOptionalParams + ): Promise; + /** + * Get the properties of a Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsDiagnosticsGetRootOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index 6b480d5a26e4..cb79504dd5c6 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -11,9 +11,18 @@ export * from "./containerApps"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./daprComponents"; +export * from "./containerAppsDiagnostics"; +export * from "./managedEnvironmentDiagnostics"; +export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./namespaces"; export * from "./managedEnvironmentsStorages"; export * from "./containerAppsSourceControls"; +export * from "./connectedEnvironments"; +export * from "./connectedEnvironmentsCertificates"; +export * from "./connectedEnvironmentsDaprComponents"; +export * from "./connectedEnvironmentsStorages"; +export * from "./availableWorkloadProfiles"; +export * from "./billingMeters"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentDiagnostics.ts new file mode 100644 index 000000000000..35c897c7cf40 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentDiagnostics.ts @@ -0,0 +1,42 @@ +/* + * 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 { + ManagedEnvironmentDiagnosticsListDetectorsOptionalParams, + ManagedEnvironmentDiagnosticsListDetectorsResponse, + ManagedEnvironmentDiagnosticsGetDetectorOptionalParams, + ManagedEnvironmentDiagnosticsGetDetectorResponse +} from "../models"; + +/** Interface representing a ManagedEnvironmentDiagnostics. */ +export interface ManagedEnvironmentDiagnostics { + /** + * Get the list of diagnostics for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + listDetectors( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + ): Promise; + /** + * Get the diagnostics data for a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param detectorName Name of the Managed Environment detector. + * @param options The options parameters. + */ + getDetector( + resourceGroupName: string, + environmentName: string, + detectorName: string, + options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts index bbb4449aa607..3d1ad4f5b196 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts @@ -17,7 +17,9 @@ import { ManagedEnvironmentsCreateOrUpdateOptionalParams, ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, - ManagedEnvironmentsUpdateOptionalParams + ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsGetAuthTokenOptionalParams, + ManagedEnvironmentsGetAuthTokenResponse } from "../models"; /// @@ -129,4 +131,15 @@ export interface ManagedEnvironments { environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams ): Promise; + /** + * Checks if resource name is available. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + getAuthToken( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsGetAuthTokenOptionalParams + ): Promise; } diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsDiagnostics.ts new file mode 100644 index 000000000000..a90da24cf5ac --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentsDiagnostics.ts @@ -0,0 +1,27 @@ +/* + * 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 { + ManagedEnvironmentsDiagnosticsGetRootOptionalParams, + ManagedEnvironmentsDiagnosticsGetRootResponse +} from "../models"; + +/** Interface representing a ManagedEnvironmentsDiagnostics. */ +export interface ManagedEnvironmentsDiagnostics { + /** + * Get the properties of a Managed Environment used to host container apps. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param options The options parameters. + */ + getRoot( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentsDiagnosticsGetRootOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts b/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts deleted file mode 100644 index a9454b0124aa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts +++ /dev/null @@ -1,124 +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 { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert, use } from "chai"; -import { Context } from "mocha"; -import { ContainerAppsAPIClient } from "../src/containerAppsAPIClient"; -import { ContainerApp, ManagedEnvironment } from "../src/models"; - -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 -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("AppContainer test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ContainerAppsAPIClient; - let location: string; - let resourceGroup: string; - let containerAppName: string; - let environmentEnvelope: ManagedEnvironment; - let containerAppEnvelope: ContainerApp; - let environmentName: 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 ContainerAppsAPIClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - containerAppName = "mycontainerappxxx"; - environmentName = "testcontainerenv12"; - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("managedEnvironments create test", async function () { - environmentEnvelope = { - location: "East US", - zoneRedundant: false - }; - const res = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroup, - environmentName, - environmentEnvelope, - testPollingOptions - ); - assert.equal(res.name, environmentName); - }) - - it("containerApp create test", async function () { - containerAppEnvelope = { - "location": location, - "managedEnvironmentId": "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.App/managedEnvironments/" + environmentName, - template: { - containers: [ - { - name: "simple-hello-world-container", - image: "mcr.microsoft.com/azuredocs/containerapps-helloworld", - resources: { - cpu: 0.25, - memory: "0.5Gi" - } - } - ] - } - } - const res = await client.containerApps.beginCreateOrUpdateAndWait(resourceGroup, containerAppName, containerAppEnvelope, testPollingOptions); - assert.equal(res.name, containerAppName); - }); - - it("containerapp list Secrets test", async function () { - const res = await client.containerApps.listSecrets( - resourceGroup, - containerAppName - ); - }); - - it("containerapp delete test", async function () { - const res = await client.containerApps.beginDeleteAndWait(resourceGroup, containerAppName); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }) - - it("managedEnvironments delete test", async function () { - const res = await client.managedEnvironments.beginDeleteAndWait(resourceGroup, environmentName); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }) -}) diff --git a/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/appcontainers/arm-appcontainers/tsconfig.json b/sdk/appcontainers/arm-appcontainers/tsconfig.json index 00a8ff1127f8..3e6ae96443f3 100644 --- a/sdk/appcontainers/arm-appcontainers/tsconfig.json +++ b/sdk/appcontainers/arm-appcontainers/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appcontainers": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"