diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a0121f606644..0aba2c3eef01 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2188,7 +2188,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/chai-as-promised/7.1.5: @@ -2210,7 +2210,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/cookie/0.4.1: @@ -2220,7 +2220,7 @@ packages: /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/debug/4.1.7: @@ -2232,7 +2232,7 @@ packages: /@types/decompress/4.2.4: resolution: {integrity: sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/eslint/8.4.10: @@ -2253,7 +2253,7 @@ packages: /@types/express-serve-static-core/4.17.34: resolution: {integrity: sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -2271,13 +2271,13 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/inquirer/8.2.6: @@ -2290,7 +2290,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/json-schema/7.0.11: @@ -2304,13 +2304,13 @@ packages: /@types/jsonwebtoken/9.0.2: resolution: {integrity: sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/jws/3.2.5: resolution: {integrity: sha512-xGTxZH34xOryaTN8CMsvhh9lfNqFuHiMoRvsLYWQdBJHqiECyfInXVl2eK8Jz2emxZWMIn5RBlmr3oDVPeWujw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/linkify-it/3.0.2: @@ -2361,13 +2361,13 @@ packages: /@types/mysql/2.15.19: resolution: {integrity: sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/node-fetch/2.6.3: resolution: {integrity: sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 form-data: 3.0.1 dev: false @@ -2392,7 +2392,7 @@ packages: /@types/pg/8.6.1: resolution: {integrity: sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -2420,7 +2420,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/semaphore/1.1.1: @@ -2439,14 +2439,14 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/serve-static/1.15.1: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/sinon/10.0.14: @@ -2468,13 +2468,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/tough-cookie/4.0.2: @@ -2488,7 +2488,7 @@ packages: /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/underscore/1.11.4: @@ -2506,19 +2506,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false /@types/yargs-parser/21.0.0: @@ -2535,7 +2535,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.46 + '@types/node': 16.18.28 dev: false optional: true @@ -3540,7 +3540,7 @@ packages: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) dependencies: - ms: 2.1.1 + ms: 2.1.3 dev: false /debug/3.2.7: @@ -3771,7 +3771,7 @@ packages: dependencies: semver: 7.5.0 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230511 + typescript: 5.1.0-dev.20230512 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3822,7 +3822,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.13 - '@types/node': 14.18.46 + '@types/node': 16.18.28 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4746,7 +4746,7 @@ packages: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.0.4 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 dev: false @@ -7043,7 +7043,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 14.18.46 + '@types/node': 16.18.28 long: 5.2.3 dev: false @@ -8315,8 +8315,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230511: - resolution: {integrity: sha512-T/GsNgbl4YWUZwSxCrj9uq2aIj7OC/5EyXqj4exIhRbwZEpjPIflv2TEqm6K5fFQhqKQpFATE8OBvY0Qzu8D1A==} + /typescript/5.1.0-dev.20230512: + resolution: {integrity: sha512-b0Naij+j/zOXP1SQzlvqlOh60vHqwsGoifrXLOHZ4KSSnbi+0herOKPJ4TTp+tV2K7P/UddA3T67kyt870Y07A==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -9643,7 +9643,7 @@ packages: dev: false file:projects/arm-appcontainers.tgz: - resolution: {integrity: sha512-Y+7qoYooR/RSWC+c5eY1tuqDrWkfi3rrYurtduo+UbEm3RHLEtWqvdlGu+6hmgEf/On6nfEdjC3BP1S8I/Tn7A==, tarball: file:projects/arm-appcontainers.tgz} + resolution: {integrity: sha512-uAOkD27upohdOThqbIl2os/xM2JDD25U06JwRsJUy3yyRkXQ1ST2ts8mUFZBlabjjAuzHXnXEn0KdAocezLytA==, tarball: file:projects/arm-appcontainers.tgz} name: '@rush-temp/arm-appcontainers' version: 0.0.0 dependencies: @@ -9657,13 +9657,14 @@ packages: '@types/node': 14.18.46 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.0.3 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_m742s5qpci6ulntpyriekwplh4 tslib: 2.5.0 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index 98a67f4cb998..c279233a0036 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,30 +1,21 @@ # Release History - -## 2.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.2 (2022-11-15) - - Bugs Fixed - -## 2.0.0-beta.1 (2022-10-12) - +## 2.0.0-beta.3 (2023-05-12) + **Features** - Added operation group AvailableWorkloadProfiles - Added operation group BillingMeters + - Added operation group Builders + - Added operation group Builds - Added operation group ConnectedEnvironments - Added operation group ConnectedEnvironmentsCertificates - Added operation group ConnectedEnvironmentsDaprComponents - Added operation group ConnectedEnvironmentsStorages - Added operation group ContainerAppsDiagnostics + - Added operation group Jobs + - Added operation group JobsExecutions + - Added operation group ManagedCertificates - Added operation group ManagedEnvironmentDiagnostics - Added operation group ManagedEnvironmentsDiagnostics - Added operation ContainerApps.getAuthToken @@ -40,6 +31,30 @@ - Added Interface BillingMeterCollection - Added Interface BillingMeterProperties - Added Interface BillingMetersGetOptionalParams + - Added Interface BuildCollection + - Added Interface BuildConfiguration + - Added Interface BuilderCollection + - Added Interface BuilderResource + - Added Interface BuilderResourceUpdate + - Added Interface BuildersCreateOrUpdateHeaders + - Added Interface BuildersCreateOrUpdateOptionalParams + - Added Interface BuildersDeleteHeaders + - Added Interface BuildersDeleteOptionalParams + - Added Interface BuildersGetOptionalParams + - Added Interface BuildersListByResourceGroupNextOptionalParams + - Added Interface BuildersListByResourceGroupOptionalParams + - Added Interface BuildersListBySubscriptionNextOptionalParams + - Added Interface BuildersListBySubscriptionOptionalParams + - Added Interface BuildersUpdateHeaders + - Added Interface BuildersUpdateOptionalParams + - Added Interface BuildResource + - Added Interface BuildsCreateOrUpdateHeaders + - Added Interface BuildsCreateOrUpdateOptionalParams + - Added Interface BuildsDeleteHeaders + - Added Interface BuildsDeleteOptionalParams + - Added Interface BuildsGetOptionalParams + - Added Interface BuildsListByBuilderResourceNextOptionalParams + - Added Interface BuildsListByBuilderResourceOptionalParams - Added Interface ConnectedEnvironment - Added Interface ConnectedEnvironmentCollection - Added Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams @@ -56,6 +71,7 @@ - Added Interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams - Added Interface ConnectedEnvironmentsDaprComponentsListOptionalParams - Added Interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams + - Added Interface ConnectedEnvironmentsDeleteHeaders - Added Interface ConnectedEnvironmentsDeleteOptionalParams - Added Interface ConnectedEnvironmentsGetOptionalParams - Added Interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams @@ -71,6 +87,8 @@ - Added Interface ConnectedEnvironmentStoragesCollection - Added Interface ConnectedEnvironmentsUpdateOptionalParams - Added Interface ContainerAppAuthToken + - Added Interface ContainerAppJobExecutions + - Added Interface ContainerAppsDeleteHeaders - Added Interface ContainerAppsDiagnosticsGetDetectorOptionalParams - Added Interface ContainerAppsDiagnosticsGetRevisionOptionalParams - Added Interface ContainerAppsDiagnosticsGetRootOptionalParams @@ -79,9 +97,13 @@ - Added Interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams - Added Interface ContainerAppsGetAuthTokenOptionalParams + - Added Interface ContainerAppsUpdateHeaders + - Added Interface ContainerRegistryWithCustomImage + - Added Interface CorsPolicy - Added Interface CustomDomainConfiguration - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem + - Added Interface DaprConfiguration - Added Interface DaprSecret - Added Interface DiagnosticDataProviderMetadata - Added Interface DiagnosticDataProviderMetadataPropertyBagItem @@ -96,31 +118,90 @@ - Added Interface DiagnosticsStatus - Added Interface DiagnosticSupportTopic - Added Interface EnvironmentAuthToken - - Added Interface EnvironmentSkuProperties + - Added Interface EnvironmentVariable - Added Interface ErrorAdditionalInfo - Added Interface ErrorDetail - Added Interface ErrorResponse - Added Interface ExtendedLocation + - Added Interface HttpGet + - Added Interface IngressStickySessions - Added Interface InitContainer - Added Interface IpSecurityRestrictionRule + - Added Interface Job + - Added Interface JobConfiguration + - Added Interface JobConfigurationManualTriggerConfig + - Added Interface JobConfigurationScheduleTriggerConfig + - Added Interface JobExecution + - Added Interface JobExecutionBase + - Added Interface JobExecutionContainer + - Added Interface JobExecutionNamesCollection + - Added Interface JobExecutionTemplate + - Added Interface JobPatchProperties + - Added Interface JobPatchPropertiesProperties + - Added Interface JobsCollection + - Added Interface JobsCreateOrUpdateOptionalParams + - Added Interface JobsDeleteHeaders + - Added Interface JobsDeleteOptionalParams + - Added Interface JobSecretsCollection + - Added Interface JobsExecutionsListNextOptionalParams + - Added Interface JobsExecutionsListOptionalParams + - Added Interface JobsGetOptionalParams + - Added Interface JobsListByResourceGroupNextOptionalParams + - Added Interface JobsListByResourceGroupOptionalParams + - Added Interface JobsListBySubscriptionNextOptionalParams + - Added Interface JobsListBySubscriptionOptionalParams + - Added Interface JobsListSecretsOptionalParams + - Added Interface JobsStartHeaders + - Added Interface JobsStartOptionalParams + - Added Interface JobsStopExecutionHeaders + - Added Interface JobsStopExecutionOptionalParams + - Added Interface JobsStopMultipleExecutionsHeaders + - Added Interface JobsStopMultipleExecutionsOptionalParams + - Added Interface JobsUpdateHeaders + - Added Interface JobsUpdateOptionalParams + - Added Interface JobTemplate + - Added Interface KedaConfiguration + - Added Interface ManagedCertificate + - Added Interface ManagedCertificateCollection + - Added Interface ManagedCertificatePatch + - Added Interface ManagedCertificateProperties + - Added Interface ManagedCertificatesCreateOrUpdateOptionalParams + - Added Interface ManagedCertificatesDeleteOptionalParams + - Added Interface ManagedCertificatesGetOptionalParams + - Added Interface ManagedCertificatesListNextOptionalParams + - Added Interface ManagedCertificatesListOptionalParams + - Added Interface ManagedCertificatesUpdateOptionalParams - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams - - Added Interface ManagedEnvironmentOutboundSettings - Added Interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams - Added Interface ManagedEnvironmentsGetAuthTokenOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesNextOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesOptionalParams + - Added Interface PreBuildStep + - Added Interface SecretVolumeItem - Added Interface TcpScaleRule - Added Interface WorkloadProfile - Added Interface WorkloadProfileStates - Added Interface WorkloadProfileStatesCollection - Added Interface WorkloadProfileStatesProperties - Added Type Alias Action + - Added Type Alias Affinity - Added Type Alias Applicability - Added Type Alias AvailableWorkloadProfilesGetNextResponse - Added Type Alias AvailableWorkloadProfilesGetResponse - Added Type Alias BillingMetersGetResponse - - Added Type Alias Category + - Added Type Alias BuildersCreateOrUpdateResponse + - Added Type Alias BuildersGetResponse + - Added Type Alias BuildersListByResourceGroupNextResponse + - Added Type Alias BuildersListByResourceGroupResponse + - Added Type Alias BuildersListBySubscriptionNextResponse + - Added Type Alias BuildersListBySubscriptionResponse + - Added Type Alias BuildersUpdateResponse + - Added Type Alias BuildsCreateOrUpdateResponse + - Added Type Alias BuildsGetResponse + - Added Type Alias BuildsListByBuilderResourceNextResponse + - Added Type Alias BuildsListByBuilderResourceResponse + - Added Type Alias BuildStatus - Added Type Alias ConnectedEnvironmentProvisioningState - Added Type Alias ConnectedEnvironmentsCertificatesCreateOrUpdateResponse - Added Type Alias ConnectedEnvironmentsCertificatesGetResponse @@ -143,6 +224,8 @@ - Added Type Alias ConnectedEnvironmentsStoragesGetResponse - Added Type Alias ConnectedEnvironmentsStoragesListResponse - Added Type Alias ConnectedEnvironmentsUpdateResponse + - Added Type Alias ContainerAppContainerRunningState + - Added Type Alias ContainerAppReplicaRunningState - Added Type Alias ContainerAppsDiagnosticsGetDetectorResponse - Added Type Alias ContainerAppsDiagnosticsGetRevisionResponse - Added Type Alias ContainerAppsDiagnosticsGetRootResponse @@ -151,69 +234,109 @@ - Added Type Alias ContainerAppsDiagnosticsListRevisionsNextResponse - Added Type Alias ContainerAppsDiagnosticsListRevisionsResponse - Added Type Alias ContainerAppsGetAuthTokenResponse + - Added Type Alias ContainerAppsUpdateResponse - Added Type Alias ExtendedLocationTypes + - Added Type Alias IngressClientCertificateMode + - Added Type Alias JobExecutionRunningState + - Added Type Alias JobProvisioningState + - Added Type Alias JobsCreateOrUpdateResponse + - Added Type Alias JobsExecutionsListNextResponse + - Added Type Alias JobsExecutionsListResponse + - Added Type Alias JobsGetResponse + - Added Type Alias JobsListByResourceGroupNextResponse + - Added Type Alias JobsListByResourceGroupResponse + - Added Type Alias JobsListBySubscriptionNextResponse + - Added Type Alias JobsListBySubscriptionResponse + - Added Type Alias JobsListSecretsResponse + - Added Type Alias JobsStartResponse + - Added Type Alias JobsStopMultipleExecutionsResponse + - Added Type Alias JobsUpdateResponse - Added Type Alias LogLevel + - Added Type Alias ManagedCertificateDomainControlValidation + - Added Type Alias ManagedCertificatesCreateOrUpdateResponse + - Added Type Alias ManagedCertificatesGetResponse + - Added Type Alias ManagedCertificatesListNextResponse + - Added Type Alias ManagedCertificatesListResponse + - Added Type Alias ManagedCertificatesUpdateResponse - Added Type Alias ManagedEnvironmentDiagnosticsGetDetectorResponse - Added Type Alias ManagedEnvironmentDiagnosticsListDetectorsResponse - - Added Type Alias ManagedEnvironmentOutBoundType - Added Type Alias ManagedEnvironmentsDiagnosticsGetRootResponse - Added Type Alias ManagedEnvironmentsGetAuthTokenResponse - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesNextResponse - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesResponse - - Added Type Alias SkuName + - Added Type Alias ManagedEnvironmentsUpdateResponse + - Added Type Alias ProvisioningState + - Added Type Alias TriggerType - 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 ContainerApp has a new optional parameter latestReadyRevisionName + - Interface ContainerApp has a new optional parameter managedBy + - Interface ContainerApp has a new optional parameter workloadProfileName + - Interface ContainerAppSecret has a new optional parameter identity + - Interface ContainerAppSecret has a new optional parameter keyVaultUrl - 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 clientCertificateMode + - Interface Ingress has a new optional parameter corsPolicy - Interface Ingress has a new optional parameter exposedPort - Interface Ingress has a new optional parameter ipSecurityRestrictions + - Interface Ingress has a new optional parameter stickySessions - Interface ManagedEnvironment has a new optional parameter customDomainConfiguration + - Interface ManagedEnvironment has a new optional parameter daprConfiguration - Interface ManagedEnvironment has a new optional parameter eventStreamEndpoint - - Interface ManagedEnvironment has a new optional parameter sku + - Interface ManagedEnvironment has a new optional parameter infrastructureResourceGroup + - Interface ManagedEnvironment has a new optional parameter kedaConfiguration + - Interface ManagedEnvironment has a new optional parameter kind - Interface ManagedEnvironment has a new optional parameter workloadProfiles + - Interface Replica has a new optional parameter initContainers + - Interface Replica has a new optional parameter runningState + - Interface Replica has a new optional parameter runningStateDetails - Interface ReplicaContainer has a new optional parameter execEndpoint - Interface ReplicaContainer has a new optional parameter logStreamEndpoint + - Interface ReplicaContainer has a new optional parameter runningState + - Interface ReplicaContainer has a new optional parameter runningStateDetails - Interface Revision has a new optional parameter lastActiveTime - Interface ScaleRule has a new optional parameter tcp + - Interface Secret has a new optional parameter identity + - Interface Secret has a new optional parameter keyVaultUrl - 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 + - Interface Template has a new optional parameter terminationGracePeriodSeconds + - Interface Volume has a new optional parameter mountOptions + - Interface Volume has a new optional parameter secrets + - Interface VolumeMount has a new optional parameter subPath - Added Enum KnownAction + - Added Enum KnownAffinity - Added Enum KnownApplicability - - Added Enum KnownCategory + - Added Enum KnownBuildStatus - Added Enum KnownConnectedEnvironmentProvisioningState + - Added Enum KnownContainerAppContainerRunningState + - Added Enum KnownContainerAppReplicaRunningState - Added Enum KnownExtendedLocationTypes + - Added Enum KnownIngressClientCertificateMode + - Added Enum KnownJobExecutionRunningState + - Added Enum KnownJobProvisioningState - Added Enum KnownLogLevel - - Added Enum KnownManagedEnvironmentOutBoundType - - Added Enum KnownSkuName + - Added Enum KnownManagedCertificateDomainControlValidation + - Added Enum KnownProvisioningState + - Added Enum KnownTriggerType - Enum KnownContainerAppProvisioningState has a new value Deleting - Enum KnownIngressTransportMethod has a new value Tcp + - Enum KnownStorageType has a new value Secret + - Added function getContinuationToken **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 + - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter + - Interface VnetConfiguration no longer has parameter runtimeSubnetId + - Type of parameter customDomainVerificationFailureInfo of interface CustomHostnameAnalysisResult is changed from DefaultErrorResponse to CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo + - Type of parameter value of interface DaprSecretsCollection is changed from Secret[] to DaprSecret[] ## 1.1.2 (2022-10-08) diff --git a/sdk/appcontainers/arm-appcontainers/LICENSE b/sdk/appcontainers/arm-appcontainers/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/appcontainers/arm-appcontainers/LICENSE +++ b/sdk/appcontainers/arm-appcontainers/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 6d8ce1b79782..ef256ee8c421 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d0965e7f28fc087c87c7411a14d8acdc8f37252e", - "readme": "specification\\app\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "commit": "5982e482f8edb83a94a2f4239c760240a44abe42", + "readme": "specification/app/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/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.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/assets.json b/sdk/appcontainers/arm-appcontainers/assets.json deleted file mode 100644 index 16f493a43024..000000000000 --- a/sdk/appcontainers/arm-appcontainers/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/appcontainers/arm-appcontainers", - "Tag": "js/appcontainers/arm-appcontainers_c6a3a024d0" -} diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index bc0337e743bc..3a1f2bf307af 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -8,10 +8,10 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers" +} \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md index 976a7827b3b1..0e3da29c5da0 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type AccessMode = string; @@ -19,6 +19,9 @@ export type Action = string; // @public export type ActiveRevisionsMode = string; +// @public +export type Affinity = string; + // @public export interface AllowedAudiencesValidation { allowedAudiences?: string[]; @@ -97,7 +100,7 @@ export interface AvailableWorkloadProfile extends ProxyResource { // @public export interface AvailableWorkloadProfileProperties { applicability?: Applicability; - billingMeterCategory?: Category; + category?: string; cores?: number; displayName?: string; memoryGiB?: number; @@ -211,7 +214,7 @@ export interface BillingMeterCollection { // @public export interface BillingMeterProperties { - category?: Category; + category?: string; displayName?: string; meterType?: string; } @@ -232,7 +235,203 @@ export type BillingMetersGetResponse = BillingMeterCollection; export type BindingType = string; // @public -export type Category = string; +export interface BuildCollection { + nextLink?: string; + value: BuildResource[]; +} + +// @public +export interface BuildConfiguration { + baseOs?: string; + environmentVariables?: EnvironmentVariable[]; + platform?: string; + platformVersion?: string; + preBuildSteps?: PreBuildStep[]; +} + +// @public +export interface BuilderCollection { + nextLink?: string; + value: BuilderResource[]; +} + +// @public +export interface BuilderResource extends TrackedResource { + readonly buildComputeId?: string; + environmentId?: string; + identity?: ManagedServiceIdentity; + readonly patchComputeId?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface BuilderResourceUpdate { + environmentId?: string; + identity?: ManagedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Builders { + beginCreateOrUpdate(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResource, options?: BuildersCreateOrUpdateOptionalParams): Promise, BuildersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResource, options?: BuildersCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, builderName: string, options?: BuildersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, options?: BuildersDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResourceUpdate, options?: BuildersUpdateOptionalParams): Promise, BuildersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResourceUpdate, options?: BuildersUpdateOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, options?: BuildersGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: BuildersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: BuildersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BuildersCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface BuildersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersCreateOrUpdateResponse = BuilderResource; + +// @public +export interface BuildersDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BuildersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersGetResponse = BuilderResource; + +// @public +export interface BuildersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListByResourceGroupNextResponse = BuilderCollection; + +// @public +export interface BuildersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListByResourceGroupResponse = BuilderCollection; + +// @public +export interface BuildersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListBySubscriptionNextResponse = BuilderCollection; + +// @public +export interface BuildersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListBySubscriptionResponse = BuilderCollection; + +// @public +export interface BuildersUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersUpdateResponse = BuilderResource; + +// @public +export interface BuildResource extends ProxyResource { + readonly buildStatus?: BuildStatus; + configuration?: BuildConfiguration; + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + readonly provisioningState?: ProvisioningState; + readonly uploadEndpoint?: string; +} + +// @public +export interface Builds { + beginCreateOrUpdate(resourceGroupName: string, builderName: string, buildName: string, buildEnvelope: BuildResource, options?: BuildsCreateOrUpdateOptionalParams): Promise, BuildsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, builderName: string, buildName: string, buildEnvelope: BuildResource, options?: BuildsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsGetOptionalParams): Promise; + listByBuilderResource(resourceGroupName: string, builderName: string, options?: BuildsListByBuilderResourceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BuildsCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface BuildsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildsCreateOrUpdateResponse = BuildResource; + +// @public +export interface BuildsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BuildsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsGetResponse = BuildResource; + +// @public +export interface BuildsListByBuilderResourceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsListByBuilderResourceNextResponse = BuildCollection; + +// @public +export interface BuildsListByBuilderResourceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsListByBuilderResourceResponse = BuildCollection; + +// @public +export type BuildStatus = string; // @public export interface Certificate extends TrackedResource { @@ -373,9 +572,9 @@ export type ConnectedEnvironmentProvisioningState = string; // @public export interface ConnectedEnvironments { - beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsCreateOrUpdateResponse>>; + 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>>; + 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; @@ -497,6 +696,12 @@ export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams ex // @public export type ConnectedEnvironmentsDaprComponentsListSecretsResponse = DaprSecretsCollection; +// @public +export interface ConnectedEnvironmentsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ConnectedEnvironmentsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -606,13 +811,15 @@ export interface ContainerApp extends TrackedResource { readonly eventStreamEndpoint?: string; extendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; + readonly latestReadyRevisionName?: string; readonly latestRevisionFqdn?: string; readonly latestRevisionName?: string; + managedBy?: string; managedEnvironmentId?: string; readonly outboundIpAddresses?: string[]; readonly provisioningState?: ContainerAppProvisioningState; template?: Template; - workloadProfileType?: string; + workloadProfileName?: string; } // @public @@ -627,6 +834,15 @@ export interface ContainerAppCollection { value: ContainerApp[]; } +// @public +export type ContainerAppContainerRunningState = string; + +// @public +export interface ContainerAppJobExecutions { + readonly nextLink?: string; + value: JobExecution[]; +} + // @public export interface ContainerAppProbe { failureThreshold?: number; @@ -664,14 +880,17 @@ export interface ContainerAppProbeTcpSocket { // @public export type ContainerAppProvisioningState = string; +// @public +export type ContainerAppReplicaRunningState = string; + // @public export interface ContainerApps { - beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise, ContainerAppsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise, ContainerAppsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, void>>; - beginUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, ContainerAppsUpdateResponse>>; + 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; @@ -692,6 +911,10 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) billingMeters: BillingMeters; // (undocumented) + builders: Builders; + // (undocumented) + builds: Builds; + // (undocumented) certificates: Certificates; // (undocumented) connectedEnvironments: ConnectedEnvironments; @@ -716,6 +939,12 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) daprComponents: DaprComponents; // (undocumented) + jobs: Jobs; + // (undocumented) + jobsExecutions: JobsExecutions; + // (undocumented) + managedCertificates: ManagedCertificates; + // (undocumented) managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; // (undocumented) managedEnvironments: ManagedEnvironments; @@ -787,6 +1016,12 @@ export interface ContainerAppsCreateOrUpdateOptionalParams extends coreClient.Op // @public export type ContainerAppsCreateOrUpdateResponse = ContainerApp; +// @public +export interface ContainerAppsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ContainerAppsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -839,7 +1074,6 @@ export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollectio // @public export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -855,6 +1089,8 @@ export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; // @public export interface ContainerAppSecret { + readonly identity?: string; + readonly keyVaultUrl?: string; readonly name?: string; readonly value?: string; } @@ -962,7 +1198,6 @@ export type ContainerAppsRevisionsGetRevisionResponse = Revision; // @public export interface ContainerAppsRevisionsListRevisionsNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -982,9 +1217,9 @@ export interface ContainerAppsRevisionsRestartRevisionOptionalParams extends cor // @public export interface ContainerAppsSourceControls { - beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise, ContainerAppsSourceControlsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise, ContainerAppsSourceControlsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams): Promise; get(resourceGroupName: string, containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsGetOptionalParams): Promise; listByContainerApp(resourceGroupName: string, containerAppName: string, options?: ContainerAppsSourceControlsListByContainerAppOptionalParams): PagedAsyncIterableIterator; @@ -1026,12 +1261,28 @@ export interface ContainerAppsSourceControlsListByContainerAppOptionalParams ext // @public export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; +// @public +export interface ContainerAppsUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type ContainerAppsUpdateResponse = ContainerApp; + +// @public +export interface ContainerRegistryWithCustomImage { + identity: string; + image?: string; + server: string; +} + // @public export interface ContainerResources { cpu?: number; @@ -1048,19 +1299,29 @@ export interface CookieExpiration { // @public export type CookieExpirationConvention = "FixedTime" | "IdentityProviderDerived"; +// @public +export interface CorsPolicy { + allowCredentials?: boolean; + allowedHeaders?: string[]; + allowedMethods?: string[]; + allowedOrigins: string[]; + exposeHeaders?: string[]; + maxAge?: number; +} + // @public export type CreatedByType = string; // @public export interface CustomDomain { bindingType?: BindingType; - certificateId: string; + certificateId?: string; name: string; } // @public export interface CustomDomainConfiguration { - certificatePassword?: Uint8Array; + certificatePassword?: string; certificateValue?: Uint8Array; readonly customDomainVerificationId?: string; dnsSuffix?: string; @@ -1194,6 +1455,11 @@ export interface DaprComponentsListSecretsOptionalParams extends coreClient.Oper // @public export type DaprComponentsListSecretsResponse = DaprSecretsCollection; +// @public +export interface DaprConfiguration { + readonly version?: string; +} + // @public export interface DaprMetadata { name?: string; @@ -1209,7 +1475,7 @@ export interface DaprSecret { // @public export interface DaprSecretsCollection { - value: Secret[]; + value: DaprSecret[]; } // @public @@ -1335,11 +1601,6 @@ export interface EnvironmentAuthToken extends TrackedResource { // @public export type EnvironmentProvisioningState = string; -// @public -export interface EnvironmentSkuProperties { - name: SkuName; -} - // @public export interface EnvironmentVar { name?: string; @@ -1347,6 +1608,12 @@ export interface EnvironmentVar { value?: string; } +// @public +export interface EnvironmentVariable { + name: string; + value: string; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -1431,6 +1698,13 @@ export interface Google { validation?: AllowedAudiencesValidation; } +// @public +export interface HttpGet { + fileName?: string; + headers?: string[]; + url: string; +} + // @public export interface HttpScaleRule { auth?: ScaleRuleAuth[]; @@ -1468,16 +1742,27 @@ export interface IdentityProviders { // @public export interface Ingress { allowInsecure?: boolean; + clientCertificateMode?: IngressClientCertificateMode; + corsPolicy?: CorsPolicy; customDomains?: CustomDomain[]; exposedPort?: number; external?: boolean; readonly fqdn?: string; ipSecurityRestrictions?: IpSecurityRestrictionRule[]; + stickySessions?: IngressStickySessions; targetPort?: number; traffic?: TrafficWeight[]; transport?: IngressTransportMethod; } +// @public +export type IngressClientCertificateMode = string; + +// @public +export interface IngressStickySessions { + affinity?: Affinity; +} + // @public export type IngressTransportMethod = string; @@ -1493,12 +1778,294 @@ export interface IpSecurityRestrictionRule { name: string; } +// @public +export interface Job extends TrackedResource { + configuration?: JobConfiguration; + environmentId?: string; + readonly eventStreamEndpoint?: string; + identity?: ManagedServiceIdentity; + readonly outboundIpAddresses?: string[]; + readonly provisioningState?: JobProvisioningState; + template?: JobTemplate; + workloadProfileName?: string; +} + +// @public +export interface JobConfiguration { + manualTriggerConfig?: JobConfigurationManualTriggerConfig; + registries?: RegistryCredentials[]; + replicaRetryLimit?: number; + replicaTimeout: number; + scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; + secrets?: Secret[]; + triggerType: TriggerType; +} + +// @public +export interface JobConfigurationManualTriggerConfig { + parallelism?: number; + replicaCompletionCount?: number; +} + +// @public +export interface JobConfigurationScheduleTriggerConfig { + cronExpression: string; + parallelism?: number; + replicaCompletionCount?: number; +} + +// @public +export interface JobExecution { + endTime?: Date; + id?: string; + name?: string; + startTime?: Date; + readonly status?: JobExecutionRunningState; + template?: JobExecutionTemplate; + type?: string; +} + +// @public +export interface JobExecutionBase { + id?: string; + name?: string; +} + +// @public +export interface JobExecutionContainer { + args?: string[]; + command?: string[]; + env?: EnvironmentVar[]; + image?: string; + name?: string; + resources?: ContainerResources; +} + +// @public +export interface JobExecutionNamesCollection { + value: JobExecutionBase[]; +} + +// @public +export type JobExecutionRunningState = string; + +// @public +export interface JobExecutionTemplate { + containers?: JobExecutionContainer[]; + initContainers?: JobExecutionContainer[]; +} + +// @public +export interface JobPatchProperties { + identity?: ManagedServiceIdentity; + // (undocumented) + properties?: JobPatchPropertiesProperties; + tags?: { + [propertyName: string]: string; + }; +} + +// @public (undocumented) +export interface JobPatchPropertiesProperties { + configuration?: JobConfiguration; + environmentId?: string; + eventStreamEndpoint?: string; + outboundIpAddresses?: string[]; + template?: JobTemplate; +} + +// @public +export type JobProvisioningState = string; + +// @public +export interface Jobs { + beginCreateOrUpdate(resourceGroupName: string, jobName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise, JobsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, jobName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise; + beginStart(resourceGroupName: string, jobName: string, template: JobExecutionTemplate, options?: JobsStartOptionalParams): Promise, JobsStartResponse>>; + beginStartAndWait(resourceGroupName: string, jobName: string, template: JobExecutionTemplate, options?: JobsStartOptionalParams): Promise; + beginStopExecution(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobsStopExecutionOptionalParams): Promise, void>>; + beginStopExecutionAndWait(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobsStopExecutionOptionalParams): Promise; + beginStopMultipleExecutions(resourceGroupName: string, jobName: string, jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; + beginStopMultipleExecutionsAndWait(resourceGroupName: string, jobName: string, jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams): Promise; + beginUpdate(resourceGroupName: string, jobName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise, JobsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, jobName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise; + get(resourceGroupName: string, jobName: string, options?: JobsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: JobsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: JobsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listSecrets(resourceGroupName: string, jobName: string, options?: JobsListSecretsOptionalParams): Promise; +} + +// @public +export interface JobsCollection { + readonly nextLink?: string; + value: Job[]; +} + +// @public +export interface JobsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsCreateOrUpdateResponse = Job; + +// @public +export interface JobsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface JobSecretsCollection { + value: Secret[]; +} + +// @public +export interface JobsExecutions { + list(resourceGroupName: string, jobName: string, options?: JobsExecutionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface JobsExecutionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; + +// @public +export interface JobsExecutionsListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type JobsExecutionsListResponse = ContainerAppJobExecutions; + +// @public +export interface JobsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsGetResponse = Job; + +// @public +export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListByResourceGroupNextResponse = JobsCollection; + +// @public +export interface JobsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListByResourceGroupResponse = JobsCollection; + +// @public +export interface JobsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListBySubscriptionNextResponse = JobsCollection; + +// @public +export interface JobsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListBySubscriptionResponse = JobsCollection; + +// @public +export interface JobsListSecretsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListSecretsResponse = JobSecretsCollection; + +// @public +export interface JobsStartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsStartResponse = JobExecutionBase; + +// @public +export interface JobsStopExecutionHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsStopExecutionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface JobsStopMultipleExecutionsHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsStopMultipleExecutionsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; + +// @public +export interface JobsUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JobsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsUpdateResponse = Job; + +// @public +export interface JobTemplate { + containers?: Container[]; + initContainers?: InitContainer[]; + volumes?: Volume[]; +} + // @public export interface JwtClaimChecks { allowedClientApplications?: string[]; allowedGroups?: string[]; } +// @public +export interface KedaConfiguration { + readonly version?: string; +} + // @public export enum KnownAccessMode { ReadOnly = "ReadOnly", @@ -1517,6 +2084,12 @@ export enum KnownActiveRevisionsMode { Single = "Single" } +// @public +export enum KnownAffinity { + None = "none", + Sticky = "sticky" +} + // @public export enum KnownApplicability { Custom = "Custom", @@ -1536,10 +2109,12 @@ export enum KnownBindingType { } // @public -export enum KnownCategory { - PremiumSkuComputeOptimized = "PremiumSkuComputeOptimized", - PremiumSkuGeneralPurpose = "PremiumSkuGeneralPurpose", - PremiumSkuMemoryOptimized = "PremiumSkuMemoryOptimized" +export enum KnownBuildStatus { + Canceled = "Canceled", + Failed = "Failed", + InProgress = "InProgress", + NotStarted = "NotStarted", + Succeeded = "Succeeded" } // @public @@ -1569,6 +2144,13 @@ export enum KnownConnectedEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownContainerAppContainerRunningState { + Running = "Running", + Terminated = "Terminated", + Waiting = "Waiting" +} + // @public export enum KnownContainerAppProvisioningState { Canceled = "Canceled", @@ -1578,6 +2160,13 @@ export enum KnownContainerAppProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownContainerAppReplicaRunningState { + NotRunning = "NotRunning", + Running = "Running", + Unknown = "Unknown" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -1605,6 +2194,13 @@ export enum KnownExtendedLocationTypes { CustomLocation = "CustomLocation" } +// @public +export enum KnownIngressClientCertificateMode { + Accept = "accept", + Ignore = "ignore", + Require = "require" +} + // @public export enum KnownIngressTransportMethod { Auto = "auto", @@ -1613,6 +2209,26 @@ export enum KnownIngressTransportMethod { Tcp = "tcp" } +// @public +export enum KnownJobExecutionRunningState { + Degraded = "Degraded", + Failed = "Failed", + Processing = "Processing", + Running = "Running", + Stopped = "Stopped", + Succeeded = "Succeeded", + Unknown = "Unknown" +} + +// @public +export enum KnownJobProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownLogLevel { Debug = "debug", @@ -1622,9 +2238,10 @@ export enum KnownLogLevel { } // @public -export enum KnownManagedEnvironmentOutBoundType { - LoadBalancer = "LoadBalancer", - UserDefinedRouting = "UserDefinedRouting" +export enum KnownManagedCertificateDomainControlValidation { + Cname = "CNAME", + Http = "HTTP", + TXT = "TXT" } // @public @@ -1635,6 +2252,15 @@ export enum KnownManagedServiceIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownRevisionHealthState { Healthy = "Healthy", @@ -1657,12 +2283,6 @@ export enum KnownScheme { Https = "HTTPS" } -// @public -export enum KnownSkuName { - Consumption = "Consumption", - Premium = "Premium" -} - // @public export enum KnownSourceControlOperationState { Canceled = "Canceled", @@ -1674,7 +2294,15 @@ export enum KnownSourceControlOperationState { // @public export enum KnownStorageType { AzureFile = "AzureFile", - EmptyDir = "EmptyDir" + EmptyDir = "EmptyDir", + Secret = "Secret" +} + +// @public +export enum KnownTriggerType { + Event = "Event", + Manual = "Manual", + Scheduled = "Scheduled" } // @public @@ -1712,17 +2340,102 @@ export interface LoginScopes { // @public export type LogLevel = string; +// @public +export interface ManagedCertificate extends TrackedResource { + properties?: ManagedCertificateProperties; +} + +// @public +export interface ManagedCertificateCollection { + readonly nextLink?: string; + value: ManagedCertificate[]; +} + +// @public +export type ManagedCertificateDomainControlValidation = string; + +// @public +export interface ManagedCertificatePatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ManagedCertificateProperties { + domainControlValidation?: ManagedCertificateDomainControlValidation; + readonly error?: string; + readonly provisioningState?: CertificateProvisioningState; + subjectName?: string; + readonly validationToken?: string; +} + +// @public +export interface ManagedCertificates { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesCreateOrUpdateOptionalParams): Promise, ManagedCertificatesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, managedCertificateName: string, options?: ManagedCertificatesGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: ManagedCertificatesListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, environmentName: string, managedCertificateName: string, managedCertificateEnvelope: ManagedCertificatePatch, options?: ManagedCertificatesUpdateOptionalParams): Promise; +} + +// @public +export interface ManagedCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + managedCertificateEnvelope?: ManagedCertificate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedCertificatesCreateOrUpdateResponse = ManagedCertificate; + +// @public +export interface ManagedCertificatesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ManagedCertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesGetResponse = ManagedCertificate; + +// @public +export interface ManagedCertificatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesListNextResponse = ManagedCertificateCollection; + +// @public +export interface ManagedCertificatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesListResponse = ManagedCertificateCollection; + +// @public +export interface ManagedCertificatesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedCertificatesUpdateResponse = ManagedCertificate; + // @public export interface ManagedEnvironment extends TrackedResource { appLogsConfiguration?: AppLogsConfiguration; customDomainConfiguration?: CustomDomainConfiguration; daprAIConnectionString?: string; daprAIInstrumentationKey?: string; + daprConfiguration?: DaprConfiguration; readonly defaultDomain?: string; readonly deploymentErrors?: string; readonly eventStreamEndpoint?: string; + infrastructureResourceGroup?: string; + kedaConfiguration?: KedaConfiguration; + kind?: string; readonly provisioningState?: EnvironmentProvisioningState; - sku?: EnvironmentSkuProperties; readonly staticIp?: string; vnetConfiguration?: VnetConfiguration; workloadProfiles?: WorkloadProfile[]; @@ -1749,23 +2462,14 @@ export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extend // @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>>; + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, void>>; - beginUpdateAndWait(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise; + beginUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams): Promise, ManagedEnvironmentsUpdateResponse>>; + 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; @@ -1916,6 +2620,9 @@ export interface ManagedEnvironmentsUpdateOptionalParams extends coreClient.Oper updateIntervalInMs?: number; } +// @public +export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; + // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -2010,6 +2717,16 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = AvailableOperations; +// @public +export interface PreBuildStep { + description?: string; + httpGet?: HttpGet; + scripts?: string[]; +} + +// @public +export type ProvisioningState = string; + // @public export interface ProxyResource extends Resource { } @@ -2040,6 +2757,9 @@ export interface RegistryInfo { export interface Replica extends ProxyResource { containers?: ReplicaContainer[]; readonly createdTime?: Date; + initContainers?: ReplicaContainer[]; + readonly runningState?: ContainerAppReplicaRunningState; + readonly runningStateDetails?: string; } // @public @@ -2055,6 +2775,8 @@ export interface ReplicaContainer { name?: string; ready?: boolean; restartCount?: number; + readonly runningState?: ContainerAppContainerRunningState; + readonly runningStateDetails?: string; started?: boolean; } @@ -2119,6 +2841,8 @@ export type Scheme = string; // @public export interface Secret { + identity?: string; + keyVaultUrl?: string; name?: string; value?: string; } @@ -2129,7 +2853,10 @@ export interface SecretsCollection { } // @public -export type SkuName = string; +export interface SecretVolumeItem { + path?: string; + secretRef?: string; +} // @public export interface SourceControl extends ProxyResource { @@ -2175,6 +2902,7 @@ export interface Template { initContainers?: InitContainer[]; revisionSuffix?: string; scale?: Scale; + terminationGracePeriodSeconds?: number; volumes?: Volume[]; } @@ -2194,6 +2922,9 @@ export interface TrafficWeight { weight?: number; } +// @public +export type TriggerType = string; + // @public export interface Twitter { enabled?: boolean; @@ -2223,15 +2954,15 @@ export interface VnetConfiguration { dockerBridgeCidr?: string; infrastructureSubnetId?: string; internal?: boolean; - outboundSettings?: ManagedEnvironmentOutboundSettings; platformReservedCidr?: string; platformReservedDnsIP?: string; - runtimeSubnetId?: string; } // @public export interface Volume { + mountOptions?: string; name?: string; + secrets?: SecretVolumeItem[]; storageName?: string; storageType?: StorageType; } @@ -2239,13 +2970,15 @@ export interface Volume { // @public export interface VolumeMount { mountPath?: string; + subPath?: string; volumeName?: string; } // @public export interface WorkloadProfile { - maximumCount: number; - minimumCount: number; + maximumCount?: number; + minimumCount?: number; + name: string; workloadProfileType: string; } diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index 698603df20b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -billingMetersGet().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts deleted file mode 100644 index 4ab2cac8f861..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts +++ /dev/null @@ -1,29 +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 billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -billingMetersGet().catch(console.error); 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 3a81f38b4418..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/preview/2022-06-01-preview/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 9826234d5259..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/preview/2022-06-01-preview/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 dfc9a417da1b..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/preview/2022-06-01-preview/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 2fd0d1b41794..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/preview/2022-06-01-preview/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 07c29f9f9482..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/preview/2022-06-01-preview/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/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index a35ed9013e5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.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, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - 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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index c96e91e0f079..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index 545e01de21db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 6136748e56e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.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 connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByConnectedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 6727f124c0d1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 76781d175693..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -certificatesCheckNameAvailability().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index fe3a09f4bbb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +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 { - ConnectedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -createKubeEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 801dd2337fa8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.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 connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index 4336d0617d7e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.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 connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index b70c0abfbce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 2ee4b0af6bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.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 connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index 3d6f275aedb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 39fea934b220..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.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 an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -deleteConnectedEnvironmentByConnectedEnvironmentName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts deleted file mode 100644 index cb623c2ad6b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.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 an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -getConnectedEnvironmentByConnectedEnvironmentName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 7472652f927f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.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 connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_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.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index 46d30ed3d5df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.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 connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - 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.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listConnectedEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index ad8e052a1ef3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.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 { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 2a03ad0f73e9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.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 connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index a22e6733e052..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.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 connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 896a88e038ff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.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 connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index 03bcbc34fcb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.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 Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -patchManagedEnvironment().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 8be594611ce3..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/preview/2022-06-01-preview/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 fa32ed65ae85..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/preview/2022-06-01-preview/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 301bd06c5bff..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/preview/2022-06-01-preview/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 3e33157a6831..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/preview/2022-06-01-preview/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 89b3f42694d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,194 +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/preview/2022-06-01-preview/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", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - }, - workloadProfileType: "GeneralPurpose" - }; - 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); - -/** - * 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/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateTcpApp().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 7a1138e20db0..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/preview/2022-06-01-preview/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/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index 25662a7131ab..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.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 diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -getContainerAppDiagnosticsInfo().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index e5841cc7790d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index 99fd7265f162..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index 35216be7c122..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.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 list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getTheListOfAvailableDiagnosticsForAGivenContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index 2e43067961a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index f44411c37e54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.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 auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -getContainerAppAuthToken().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 60825d27228e..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/preview/2022-06-01-preview/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 abe888508d18..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/preview/2022-06-01-preview/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 17c23ab32300..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/preview/2022-06-01-preview/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 6392220fed5d..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/preview/2022-06-01-preview/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 8c6e649c77b7..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/preview/2022-06-01-preview/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 1f81d71ba138..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/preview/2022-06-01-preview/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 6ec3eb9518ec..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/preview/2022-06-01-preview/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 f17d31562a11..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/preview/2022-06-01-preview/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 29c94e610bd7..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/preview/2022-06-01-preview/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 d80013220cea..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/preview/2022-06-01-preview/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 05db4b97c3b9..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/preview/2022-06-01-preview/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 fc29bb2c88ad..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/preview/2022-06-01-preview/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 86418ae8cf45..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/preview/2022-06-01-preview/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 2b0f557de321..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/preview/2022-06-01-preview/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 3866b69a12ea..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/preview/2022-06-01-preview/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 c9f6fe3aac45..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/preview/2022-06-01-preview/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 4d02d6f05848..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,128 +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/preview/2022-06-01-preview/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", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - 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 338e0f0f227e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - 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"], - secretStoreComponent: "my-secret-store", - 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); -} - -createOrUpdateDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - 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); -} - -createOrUpdateDaprComponentWithSecrets().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 a25337cb573d..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/preview/2022-06-01-preview/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 7af846366d9a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,58 +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/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - 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); -} - -getDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - 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); -} - -getDaprComponentWithSecrets().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 523a92eec55a..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/preview/2022-06-01-preview/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 22ee2b7da364..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/preview/2022-06-01-preview/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/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index 249ff959e347..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.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 diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -getDiagnosticDataForAManagedEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index e8fcf2a71dc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.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 list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getTheListOfAvailableDiagnosticDataForAManagedEnvironments().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 ef1d2a05483c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,75 +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/preview/2022-06-01-preview/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" } - }, - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - sku: { name: "Premium" }, - vnetConfiguration: { - outboundSettings: { - outBoundType: "UserDefinedRouting", - virtualNetworkApplianceIp: "192.168.1.20" - } - }, - workloadProfiles: [ - { - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - } - ], - 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 0a20d29b8396..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/preview/2022-06-01-preview/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/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index 497d60bfe67c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.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/preview/2022-06-01-preview/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.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index 8086473b0918..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.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 Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getManagedEnvironmentAuthToken().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 5a822df7e7c5..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/preview/2022-06-01-preview/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 fc292fcd4f94..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/preview/2022-06-01-preview/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 26d08b1a499d..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/preview/2022-06-01-preview/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/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index bc4eb79e4476..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.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 all workload Profile States for a Premium Managed Environment. - * - * @summary Get all workload Profile States for a Premium Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - 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 resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - 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 1c2f40f19495..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/preview/2022-06-01-preview/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 e956869c28fb..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/preview/2022-06-01-preview/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 359c283d858f..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/preview/2022-06-01-preview/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 7b6069aac420..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/preview/2022-06-01-preview/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 28543cfe3b93..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/preview/2022-06-01-preview/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 4f74d5e40cc5..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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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 b2ea13421d19..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/preview/2022-06-01-preview/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/v2-beta/javascript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md deleted file mode 100644 index 9baef631b125..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availableWorkloadProfilesGetSample.js][availableworkloadprofilesgetsample] | Get all available workload profiles for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json | -| [billingMetersGetSample.js][billingmetersgetsample] | Get all billingMeters for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json | -| [certificatesCreateOrUpdateSample.js][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.js][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json | -| [certificatesGetSample.js][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/Certificates_Patch.json | -| [connectedEnvironmentsCertificatesCreateOrUpdateSample.js][connectedenvironmentscertificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json | -| [connectedEnvironmentsCertificatesDeleteSample.js][connectedenvironmentscertificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json | -| [connectedEnvironmentsCertificatesGetSample.js][connectedenvironmentscertificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json | -| [connectedEnvironmentsCertificatesListSample.js][connectedenvironmentscertificateslistsample] | Get the Certificates in a given connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json | -| [connectedEnvironmentsCertificatesUpdateSample.js][connectedenvironmentscertificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json | -| [connectedEnvironmentsCheckNameAvailabilitySample.js][connectedenvironmentschecknameavailabilitysample] | Checks if resource connectedEnvironmentName is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json | -| [connectedEnvironmentsCreateOrUpdateSample.js][connectedenvironmentscreateorupdatesample] | Creates or updates an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js][connectedenvironmentsdaprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsDeleteSample.js][connectedenvironmentsdaprcomponentsdeletesample] | Delete a Dapr Component from a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json | -| [connectedEnvironmentsDaprComponentsGetSample.js][connectedenvironmentsdaprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json | -| [connectedEnvironmentsDaprComponentsListSample.js][connectedenvironmentsdaprcomponentslistsample] | Get the Dapr Components for a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json | -| [connectedEnvironmentsDaprComponentsListSecretsSample.js][connectedenvironmentsdaprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.js][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json | -| [connectedEnvironmentsGetSample.js][connectedenvironmentsgetsample] | Get the properties of an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json | -| [connectedEnvironmentsListByResourceGroupSample.js][connectedenvironmentslistbyresourcegroupsample] | Get all connectedEnvironments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json | -| [connectedEnvironmentsListBySubscriptionSample.js][connectedenvironmentslistbysubscriptionsample] | Get all connectedEnvironments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json | -| [connectedEnvironmentsStoragesCreateOrUpdateSample.js][connectedenvironmentsstoragescreateorupdatesample] | Create or update storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json | -| [connectedEnvironmentsStoragesDeleteSample.js][connectedenvironmentsstoragesdeletesample] | Delete storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json | -| [connectedEnvironmentsStoragesGetSample.js][connectedenvironmentsstoragesgetsample] | Get storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json | -| [connectedEnvironmentsStoragesListSample.js][connectedenvironmentsstorageslistsample] | Get all storages for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json | -| [connectedEnvironmentsUpdateSample.js][connectedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.js][containerappsauthconfigscreateorupdatesample] | Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.js][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.js][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.js][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.js][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsDiagnosticsGetDetectorSample.js][containerappsdiagnosticsgetdetectorsample] | Get a diagnostics result of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json | -| [containerAppsDiagnosticsGetRevisionSample.js][containerappsdiagnosticsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json | -| [containerAppsDiagnosticsGetRootSample.js][containerappsdiagnosticsgetrootsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json | -| [containerAppsDiagnosticsListDetectorsSample.js][containerappsdiagnosticslistdetectorssample] | Get the list of diagnostics for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json | -| [containerAppsDiagnosticsListRevisionsSample.js][containerappsdiagnosticslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json | -| [containerAppsGetAuthTokenSample.js][containerappsgetauthtokensample] | Get auth token for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json | -| [containerAppsGetSample.js][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.js][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.js][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.js][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.js][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.js][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.js][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.js][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.js][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json | -| [daprComponentsDeleteSample.js][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.js][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json | -| [daprComponentsListSample.js][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.js][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json | -| [managedEnvironmentDiagnosticsGetDetectorSample.js][managedenvironmentdiagnosticsgetdetectorsample] | Get the diagnostics data for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json | -| [managedEnvironmentDiagnosticsListDetectorsSample.js][managedenvironmentdiagnosticslistdetectorssample] | Get the list of diagnostics for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsDiagnosticsGetRootSample.js][managedenvironmentsdiagnosticsgetrootsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsGetAuthTokenSample.js][managedenvironmentsgetauthtokensample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.js][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.js][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Premium Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.js][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.js][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.js][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.js][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.js][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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 availableWorkloadProfilesGetSample.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 availableWorkloadProfilesGetSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableworkloadprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js -[billingmetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js -[connectedenvironmentscertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js -[connectedenvironmentscertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js -[connectedenvironmentscertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js -[connectedenvironmentscertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js -[connectedenvironmentscertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js -[connectedenvironmentschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js -[connectedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js -[connectedenvironmentsdaprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js -[connectedenvironmentsdaprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js -[connectedenvironmentsdaprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js -[connectedenvironmentsdaprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js -[connectedenvironmentsdaprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js -[connectedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js -[connectedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js -[connectedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js -[connectedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js -[connectedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js -[connectedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js -[connectedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js -[connectedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js -[connectedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js -[containerappsdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js -[containerappsdiagnosticsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js -[containerappsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js -[containerappsdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js -[containerappsdiagnosticslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js -[containerappsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js -[managedenvironmentdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js -[managedenvironmentdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js -[managedenvironmentsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js -[managedenvironmentsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js -[managedenvironmentslistworkloadprofilestatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/v2-beta/javascript/availableWorkloadProfilesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.js deleted file mode 100644 index 7f1882ab9bd4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/availableWorkloadProfilesGetSample.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 available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -billingMetersGet().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js deleted file mode 100644 index c30d9472509c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/billingMetersGetSample.js +++ /dev/null @@ -1,29 +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 billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -billingMetersGet().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesCreateOrUpdateSample.js deleted file mode 100644 index d13dcea0f4c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/certificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesDeleteSample.js deleted file mode 100644 index 42d449c5793e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/certificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesGetSample.js deleted file mode 100644 index 2e9d5d18679a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/certificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesListSample.js deleted file mode 100644 index 81b8eb555c7b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/certificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/certificatesUpdateSample.js deleted file mode 100644 index 75e6a1fe3fc7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js deleted file mode 100644 index f3dfcf2cc2ed..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.js deleted file mode 100644 index d35ca3587956..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesDeleteSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.js deleted file mode 100644 index d402ec7f6991..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesGetSample.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 the specified Certificate. - * - * @summary Get the specified Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.js deleted file mode 100644 index cfd9a6fcf41e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesListSample.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 Certificates in a given connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByConnectedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.js deleted file mode 100644 index e1a279e1cc32..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCertificatesUpdateSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js deleted file mode 100644 index 730c0ee5bdff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCheckNameAvailabilitySample.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 Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -certificatesCheckNameAvailability().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index 116dd24f7526..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsCreateOrUpdateSample.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 Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope = { - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -createKubeEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 7e6a13c94018..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.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 connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js deleted file mode 100644 index 7a6b8f18a83f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsDeleteSample.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 connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.js deleted file mode 100644 index 561482152264..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsGetSample.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 dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.js deleted file mode 100644 index e8d488d6cef4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSample.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 Dapr Components for a connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js deleted file mode 100644 index cd40dbc176c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.js deleted file mode 100644 index 7002d2584e10..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsDeleteSample.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 an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -deleteConnectedEnvironmentByConnectedEnvironmentName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.js deleted file mode 100644 index 6765725e160c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsGetSample.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 properties of an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -getConnectedEnvironmentByConnectedEnvironmentName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index 50c91cfbe080..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListByResourceGroupSample.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 connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_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.connectedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index 4e1a29e9da5c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsListBySubscriptionSample.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 connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - 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.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listConnectedEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index a4f1f5bdc432..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.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 connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - 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.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index eb03a65389f2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesDeleteSample.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 connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.js deleted file mode 100644 index 084df5c46e69..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesGetSample.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 connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.js deleted file mode 100644 index 40a4dc60e34f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsStoragesListSample.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 all storages for a connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.js deleted file mode 100644 index 6f9b65433c28..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/connectedEnvironmentsUpdateSample.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 Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js deleted file mode 100644 index 728fe7d8e24c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsDeleteSample.js deleted file mode 100644 index 902bbbe2b611..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsAuthConfigsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsGetSample.js deleted file mode 100644 index 168d13a1d19f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsAuthConfigsListByContainerAppSample.js deleted file mode 100644 index a779ea09b593..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js deleted file mode 100644 index bcf039a4288c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,192 +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/preview/2022-06-01-preview/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", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32", - }, - { - name: "Allow work IP B subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8", - }, - ], - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100, - }, - ], - }, - maxInactiveRevisions: 10, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - 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, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - }, - workloadProfileType: "GeneralPurpose", - }; - 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); - -/** - * 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/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp", - }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 }, - }, - ], - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateTcpApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDeleteSample.js deleted file mode 100644 index 87f9f199a5b3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.js deleted file mode 100644 index acc2130c5974..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetDetectorSample.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 diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -getContainerAppDiagnosticsInfo().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.js deleted file mode 100644 index cd5b26d0adbc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRevisionSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.js deleted file mode 100644 index 6f19ea2a3371..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsGetRootSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.getRoot(resourceGroupName, containerAppName); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.js deleted file mode 100644 index bb9e4dd86250..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListDetectorsSample.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 list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getTheListOfAvailableDiagnosticsForAGivenContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.js deleted file mode 100644 index f99ee217627b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsDiagnosticsListRevisionsSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.js deleted file mode 100644 index 4fd2b071b3c4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetAuthTokenSample.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 auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken(resourceGroupName, containerAppName); - console.log(result); -} - -getContainerAppAuthToken().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsGetSample.js deleted file mode 100644 index 0b36b2cb99c3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListByResourceGroupSample.js deleted file mode 100644 index 0aeb012933ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListBySubscriptionSample.js deleted file mode 100644 index 453b59d722ce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListCustomHostNameAnalysisSample.js deleted file mode 100644 index 2343db18babf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsListSecretsSample.js deleted file mode 100644 index f5204e5b3be6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasGetReplicaSample.js deleted file mode 100644 index 9510e87f28e9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionReplicasListReplicasSample.js deleted file mode 100644 index acac665224f6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsActivateRevisionSample.js deleted file mode 100644 index ad1e3bf19c27..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsDeactivateRevisionSample.js deleted file mode 100644 index 29e2fcd2d2c8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsGetRevisionSample.js deleted file mode 100644 index 2e5c997d1d69..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsListRevisionsSample.js deleted file mode 100644 index c57217d76698..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsRevisionsRestartRevisionSample.js deleted file mode 100644 index cf1af68ef06e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsCreateOrUpdateSample.js deleted file mode 100644 index 9cd66bc576be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsDeleteSample.js deleted file mode 100644 index 20233aff0c3f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsSourceControlsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsGetSample.js deleted file mode 100644 index 7dfe3cc6a55a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsSourceControlsListByContainerAppSample.js deleted file mode 100644 index 737c19a60a23..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/containerAppsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js deleted file mode 100644 index 3b42ed8c74b7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,126 +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/preview/2022-06-01-preview/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", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32", - }, - { - name: "Allow work IP B subnet", - description: "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8", - }, - ], - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100, - }, - ], - }, - maxInactiveRevisions: 10, - }, - 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, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" }, - }, - ], - 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/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 54fd797c2c48..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,88 +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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - 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"], - secretStoreComponent: "my-secret-store", - 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); -} - -createOrUpdateDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - 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); -} - -createOrUpdateDaprComponentWithSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsDeleteSample.js deleted file mode 100644 index 5f739c470afe..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/daprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.js deleted file mode 100644 index ca8f0640dc13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsGetSample.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 Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - 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); -} - -getDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - 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); -} - -getDaprComponentWithSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSample.js deleted file mode 100644 index 6b7e38543a7b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/daprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/daprComponentsListSecretsSample.js deleted file mode 100644 index 2750ff5f280e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js deleted file mode 100644 index 4697ec1ea08e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsGetDetectorSample.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 the diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -getDiagnosticDataForAManagedEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js deleted file mode 100644 index 08a7e0fed070..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentDiagnosticsListDetectorsSample.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 list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getTheListOfAvailableDiagnosticDataForAManagedEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index 26039577f52c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,72 +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/preview/2022-06-01-preview/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" }, - }, - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - sku: { name: "Premium" }, - vnetConfiguration: { - outboundSettings: { - outBoundType: "UserDefinedRouting", - virtualNetworkApplianceIp: "192.168.1.20", - }, - }, - workloadProfiles: [ - { - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - ], - 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/v2-beta/javascript/managedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDeleteSample.js deleted file mode 100644 index aced6768493a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.js deleted file mode 100644 index 37c1260673cb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsDiagnosticsGetRootSample.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 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/preview/2022-06-01-preview/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.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.js deleted file mode 100644 index 756068ffa15b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetAuthTokenSample.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 Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken(resourceGroupName, environmentName); - console.log(result); -} - -getManagedEnvironmentAuthToken().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsGetSample.js deleted file mode 100644 index cffeab05a6ca..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index 76b3c5b66e54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index 609ff9f7bec2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js deleted file mode 100644 index 50a3066c08c2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsListWorkloadProfileStatesSample.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 all workload Profile States for a Premium Managed Environment. - * - * @summary Get all workload Profile States for a Premium Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - 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 resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index 2578907bc254..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 7af15a0612f0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesGetSample.js deleted file mode 100644 index cfcb3c2a601f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsStoragesListSample.js deleted file mode 100644 index 9675a26c9f67..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/managedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/managedEnvironmentsUpdateSample.js deleted file mode 100644 index 49af5a3a3647..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/namespacesCheckNameAvailabilitySample.js deleted file mode 100644 index c61210be6f7b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/v2-beta/javascript/operationsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/operationsListSample.js deleted file mode 100644 index e5d46d778456..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/javascript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/package.json deleted file mode 100644 index 26b909b3012e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.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": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/v2-beta/typescript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md deleted file mode 100644 index 6e3b704b7cb1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availableWorkloadProfilesGetSample.ts][availableworkloadprofilesgetsample] | Get all available workload profiles for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json | -| [billingMetersGetSample.ts][billingmetersgetsample] | Get all billingMeters for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json | -| [certificatesCreateOrUpdateSample.ts][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.ts][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json | -| [certificatesGetSample.ts][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/Certificates_Patch.json | -| [connectedEnvironmentsCertificatesCreateOrUpdateSample.ts][connectedenvironmentscertificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json | -| [connectedEnvironmentsCertificatesDeleteSample.ts][connectedenvironmentscertificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json | -| [connectedEnvironmentsCertificatesGetSample.ts][connectedenvironmentscertificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json | -| [connectedEnvironmentsCertificatesListSample.ts][connectedenvironmentscertificateslistsample] | Get the Certificates in a given connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json | -| [connectedEnvironmentsCertificatesUpdateSample.ts][connectedenvironmentscertificatesupdatesample] | Patches a certificate. Currently only patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json | -| [connectedEnvironmentsCheckNameAvailabilitySample.ts][connectedenvironmentschecknameavailabilitysample] | Checks if resource connectedEnvironmentName is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json | -| [connectedEnvironmentsCreateOrUpdateSample.ts][connectedenvironmentscreateorupdatesample] | Creates or updates an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts][connectedenvironmentsdaprcomponentscreateorupdatesample] | Creates or updates a Dapr Component in a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsDeleteSample.ts][connectedenvironmentsdaprcomponentsdeletesample] | Delete a Dapr Component from a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json | -| [connectedEnvironmentsDaprComponentsGetSample.ts][connectedenvironmentsdaprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json | -| [connectedEnvironmentsDaprComponentsListSample.ts][connectedenvironmentsdaprcomponentslistsample] | Get the Dapr Components for a connected environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json | -| [connectedEnvironmentsDaprComponentsListSecretsSample.ts][connectedenvironmentsdaprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.ts][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json | -| [connectedEnvironmentsGetSample.ts][connectedenvironmentsgetsample] | Get the properties of an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json | -| [connectedEnvironmentsListByResourceGroupSample.ts][connectedenvironmentslistbyresourcegroupsample] | Get all connectedEnvironments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json | -| [connectedEnvironmentsListBySubscriptionSample.ts][connectedenvironmentslistbysubscriptionsample] | Get all connectedEnvironments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json | -| [connectedEnvironmentsStoragesCreateOrUpdateSample.ts][connectedenvironmentsstoragescreateorupdatesample] | Create or update storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json | -| [connectedEnvironmentsStoragesDeleteSample.ts][connectedenvironmentsstoragesdeletesample] | Delete storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json | -| [connectedEnvironmentsStoragesGetSample.ts][connectedenvironmentsstoragesgetsample] | Get storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json | -| [connectedEnvironmentsStoragesListSample.ts][connectedenvironmentsstorageslistsample] | Get all storages for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json | -| [connectedEnvironmentsUpdateSample.ts][connectedenvironmentsupdatesample] | Patches a Managed Environment. Only patching of tags is supported currently x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json | -| [containerAppsAuthConfigsCreateOrUpdateSample.ts][containerappsauthconfigscreateorupdatesample] | Create or update the AuthConfig for a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json | -| [containerAppsAuthConfigsDeleteSample.ts][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.ts][containerappsauthconfigsgetsample] | Get a AuthConfig of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json | -| [containerAppsCreateOrUpdateSample.ts][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.ts][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json | -| [containerAppsDiagnosticsGetDetectorSample.ts][containerappsdiagnosticsgetdetectorsample] | Get a diagnostics result of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json | -| [containerAppsDiagnosticsGetRevisionSample.ts][containerappsdiagnosticsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json | -| [containerAppsDiagnosticsGetRootSample.ts][containerappsdiagnosticsgetrootsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json | -| [containerAppsDiagnosticsListDetectorsSample.ts][containerappsdiagnosticslistdetectorssample] | Get the list of diagnostics for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json | -| [containerAppsDiagnosticsListRevisionsSample.ts][containerappsdiagnosticslistrevisionssample] | Get the Revisions for a given Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json | -| [containerAppsGetAuthTokenSample.ts][containerappsgetauthtokensample] | Get auth token for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json | -| [containerAppsGetSample.ts][containerappsgetsample] | Get the properties of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json | -| [containerAppsListSecretsSample.ts][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/Replicas_Get.json | -| [containerAppsRevisionReplicasListReplicasSample.ts][containerappsrevisionreplicaslistreplicassample] | List replicas for a Container App Revision. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json | -| [containerAppsRevisionsActivateRevisionSample.ts][containerappsrevisionsactivaterevisionsample] | Activates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json | -| [containerAppsRevisionsDeactivateRevisionSample.ts][containerappsrevisionsdeactivaterevisionsample] | Deactivates a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json | -| [containerAppsRevisionsGetRevisionSample.ts][containerappsrevisionsgetrevisionsample] | Get a revision of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/Revisions_List.json | -| [containerAppsRevisionsRestartRevisionSample.ts][containerappsrevisionsrestartrevisionsample] | Restarts a revision for a Container App x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json | -| [containerAppsSourceControlsDeleteSample.ts][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.ts][containerappssourcecontrolsgetsample] | Get a SourceControl of a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json | -| [daprComponentsDeleteSample.ts][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.ts][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json | -| [daprComponentsListSample.ts][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.ts][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json | -| [managedEnvironmentDiagnosticsGetDetectorSample.ts][managedenvironmentdiagnosticsgetdetectorsample] | Get the diagnostics data for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json | -| [managedEnvironmentDiagnosticsListDetectorsSample.ts][managedenvironmentdiagnosticslistdetectorssample] | Get the list of diagnostics for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsDiagnosticsGetRootSample.ts][managedenvironmentsdiagnosticsgetrootsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsGetAuthTokenSample.ts][managedenvironmentsgetauthtokensample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.ts][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.ts][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Premium Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.ts][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.ts][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.ts][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.ts][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.ts][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/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/availableWorkloadProfilesGetSample.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/availableWorkloadProfilesGetSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableworkloadprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts -[billingmetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.ts -[connectedenvironmentscertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts -[connectedenvironmentscertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts -[connectedenvironmentscertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts -[connectedenvironmentscertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts -[connectedenvironmentscertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts -[connectedenvironmentschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts -[connectedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts -[connectedenvironmentsdaprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts -[connectedenvironmentsdaprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts -[connectedenvironmentsdaprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts -[connectedenvironmentsdaprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts -[connectedenvironmentsdaprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts -[connectedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts -[connectedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts -[connectedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts -[connectedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts -[connectedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts -[connectedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts -[connectedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts -[connectedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts -[connectedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts -[containerappsdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts -[containerappsdiagnosticsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts -[containerappsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts -[containerappsdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts -[containerappsdiagnosticslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts -[containerappsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts -[managedenvironmentdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts -[managedenvironmentdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts -[managedenvironmentsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts -[managedenvironmentsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts -[managedenvironmentslistworkloadprofilestatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/v2-beta/typescript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json deleted file mode 100644 index 2d9864e0c891..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.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": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1" - }, - "devDependencies": { - "@types/node": "^14.0.0", - "typescript": "~5.0.0", - "rimraf": "latest" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index 698603df20b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/availableWorkloadProfilesGetSample.ts +++ /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. -import { ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Get all available workload profiles for a location. - * - * @summary Get all available workload profiles for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -billingMetersGet().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts deleted file mode 100644 index 4ab2cac8f861..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/billingMetersGetSample.ts +++ /dev/null @@ -1,29 +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 billingMeters for a location. - * - * @summary Get all billingMeters for a location. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json - */ -async function billingMetersGet() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -billingMetersGet().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 3a81f38b4418..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesDeleteSample.ts deleted file mode 100644 index 9826234d5259..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesGetSample.ts deleted file mode 100644 index dfc9a417da1b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesListSample.ts deleted file mode 100644 index 2fd0d1b41794..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/certificatesUpdateSample.ts deleted file mode 100644 index 07c29f9f9482..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index a35ed9013e5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.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, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - 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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = { - certificateEnvelope - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options - ); - console.log(result); -} - -createOrUpdateCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index c96e91e0f079..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesDeleteSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -deleteCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index 545e01de21db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesGetSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName - ); - console.log(result); -} - -getCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 6136748e56e1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesListSample.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 connected environment. - * - * @summary Get the Certificates in a given connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listCertificatesByConnectedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 6727f124c0d1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCertificatesUpdateSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json - */ -async function patchCertificate() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope - ); - console.log(result); -} - -patchCertificate().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 76781d175693..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Checks if resource connectedEnvironmentName is available. - * - * @summary Checks if resource connectedEnvironmentName is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest - ); - console.log(result); -} - -certificatesCheckNameAvailability().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index fe3a09f4bbb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,48 +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 { - ConnectedEnvironment, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Creates or updates an connectedEnvironment. - * - * @summary Creates or updates an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json - */ -async function createKubeEnvironments() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope - ); - console.log(result); -} - -createKubeEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 801dd2337fa8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.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 connected environment. - * - * @summary Creates or updates a Dapr Component in a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "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.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope - ); - console.log(result); -} - -createOrUpdateDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index 4336d0617d7e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.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 connected environment. - * - * @summary Delete a Dapr Component from a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json - */ -async function deleteDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -deleteDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index b70c0abfbce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsGetSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -getDaprComponent().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 2ee4b0af6bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSample.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 connected environment. - * - * @summary Get the Dapr Components for a connected environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listDaprComponents().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index 3d6f275aedb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.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/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName - ); - console.log(result); -} - -listContainerAppsSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 39fea934b220..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsDeleteSample.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 an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -deleteConnectedEnvironmentByConnectedEnvironmentName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.ts deleted file mode 100644 index cb623c2ad6b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsGetSample.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 an connectedEnvironment. - * - * @summary Get the properties of an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -getConnectedEnvironmentByConnectedEnvironmentName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 7472652f927f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListByResourceGroupSample.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 connectedEnvironments in a resource group. - * - * @summary Get all connectedEnvironments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_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.connectedEnvironments.listByResourceGroup( - resourceGroupName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsByResourceGroup().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index 46d30ed3d5df..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsListBySubscriptionSample.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 connectedEnvironments for a subscription. - * - * @summary Get all connectedEnvironments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json - */ -async function listConnectedEnvironmentsBySubscription() { - 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.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -listConnectedEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index ad8e052a1ef3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.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 { - ConnectedEnvironmentStorage, - ContainerAppsAPIClient -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; - -/** - * This sample demonstrates how to Create or update storage for a connectedEnvironment. - * - * @summary Create or update storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1" - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope - ); - console.log(result); -} - -createOrUpdateEnvironmentsStorage().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 2a03ad0f73e9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesDeleteSample.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 connectedEnvironment. - * - * @summary Delete storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index a22e6733e052..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesGetSample.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 connectedEnvironment. - * - * @summary Get storage for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName - ); - console.log(result); -} - -getAEnvironmentsStoragePropertiesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 896a88e038ff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsStoragesListSample.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 connectedEnvironment. - * - * @summary Get all storages for a connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -listEnvironmentsStoragesBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index 03bcbc34fcb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/connectedEnvironmentsUpdateSample.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 Patches a Managed Environment. Only patching of tags is supported currently - * - * @summary Patches a Managed Environment. Only patching of tags is supported currently - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName - ); - console.log(result); -} - -patchManagedEnvironment().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index 8be594611ce3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index fa32ed65ae85..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 301bd06c5bff..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 3e33157a6831..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 89b3f42694d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,194 +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/preview/2022-06-01-preview/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", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - }, - workloadProfileType: "GeneralPurpose" - }; - 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); - -/** - * 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/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerAppTcp"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerAppTcp", - image: "repo/testcontainerAppTcp:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "tcpscalingrule", - tcp: { metadata: { concurrentConnections: "50" } } - } - ] - } - } - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -createOrUpdateTcpApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDeleteSample.ts deleted file mode 100644 index 7a1138e20db0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index 25662a7131ab..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetDetectorSample.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 diagnostics result of a Container App. - * - * @summary Get a diagnostics result of a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName - ); - console.log(result); -} - -getContainerAppDiagnosticsInfo().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index e5841cc7790d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRevisionSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName - ); - console.log(result); -} - -getContainerAppRevision().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index 99fd7265f162..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsGetRootSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -getContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index 35216be7c122..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListDetectorsSample.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 list of diagnostics for a given Container App. - * - * @summary Get the list of diagnostics for a given Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -getTheListOfAvailableDiagnosticsForAGivenContainerApp().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index 2e43067961a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsDiagnosticsListRevisionsSample.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/preview/2022-06-01-preview/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.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listContainerAppRevisions().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index f44411c37e54..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetAuthTokenSample.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 auth token for a container app - * - * @summary Get auth token for a container app - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName - ); - console.log(result); -} - -getContainerAppAuthToken().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsGetSample.ts deleted file mode 100644 index 60825d27228e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index abe888508d18..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 17c23ab32300..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 6392220fed5d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsListSecretsSample.ts deleted file mode 100644 index 8c6e649c77b7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 1f81d71ba138..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index 6ec3eb9518ec..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index f17d31562a11..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index 29c94e610bd7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index d80013220cea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index 05db4b97c3b9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index fc29bb2c88ad..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 86418ae8cf45..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index 2b0f557de321..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index 3866b69a12ea..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index c9f6fe3aac45..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts deleted file mode 100644 index 4d02d6f05848..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,128 +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/preview/2022-06-01-preview/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", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - 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, - ipSecurityRestrictions: [ - { - name: "Allow work IP A subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/32" - }, - { - name: "Allow work IP B subnet", - description: - "Allowing all IP's within the subnet below to access containerapp", - action: "Allow", - ipAddressRange: "192.168.1.1/8" - } - ], - targetPort: 3000, - traffic: [ - { - label: "production", - revisionName: "testcontainerApp0-ab1234", - weight: 100 - } - ] - }, - maxInactiveRevisions: 10 - }, - 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 - } - ] - } - ], - initContainers: [ - { - name: "testinitcontainerApp0", - image: "repo/testcontainerApp0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ], - 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/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 338e0f0f227e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,91 +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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - 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"], - secretStoreComponent: "my-secret-store", - 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); -} - -createOrUpdateDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * 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/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json - */ -async function createOrUpdateDaprComponentWithSecrets() { - 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); -} - -createOrUpdateDaprComponentWithSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsDeleteSample.ts deleted file mode 100644 index a25337cb573d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts deleted file mode 100644 index 7af846366d9a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsGetSample.ts +++ /dev/null @@ -1,58 +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/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - 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); -} - -getDaprComponentWithSecretStoreComponent().catch(console.error); - -/** - * This sample demonstrates how to Get a dapr component. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - 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); -} - -getDaprComponentWithSecrets().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSample.ts deleted file mode 100644 index 523a92eec55a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/daprComponentsListSecretsSample.ts deleted file mode 100644 index 22ee2b7da364..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index 249ff959e347..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.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 diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName - ); - console.log(result); -} - -getDiagnosticDataForAManagedEnvironments().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index e8fcf2a71dc0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.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 list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getTheListOfAvailableDiagnosticDataForAManagedEnvironments().catch( - console.error -); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index ef1d2a05483c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,75 +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/preview/2022-06-01-preview/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" } - }, - customDomainConfiguration: { - certificatePassword: Buffer.from("private key password"), - certificateValue: Buffer.from("PFX-or-PEM-blob"), - dnsSuffix: "www.my-name.com" - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - sku: { name: "Premium" }, - vnetConfiguration: { - outboundSettings: { - outBoundType: "UserDefinedRouting", - virtualNetworkApplianceIp: "192.168.1.20" - } - }, - workloadProfiles: [ - { - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized" - }, - { - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized" - } - ], - 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/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 0a20d29b8396..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index 497d60bfe67c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.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/preview/2022-06-01-preview/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.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getEnvironmentsByName().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index 8086473b0918..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetAuthTokenSample.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 Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName - ); - console.log(result); -} - -getManagedEnvironmentAuthToken().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsGetSample.ts deleted file mode 100644 index 5a822df7e7c5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index fc292fcd4f94..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index 26d08b1a499d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index bc4eb79e4476..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.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 all workload Profile States for a Premium Managed Environment. - * - * @summary Get all workload Profile States for a Premium Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - 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 resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName - )) { - resArray.push(item); - } - console.log(resArray); -} - -listEnvironmentsBySubscription().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 1c2f40f19495..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index e956869c28fb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 359c283d858f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 7b6069aac420..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index 28543cfe3b93..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index 4f74d5e40cc5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/preview/2022-06-01-preview/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/v2-beta/typescript/src/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index b2ea13421d19..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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/preview/2022-06-01-preview/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/v2-beta/typescript/tsconfig.json b/sdk/appcontainers/arm-appcontainers/samples/v2-beta/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2-beta/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 832c212b8601..2c18423de461 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -16,47 +16,57 @@ import { import * as coreAuth from "@azure/core-auth"; import { ContainerAppsAuthConfigsImpl, + AvailableWorkloadProfilesImpl, + BillingMetersImpl, + BuildersImpl, + BuildsImpl, + ConnectedEnvironmentsImpl, + ConnectedEnvironmentsCertificatesImpl, + ConnectedEnvironmentsDaprComponentsImpl, + ConnectedEnvironmentsStoragesImpl, ContainerAppsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, - DaprComponentsImpl, ContainerAppsDiagnosticsImpl, ManagedEnvironmentDiagnosticsImpl, ManagedEnvironmentsDiagnosticsImpl, OperationsImpl, + JobsImpl, + JobsExecutionsImpl, ManagedEnvironmentsImpl, CertificatesImpl, + ManagedCertificatesImpl, NamespacesImpl, + DaprComponentsImpl, ManagedEnvironmentsStoragesImpl, - ContainerAppsSourceControlsImpl, - ConnectedEnvironmentsImpl, - ConnectedEnvironmentsCertificatesImpl, - ConnectedEnvironmentsDaprComponentsImpl, - ConnectedEnvironmentsStoragesImpl, - AvailableWorkloadProfilesImpl, - BillingMetersImpl + ContainerAppsSourceControlsImpl } from "./operations"; import { ContainerAppsAuthConfigs, + AvailableWorkloadProfiles, + BillingMeters, + Builders, + Builds, + ConnectedEnvironments, + ConnectedEnvironmentsCertificates, + ConnectedEnvironmentsDaprComponents, + ConnectedEnvironmentsStorages, ContainerApps, ContainerAppsRevisions, ContainerAppsRevisionReplicas, - DaprComponents, ContainerAppsDiagnostics, ManagedEnvironmentDiagnostics, ManagedEnvironmentsDiagnostics, Operations, + Jobs, + JobsExecutions, ManagedEnvironments, Certificates, + ManagedCertificates, Namespaces, + DaprComponents, ManagedEnvironmentsStorages, - ContainerAppsSourceControls, - ConnectedEnvironments, - ConnectedEnvironmentsCertificates, - ConnectedEnvironmentsDaprComponents, - ConnectedEnvironmentsStorages, - AvailableWorkloadProfiles, - BillingMeters + ContainerAppsSourceControls } from "./operationsInterfaces"; import { ContainerAppsAPIClientOptionalParams } from "./models"; @@ -145,14 +155,27 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-06-01-preview"; + this.apiVersion = options.apiVersion || "2023-05-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); + this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); + this.billingMeters = new BillingMetersImpl(this); + this.builders = new BuildersImpl(this); + this.builds = new BuildsImpl(this); + this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl( + this + ); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsImpl( + this + ); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesImpl( + this + ); this.containerApps = new ContainerAppsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this ); - this.daprComponents = new DaprComponentsImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsImpl( this @@ -161,27 +184,19 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.operations = new OperationsImpl(this); + this.jobs = new JobsImpl(this); + this.jobsExecutions = new JobsExecutionsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); + this.managedCertificates = new ManagedCertificatesImpl(this); this.namespaces = new NamespacesImpl(this); + this.daprComponents = new DaprComponentsImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesImpl( this ); 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); } @@ -214,23 +229,28 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { } containerAppsAuthConfigs: ContainerAppsAuthConfigs; + availableWorkloadProfiles: AvailableWorkloadProfiles; + billingMeters: BillingMeters; + builders: Builders; + builds: Builds; + connectedEnvironments: ConnectedEnvironments; + connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; + connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; + connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; containerApps: ContainerApps; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; - daprComponents: DaprComponents; containerAppsDiagnostics: ContainerAppsDiagnostics; managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; operations: Operations; + jobs: Jobs; + jobsExecutions: JobsExecutions; managedEnvironments: ManagedEnvironments; certificates: Certificates; + managedCertificates: ManagedCertificates; namespaces: Namespaces; + daprComponents: DaprComponents; managedEnvironmentsStorages: ManagedEnvironmentsStorages; containerAppsSourceControls: ContainerAppsSourceControls; - connectedEnvironments: ConnectedEnvironments; - connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; - connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; - connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; - availableWorkloadProfiles: AvailableWorkloadProfiles; - billingMeters: BillingMeters; } diff --git a/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts b/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts +++ b/sdk/appcontainers/arm-appcontainers/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 918d484dd049..d7fbb3f60a8d 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -494,10 +494,10 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } -/** Container App collection ARM resource. */ -export interface ContainerAppCollection { - /** Collection of resources. */ - value: ContainerApp[]; +/** 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. @@ -505,12 +505,91 @@ 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; +/** Revision resource specific properties */ +export interface AvailableWorkloadProfileProperties { + /** Used to categorize workload profiles. */ + category?: string; + /** 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 billing meters. */ +export interface BillingMeterCollection { + /** Collection of billing meters. */ + value: BillingMeter[]; +} + +/** Revision resource specific properties */ +export interface BillingMeterProperties { + /** Used to categorize billing meters. */ + category?: string; + /** Billing meter type. */ + meterType?: string; + /** The everyday name of the billing meter. */ + displayName?: string; +} + +/** The response of a BuilderResource list operation. */ +export interface BuilderCollection { + /** The BuilderResource items on this page */ + value: BuilderResource[]; + /** The link to the next page of items */ + nextLink?: string; } /** Managed service identity (system assigned and/or user assigned identities) */ @@ -545,421 +624,254 @@ export interface UserAssignedIdentity { readonly clientId?: string; } -/** Non versioned Container App configuration properties that define the mutable settings of a Container app */ -export interface Configuration { - /** Collection of secrets used by a Container app */ - secrets?: Secret[]; - /** - * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default. - */ - activeRevisionsMode?: ActiveRevisionsMode; - /** Ingress configurations. */ - ingress?: Ingress; - /** Collection of private container registry credentials for containers used by the Container app */ - registries?: RegistryCredentials[]; - /** Dapr configuration for the Container App. */ - dapr?: Dapr; - /** Optional. Max inactive revisions a Container App can have. */ - maxInactiveRevisions?: number; +/** The type used for update operations of the BuilderResource. */ +export interface BuilderResourceUpdate { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; } -/** Secret definition. */ -export interface Secret { - /** Secret Name. */ - name?: string; - /** Secret Value. */ - value?: string; +/** The response of a BuildResource list operation. */ +export interface BuildCollection { + /** The BuildResource items on this page */ + value: BuildResource[]; + /** The link to the next page of items */ + nextLink?: string; } -/** Container App Ingress configuration. */ -export interface Ingress { - /** - * Hostname. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly fqdn?: string; - /** Bool indicating if app exposes an external http endpoint */ - 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 */ - traffic?: TrafficWeight[]; - /** custom domain bindings for Container Apps' hostnames. */ - 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[]; +/** Container registry that the final image will be uploaded to. */ +export interface ContainerRegistryWithCustomImage { + /** Login server of the container registry that the final image should be uploaded to. */ + server: string; + /** Full user-assigned identity Resource ID for the managed identity that should be used to connect to the container registry. */ + identity: string; + /** Full name that the final image should be uploaded as, including both image name and tag. */ + image?: string; } -/** Traffic weight assigned to a revision */ -export interface TrafficWeight { - /** Name of a revision */ - revisionName?: string; - /** Traffic weight assigned to a revision */ - weight?: number; - /** Indicates that the traffic weight belongs to a latest stable revision */ - latestRevision?: boolean; - /** Associates a traffic label with a revision */ - label?: string; +/** Configuration of the build. */ +export interface BuildConfiguration { + /** Base OS used to build and run the app. */ + baseOs?: string; + /** Platform to be used to build and run the app. */ + platform?: string; + /** Platform version to be used to build and run the app. */ + platformVersion?: string; + /** List of environment variables to be passed to the build and application runtime. */ + environmentVariables?: EnvironmentVariable[]; + /** List of steps to perform before the build. */ + preBuildSteps?: PreBuildStep[]; } -/** Custom Domain of a Container App */ -export interface CustomDomain { - /** Hostname. */ +/** Model representing an environment variable. */ +export interface EnvironmentVariable { + /** Environment variable name. */ name: string; - /** Custom Domain binding type. */ - bindingType?: BindingType; - /** Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ - certificateId: string; + /** Environment variable value. */ + value: 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. */ +/** Model representing a pre-build step. */ +export interface PreBuildStep { + /** Description of the pre-build step. */ 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 */ - server?: string; - /** Container Registry Username */ - username?: string; - /** The name of the Secret that contains the registry login password */ - passwordSecretRef?: string; - /** A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ - identity?: string; -} - -/** Container App Dapr configuration. */ -export interface Dapr { - /** Boolean indicating if the Dapr side car is enabled */ - enabled?: boolean; - /** Dapr application identifier */ - appId?: string; - /** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http */ - 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; + /** List of custom commands to run. */ + scripts?: string[]; + /** Http get request to send before the build. */ + httpGet?: HttpGet; } -/** - * Container App versioned application definition. - * Defines the desired state of an immutable revision. - * Any changes to this section Will result in a new revision being created - */ -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. */ - scale?: Scale; - /** List of volume definitions for the Container App. */ - volumes?: Volume[]; +/** Model representing a http get request. */ +export interface HttpGet { + /** URL to make HTTP GET request against. */ + url: string; + /** Name of the file that the request should be saved to. */ + fileName?: string; + /** List of headers to send with the request. */ + headers?: string[]; } -/** Container App base container definition. */ -export interface BaseContainer { - /** Container image tag. */ - image?: string; - /** Custom container name. */ - name?: string; - /** Container start command. */ - command?: string[]; - /** Container start command arguments. */ - args?: string[]; - /** Container environment variables. */ - env?: EnvironmentVar[]; - /** Container resource requirements. */ - resources?: ContainerResources; - /** Container volume mounts. */ - volumeMounts?: VolumeMount[]; +/** 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; } -/** Container App container environment variable. */ -export interface EnvironmentVar { - /** Environment variable name. */ +/** The complex type of the extended location. */ +export interface ExtendedLocation { + /** The name of the extended location. */ name?: string; - /** Non-secret environment variable value. */ - value?: string; - /** Name of the Container App secret from which to pull the environment variable value. */ - secretRef?: string; + /** The type of the extended location. */ + type?: ExtendedLocationTypes; } -/** Container App container resource requirements. */ -export interface ContainerResources { - /** Required CPU in cores, e.g. 0.5 */ - cpu?: number; - /** Required memory, e.g. "250Mb" */ - memory?: string; +/** Configuration properties for apps environment custom domain */ +export interface CustomDomainConfiguration { /** - * Ephemeral Storage, e.g. "1Gi" + * Id used to verify domain name ownership * NOTE: This property will not be serialized. It can only be populated by the server. */ - 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. */ - failureThreshold?: number; - /** HTTPGet specifies the http request to perform. */ - httpGet?: ContainerAppProbeHttpGet; - /** Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. */ - initialDelaySeconds?: number; - /** How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ - periodSeconds?: number; - /** Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ - successThreshold?: number; - /** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ - tcpSocket?: ContainerAppProbeTcpSocket; - /** Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ - terminationGracePeriodSeconds?: number; - /** Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. */ - timeoutSeconds?: number; - /** The type of probe. */ - type?: Type; -} - -/** HTTPGet specifies the http request to perform. */ -export interface ContainerAppProbeHttpGet { - /** Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ - host?: string; - /** Custom headers to set in the request. HTTP allows repeated headers. */ - httpHeaders?: ContainerAppProbeHttpGetHttpHeadersItem[]; - /** Path to access on the HTTP server. */ - path?: string; - /** Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ - port: number; - /** Scheme to use for connecting to the host. Defaults to HTTP. */ - scheme?: Scheme; -} - -/** HTTPHeader describes a custom header to be used in HTTP probes */ -export interface ContainerAppProbeHttpGetHttpHeadersItem { - /** The header field name */ - name: string; - /** The header field value */ - value: string; -} - -/** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ -export interface ContainerAppProbeTcpSocket { - /** Optional: Host name to connect to, defaults to the pod IP. */ - host?: string; - /** Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ - port: number; -} - -/** Container App scaling configurations. */ -export interface Scale { - /** Optional. Minimum number of container replicas. */ - minReplicas?: number; - /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ - maxReplicas?: number; - /** Scaling rules. */ - rules?: ScaleRule[]; + readonly customDomainVerificationId?: string; + /** Dns suffix for the environment domain */ + dnsSuffix?: string; + /** PFX or PEM blob */ + certificateValue?: Uint8Array; + /** Certificate password */ + certificatePassword?: string; + /** + * 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; } -/** Container App container scaling rule. */ -export interface ScaleRule { - /** Scale Rule Name */ +/** The check availability request body. */ +export interface CheckNameAvailabilityRequest { + /** The name of the resource for which availability needs to be checked. */ name?: string; - /** Azure Queue based scaling. */ - azureQueue?: QueueScaleRule; - /** Custom scale rule. */ - custom?: CustomScaleRule; - /** HTTP requests based scaling. */ - http?: HttpScaleRule; - /** Tcp requests based scaling. */ - tcp?: TcpScaleRule; -} - -/** Container App container Azure Queue based scaling rule. */ -export interface QueueScaleRule { - /** Queue name. */ - queueName?: string; - /** Queue length. */ - queueLength?: number; - /** Authentication secrets for the queue scale rule. */ - auth?: ScaleRuleAuth[]; + /** The resource type. */ + type?: string; } -/** Auth Secrets for Container App Scale Rule */ -export interface ScaleRuleAuth { - /** Name of the Container App secret from which to pull the auth params. */ - secretRef?: string; - /** Trigger Parameter that uses the secret */ - triggerParameter?: string; +/** The check availability result. */ +export interface CheckNameAvailabilityResponse { + /** Indicates if the resource name is available. */ + nameAvailable?: boolean; + /** The reason why the given name is not available. */ + reason?: CheckNameAvailabilityReason; + /** Detailed reason why the given name is available. */ + message?: string; } -/** Container App container Custom scaling rule. */ -export interface CustomScaleRule { +/** Collection of Certificates. */ +export interface CertificateCollection { + /** Collection of resources. */ + value: Certificate[]; /** - * Type of the custom scale rule - * eg: azure-servicebus, redis etc. + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - type?: string; - /** Metadata properties to describe custom scale rule. */ - metadata?: { [propertyName: string]: string }; - /** Authentication secrets for the custom scale rule. */ - auth?: ScaleRuleAuth[]; -} - -/** Container App container Http scaling rule. */ -export interface HttpScaleRule { - /** Metadata properties to describe http scale rule. */ - metadata?: { [propertyName: string]: string }; - /** Authentication secrets for the custom scale rule. */ - 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. */ - name?: string; - /** Storage type for the volume. If not provided, use EmptyDir. */ - storageType?: StorageType; - /** Name of storage resource. No need to provide for EmptyDir. */ - storageName?: string; + readonly nextLink?: string; } -/** Custom domain analysis. */ -export interface CustomHostnameAnalysisResult { +/** Certificate resource specific properties */ +export interface CertificateProperties { /** - * Host name that was analyzed + * Provisioning state of the certificate. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hostName?: string; + readonly provisioningState?: CertificateProvisioningState; + /** Certificate password. */ + password?: string; /** - * true if hostname is already verified; otherwise, false. + * Subject name of the certificate. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isHostnameAlreadyVerified?: boolean; + readonly subjectName?: string; /** - * DNS verification test result. + * Subject alternative names the certificate applies to. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomainVerificationTest?: DnsVerificationTestResult; + readonly subjectAlternativeNames?: string[]; + /** PFX or PEM blob */ + value?: Uint8Array; /** - * Raw failure information if DNS verification fails. + * Certificate issuer. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomainVerificationFailureInfo?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; + readonly issuer?: string; /** - * true if there is a conflict on the Container App's managed environment; otherwise, false. + * Certificate issue Date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hasConflictOnManagedEnvironment?: boolean; + readonly issueDate?: Date; /** - * true if there is a conflict on the Container App's managed environment level custom domain; otherwise, false. + * Certificate expiration date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly conflictWithEnvironmentCustomDomain?: boolean; + readonly expirationDate?: Date; /** - * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. + * Certificate thumbprint. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly conflictingContainerAppResourceId?: string; - /** CName records visible for this hostname. */ - cNameRecords?: string[]; - /** TXT records visible for this hostname. */ - txtRecords?: string[]; - /** A records visible for this hostname. */ - aRecords?: string[]; - /** Alternate CName records visible for this hostname. */ - alternateCNameRecords?: string[]; - /** Alternate TXT records visible for this hostname. */ - alternateTxtRecords?: string[]; -} - -/** Raw failure information if DNS verification fails. */ -export interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { + readonly thumbprint?: string; /** - * Standardized string to programmatically identify the error. + * Is the certificate valid?. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly valid?: boolean; /** - * Detailed error description and debugging information. + * Public key hash. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly publicKeyHash?: string; +} + +/** A certificate to update */ +export interface CertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** Dapr Components ARM resource. */ +export interface DaprComponentsCollection { + /** Collection of resources. */ + value: DaprComponent[]; /** - * Detailed error description and debugging information. + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly target?: string; - /** Details or the error */ - details?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem[]; + readonly nextLink?: string; } -/** 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; +/** Secret definition. */ +export interface Secret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; + /** Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. */ + identity?: string; + /** Azure Key Vault URL pointing to the secret referenced by the container app. */ + keyVaultUrl?: string; } -/** Container App Secrets Collection ARM resource. */ -export interface SecretsCollection { - /** Collection of resources. */ - value: ContainerAppSecret[]; +/** Dapr component metadata. */ +export interface DaprMetadata { + /** Metadata property name. */ + name?: string; + /** Metadata property value. */ + value?: string; + /** Name of the Dapr Component secret from which to pull the metadata property value. */ + secretRef?: string; } -/** Container App Secret. */ -export interface ContainerAppSecret { +/** Dapr component Secrets Collection for ListSecrets Action. */ +export interface DaprSecretsCollection { + /** Collection of secrets used by a Dapr component */ + value: DaprSecret[]; +} + +/** Dapr component Secret for ListSecrets Action */ +export interface DaprSecret { /** * Secret Name. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -972,51 +884,34 @@ export interface ContainerAppSecret { readonly value?: string; } -/** Container App Revisions collection ARM resource. */ -export interface RevisionCollection { - /** Collection of resources. */ - value: Revision[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** Collection of Storage for Environments */ +export interface ConnectedEnvironmentStoragesCollection { + /** Collection of storage resources. */ + value: ConnectedEnvironmentStorage[]; } -/** Container object under Container App Revision Replica. */ -export interface ReplicaContainer { - /** The Name of the Container */ - name?: string; - /** The Id of the Container */ - containerId?: string; - /** The container ready status */ - ready?: boolean; - /** The container start status */ - 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; +/** Storage properties */ +export interface ConnectedEnvironmentStorageProperties { + /** Azure file properties */ + azureFile?: AzureFileProperties; } -/** Container App Revision Replicas collection ARM resource. */ -export interface ReplicaCollection { - /** Collection of resources. */ - value: Replica[]; +/** Azure File Properties. */ +export interface AzureFileProperties { + /** Storage account name for azure file. */ + accountName?: string; + /** Storage account key for azure file. */ + accountKey?: string; + /** Access mode for storage */ + accessMode?: AccessMode; + /** Azure file share name. */ + shareName?: string; } -/** Dapr Components ARM resource. */ -export interface DaprComponentsCollection { +/** Container App collection ARM resource. */ +export interface ContainerAppCollection { /** Collection of resources. */ - value: DaprComponent[]; + value: ContainerApp[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1024,392 +919,483 @@ export interface DaprComponentsCollection { readonly nextLink?: string; } -/** Dapr component metadata. */ -export interface DaprMetadata { - /** Metadata property name. */ - name?: string; - /** Metadata property value. */ - value?: string; - /** Name of the Dapr Component secret from which to pull the metadata property value. */ - secretRef?: string; -} - -/** Dapr component Secrets Collection for ListSecrets Action. */ -export interface DaprSecretsCollection { - /** Collection of secrets used by a Dapr component */ - value: Secret[]; -} - -/** Diagnostics data collection for a resource. */ -export interface DiagnosticsCollection { - /** Collection of diagnostic data. */ - value: Diagnostics[]; +/** Non versioned Container App configuration properties that define the mutable settings of a Container app */ +export interface Configuration { + /** Collection of secrets used by a Container app */ + secrets?: Secret[]; /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. + * ActiveRevisionsMode controls how active revisions are handled for the Container app: + * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default. */ - 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; + activeRevisionsMode?: ActiveRevisionsMode; + /** Ingress configurations. */ + ingress?: Ingress; + /** Collection of private container registry credentials for containers used by the Container app */ + registries?: RegistryCredentials[]; + /** Dapr configuration for the Container App. */ + dapr?: Dapr; + /** Optional. Max inactive revisions a Container App can have. */ + maxInactiveRevisions?: number; } -/** 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; +/** Container App Ingress configuration. */ +export interface Ingress { /** - * Authors' names of the detector + * Hostname. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly score?: number; + readonly fqdn?: string; + /** Bool indicating if app exposes an external http endpoint */ + 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 */ + traffic?: TrafficWeight[]; + /** custom domain bindings for Container Apps' hostnames. */ + 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[]; + /** Sticky Sessions for Single Revision Mode */ + stickySessions?: IngressStickySessions; + /** Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. */ + clientCertificateMode?: IngressClientCertificateMode; + /** CORS policy for container app */ + corsPolicy?: CorsPolicy; } -/** 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; +/** Traffic weight assigned to a revision */ +export interface TrafficWeight { + /** Name of a revision */ + revisionName?: string; + /** Traffic weight assigned to a revision */ + weight?: number; + /** Indicates that the traffic weight belongs to a latest stable revision */ + latestRevision?: boolean; + /** Associates a traffic label with a revision */ + label?: string; } -/** Diagnostics data returned from a detector */ -export interface DiagnosticsDataApiResponse { - /** Table response */ - table?: DiagnosticDataTableResponseObject; - /** Details of the table response */ - renderingProperties?: DiagnosticRendering; +/** Custom Domain of a Container App */ +export interface CustomDomain { + /** Hostname. */ + name: string; + /** Custom Domain binding type. */ + bindingType?: BindingType; + /** Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ + certificateId?: string; } -/** 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 */ +/** 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; - /** 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; + /** 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; } -/** Details of a diagnostics data provider */ -export interface DiagnosticDataProviderMetadata { - /** Name of data provider */ - providerName?: string; - /** Collection of properties */ - propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; +/** Sticky Sessions for Single Revision Mode */ +export interface IngressStickySessions { + /** Sticky Session Affinity */ + affinity?: Affinity; } -/** Property details */ -export interface DiagnosticDataProviderMetadataPropertyBagItem { - /** Property name */ - name?: string; - /** Property value */ - value?: string; +/** Cross-Origin-Resource-Sharing policy */ +export interface CorsPolicy { + /** Specifies the content for the access-control-allow-origins header */ + allowedOrigins: string[]; + /** Specifies the content for the access-control-allow-methods header */ + allowedMethods?: string[]; + /** Specifies the content for the access-control-allow-headers header */ + allowedHeaders?: string[]; + /** Specifies the content for the access-control-expose-headers header */ + exposeHeaders?: string[]; + /** Specifies the content for the access-control-max-age header */ + maxAge?: number; + /** Specifies whether the resource allows credentials */ + allowCredentials?: boolean; } -/** Managed Environment resource SKU properties. */ -export interface EnvironmentSkuProperties { - /** Name of the Sku. */ - name: SkuName; +/** Container App Private Registry */ +export interface RegistryCredentials { + /** Container Registry Server */ + server?: string; + /** Container Registry Username */ + username?: string; + /** The name of the Secret that contains the registry login password */ + passwordSecretRef?: string; + /** A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ + identity?: 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 used to control the Environment Egress outbound traffic */ - outboundSettings?: ManagedEnvironmentOutboundSettings; +/** Container App Dapr configuration. */ +export interface Dapr { + /** Boolean indicating if the Dapr side car is enabled */ + enabled?: boolean; + /** Dapr application identifier */ + appId?: string; + /** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http */ + 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; } -/** 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; +/** + * Container App versioned application definition. + * Defines the desired state of an immutable revision. + * Any changes to this section Will result in a new revision being created + */ +export interface Template { + /** User friendly suffix that is appended to the revision name */ + revisionSuffix?: string; + /** Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. */ + terminationGracePeriodSeconds?: number; + /** 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. */ + scale?: Scale; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; } -/** Configuration of application logs */ -export interface AppLogsConfiguration { - /** Logs destination */ - destination?: string; - /** Log Analytics configuration */ - logAnalyticsConfiguration?: LogAnalyticsConfiguration; +/** Container App base container definition. */ +export interface BaseContainer { + /** Container image tag. */ + image?: string; + /** Custom container name. */ + name?: string; + /** Container start command. */ + command?: string[]; + /** Container start command arguments. */ + args?: string[]; + /** Container environment variables. */ + env?: EnvironmentVar[]; + /** Container resource requirements. */ + resources?: ContainerResources; + /** Container volume mounts. */ + volumeMounts?: VolumeMount[]; } -/** Log analytics configuration */ -export interface LogAnalyticsConfiguration { - /** Log analytics customer id */ - customerId?: string; - /** Log analytics customer key */ - sharedKey?: string; +/** Container App container environment variable. */ +export interface EnvironmentVar { + /** Environment variable name. */ + name?: string; + /** Non-secret environment variable value. */ + value?: string; + /** Name of the Container App secret from which to pull the environment variable value. */ + secretRef?: 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; +/** Container App container resource requirements. */ +export interface ContainerResources { + /** Required CPU in cores, e.g. 0.5 */ + cpu?: number; + /** Required memory, e.g. "250Mb" */ + memory?: string; /** - * Subject name of the certificate. + * Ephemeral Storage, e.g. "1Gi" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subjectName?: string; + readonly ephemeralStorage?: 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; +/** 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; + /** Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). */ + subPath?: string; } -/** Available operations of the service */ -export interface AvailableOperations { - /** Collection of available operation details */ - value?: OperationDetail[]; - /** - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - nextLink?: 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. */ + failureThreshold?: number; + /** HTTPGet specifies the http request to perform. */ + httpGet?: ContainerAppProbeHttpGet; + /** Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. */ + initialDelaySeconds?: number; + /** How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ + periodSeconds?: number; + /** Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ + successThreshold?: number; + /** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ + tcpSocket?: ContainerAppProbeTcpSocket; + /** Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ + terminationGracePeriodSeconds?: number; + /** Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. */ + timeoutSeconds?: number; + /** The type of probe. */ + type?: Type; } -/** Operation detail payload */ -export interface OperationDetail { - /** Name of the operation */ - name?: string; - /** Indicates whether the operation is a data action */ - isDataAction?: boolean; - /** Display of the operation */ - display?: OperationDisplay; - /** Origin of the operation */ - origin?: string; +/** HTTPGet specifies the http request to perform. */ +export interface ContainerAppProbeHttpGet { + /** Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ + host?: string; + /** Custom headers to set in the request. HTTP allows repeated headers. */ + httpHeaders?: ContainerAppProbeHttpGetHttpHeadersItem[]; + /** Path to access on the HTTP server. */ + path?: string; + /** Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ + port: number; + /** Scheme to use for connecting to the host. Defaults to HTTP. */ + scheme?: Scheme; } -/** Operation display payload */ -export interface OperationDisplay { - /** Resource provider of the operation */ - provider?: string; - /** Resource of the operation */ - resource?: string; - /** Localized friendly name for the operation */ - operation?: string; - /** Localized friendly description for the operation */ - description?: string; +/** HTTPHeader describes a custom header to be used in HTTP probes */ +export interface ContainerAppProbeHttpGetHttpHeadersItem { + /** The header field name */ + name: string; + /** The header field value */ + value: string; } -/** Collection of Environments */ -export interface ManagedEnvironmentsCollection { - /** Collection of resources. */ - value: ManagedEnvironment[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ +export interface ContainerAppProbeTcpSocket { + /** Optional: Host name to connect to, defaults to the pod IP. */ + host?: string; + /** Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ + port: number; } -/** Collection of Certificates. */ -export interface CertificateCollection { - /** Collection of resources. */ - value: Certificate[]; +/** Container App scaling configurations. */ +export interface Scale { + /** Optional. Minimum number of container replicas. */ + minReplicas?: number; + /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ + maxReplicas?: number; + /** Scaling rules. */ + rules?: ScaleRule[]; +} + +/** Container App container scaling rule. */ +export interface ScaleRule { + /** Scale Rule Name */ + name?: string; + /** Azure Queue based scaling. */ + azureQueue?: QueueScaleRule; + /** Custom scale rule. */ + custom?: CustomScaleRule; + /** HTTP requests based scaling. */ + http?: HttpScaleRule; + /** Tcp requests based scaling. */ + tcp?: TcpScaleRule; +} + +/** Container App container Azure Queue based scaling rule. */ +export interface QueueScaleRule { + /** Queue name. */ + queueName?: string; + /** Queue length. */ + queueLength?: number; + /** Authentication secrets for the queue scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Auth Secrets for Container App Scale Rule */ +export interface ScaleRuleAuth { + /** Name of the Container App secret from which to pull the auth params. */ + secretRef?: string; + /** Trigger Parameter that uses the secret */ + triggerParameter?: string; +} + +/** Container App container Custom scaling rule. */ +export interface CustomScaleRule { /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. + * Type of the custom scale rule + * eg: azure-servicebus, redis etc. */ - readonly nextLink?: string; + type?: string; + /** Metadata properties to describe custom scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; } -/** Certificate resource specific properties */ -export interface CertificateProperties { +/** Container App container Http scaling rule. */ +export interface HttpScaleRule { + /** Metadata properties to describe http scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + 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. */ + name?: string; + /** Storage type for the volume. If not provided, use EmptyDir. */ + storageType?: StorageType; + /** Name of storage resource. No need to provide for EmptyDir and Secret. */ + storageName?: string; + /** List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. */ + secrets?: SecretVolumeItem[]; + /** Mount options used while mounting the AzureFile. Must be a comma-separated string. */ + mountOptions?: string; +} + +/** Secret to be added to volume. */ +export interface SecretVolumeItem { + /** Name of the Container App secret from which to pull the secret value. */ + secretRef?: string; + /** Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef. */ + path?: string; +} + +/** Custom domain analysis. */ +export interface CustomHostnameAnalysisResult { /** - * Provisioning state of the certificate. + * Host name that was analyzed * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: CertificateProvisioningState; - /** Certificate password. */ - password?: string; + readonly hostName?: string; /** - * Subject name of the certificate. + * true if hostname is already verified; otherwise, false. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subjectName?: string; + readonly isHostnameAlreadyVerified?: boolean; /** - * Subject alternative names the certificate applies to. + * DNS verification test result. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subjectAlternativeNames?: string[]; - /** PFX or PEM blob */ - value?: Uint8Array; + readonly customDomainVerificationTest?: DnsVerificationTestResult; /** - * Certificate issuer. + * Raw failure information if DNS verification fails. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly issuer?: string; + readonly customDomainVerificationFailureInfo?: CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; /** - * Certificate issue Date. + * 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 issueDate?: Date; + readonly hasConflictOnManagedEnvironment?: boolean; /** - * Certificate expiration date. + * 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 expirationDate?: Date; + readonly conflictWithEnvironmentCustomDomain?: boolean; /** - * Certificate thumbprint. + * 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. */ - readonly thumbprint?: string; + readonly conflictingContainerAppResourceId?: string; + /** CName records visible for this hostname. */ + cNameRecords?: string[]; + /** TXT records visible for this hostname. */ + txtRecords?: string[]; + /** A records visible for this hostname. */ + aRecords?: string[]; + /** Alternate CName records visible for this hostname. */ + alternateCNameRecords?: string[]; + /** Alternate TXT records visible for this hostname. */ + alternateTxtRecords?: string[]; +} + +/** Raw failure information if DNS verification fails. */ +export interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { /** - * Is the certificate valid?. + * Standardized string to programmatically identify the error. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly valid?: boolean; + readonly code?: string; /** - * Public key hash. + * Detailed error description and debugging information. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly publicKeyHash?: string; + 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[]; } -/** A certificate to update */ -export interface CertificatePatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; +/** 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; } -/** The check availability request body. */ -export interface CheckNameAvailabilityRequest { - /** The name of the resource for which availability needs to be checked. */ - name?: string; - /** The resource type. */ - type?: string; +/** Container App Secrets Collection ARM resource. */ +export interface SecretsCollection { + /** Collection of resources. */ + value: ContainerAppSecret[]; } -/** The check availability result. */ -export interface CheckNameAvailabilityResponse { - /** Indicates if the resource name is available. */ - nameAvailable?: boolean; - /** The reason why the given name is not available. */ - reason?: CheckNameAvailabilityReason; - /** Detailed reason why the given name is available. */ - message?: string; +/** Container App Secret. */ +export interface ContainerAppSecret { + /** + * Secret Name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Secret Value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string; + /** + * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly identity?: string; + /** + * Azure Key Vault URL pointing to the secret referenced by the container app. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly keyVaultUrl?: string; } -/** Collection of workloadProfileStates */ -export interface WorkloadProfileStatesCollection { +/** Container App Revisions collection ARM resource. */ +export interface RevisionCollection { /** Collection of resources. */ - value: WorkloadProfileStates[]; + value: Revision[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1417,120 +1403,50 @@ export interface WorkloadProfileStatesCollection { readonly nextLink?: string; } -/** Workload Profile resource specific properties. */ -export interface WorkloadProfileStatesProperties { - /** Minimum count of instances. */ - minimumCount?: number; - /** Maximum count of nodes. */ - maximumCount?: number; - /** Current count of nodes. */ - currentCount?: number; -} - -/** Collection of Storage for Environments */ -export interface ManagedEnvironmentStoragesCollection { - /** Collection of storage resources. */ - value: ManagedEnvironmentStorage[]; -} - -/** Storage properties */ -export interface ManagedEnvironmentStorageProperties { - /** Azure file properties */ - azureFile?: AzureFileProperties; -} - -/** Azure File Properties. */ -export interface AzureFileProperties { - /** Storage account name for azure file. */ - accountName?: string; - /** Storage account key for azure file. */ - accountKey?: string; - /** Access mode for storage */ - accessMode?: AccessMode; - /** Azure file share name. */ - shareName?: string; -} - -/** SourceControl collection ARM resource. */ -export interface SourceControlCollection { - /** Collection of resources. */ - value: SourceControl[]; +/** Container object under Container App Revision Replica. */ +export interface ReplicaContainer { + /** The Name of the Container */ + name?: string; + /** The Id of the Container */ + containerId?: string; + /** The container ready status */ + ready?: boolean; + /** The container start status */ + started?: boolean; + /** The container restart count */ + restartCount?: number; /** - * Link to next page of resources. + * Current running state of the container * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Configuration properties that define the mutable settings of a Container App SourceControl */ -export interface GithubActionConfiguration { - /** Registry configurations. */ - registryInfo?: RegistryInfo; - /** AzureCredentials configurations. */ - azureCredentials?: AzureCredentials; - /** Context path */ - contextPath?: string; - /** Image name */ - image?: string; - /** Code or Image */ - publishType?: string; - /** Operation system */ - os?: string; - /** Runtime stack */ - runtimeStack?: string; - /** Runtime version */ - runtimeVersion?: string; -} - -/** Container App registry information. */ -export interface RegistryInfo { - /** registry server Url. */ - registryUrl?: string; - /** registry username. */ - registryUserName?: string; - /** registry secret. */ - registryPassword?: string; -} - -/** Container App credentials. */ -export interface AzureCredentials { - /** Client Id. */ - clientId?: string; - /** Client Secret. */ - clientSecret?: string; - /** Tenant Id. */ - tenantId?: string; - /** Subscription Id. */ - subscriptionId?: string; -} - -/** Collection of connectedEnvironments */ -export interface ConnectedEnvironmentCollection { - /** Collection of resources. */ - value?: ConnectedEnvironment[]; + readonly runningState?: ContainerAppContainerRunningState; /** - * Link to next page of resources. + * The details of container current running state * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Collection of Storage for Environments */ -export interface ConnectedEnvironmentStoragesCollection { - /** Collection of storage resources. */ - value: ConnectedEnvironmentStorage[]; + readonly runningStateDetails?: string; + /** + * 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; } -/** Storage properties */ -export interface ConnectedEnvironmentStorageProperties { - /** Azure file properties */ - azureFile?: AzureFileProperties; +/** Container App Revision Replicas collection ARM resource. */ +export interface ReplicaCollection { + /** Collection of resources. */ + value: Replica[]; } -/** Collection of available workload profiles in the location. */ -export interface AvailableWorkloadProfilesCollection { - /** Collection of workload profiles. */ - value: AvailableWorkloadProfile[]; +/** 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. @@ -1538,265 +1454,561 @@ export interface AvailableWorkloadProfilesCollection { 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; +/** 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; } -/** The error detail. */ -export interface ErrorDetail { +/** Metadata of the diagnostics response */ +export interface DiagnosticsDefinition { /** - * The error code. + * Unique detector name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly id?: string; /** - * The error message. + * Display Name of the detector * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly name?: string; /** - * The error target. + * Details of the diagnostics info * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly target?: string; + readonly description?: string; /** - * The error details. + * Authors' names of the detector * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details?: ErrorDetail[]; + readonly author?: string; /** - * The error additional info. + * Category of the detector * 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 { + readonly category?: string; + /** List of support topics */ + supportTopicList?: DiagnosticSupportTopic[]; + /** List of analysis types */ + analysisTypes?: string[]; /** - * The additional info type. + * Authors' names of the detector * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; /** - * The additional info. + * Authors' names of the detector * 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; + readonly score?: number; } -/** Dapr component Secret for ListSecrets Action */ -export interface DaprSecret { +/** Support topic information */ +export interface DiagnosticSupportTopic { /** - * Secret Name. + * Unique topic identifier * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly id?: string; /** - * Secret Value. + * PES identifier * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: string; + readonly pesId?: 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; +/** Diagnostics data returned from a detector */ +export interface DiagnosticsDataApiResponse { + /** Table response */ + table?: DiagnosticDataTableResponseObject; + /** Details of the table response */ + renderingProperties?: DiagnosticRendering; } -/** Container App init container definition */ -export interface InitContainer extends BaseContainer {} +/** Diagnostics data table */ +export interface DiagnosticDataTableResponseObject { + /** Table name */ + tableName?: string; + /** Columns in the table */ + columns?: DiagnosticDataTableResponseColumn[]; + /** Rows in the table */ + rows?: Record[]; +} -/** Container App container definition */ -export interface Container extends BaseContainer { - /** List of probes for the container. */ - probes?: ContainerAppProbe[]; +/** Diagnostics data column */ +export interface DiagnosticDataTableResponseColumn { + /** Column name */ + columnName?: string; + /** Data type of the column */ + dataType?: string; + /** Column type */ + columnType?: string; } -/** 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. */ - login?: Login; - /** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ - httpSettings?: HttpSettings; +/** 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; } -/** Container App Revision. */ -export interface Revision extends ProxyResource { - /** - * Timestamp describing when the revision was created - * by controller +/** 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; +} + +/** 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 infrastructureSubnetId if enabling this property */ + internal?: boolean; + /** Resource ID of a subnet for infrastructure components. Must not overlap with any other provided IP ranges. */ + infrastructureSubnetId?: 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; +} + +/** Workload profile to scope container app execution. */ +export interface WorkloadProfile { + /** Workload profile type for the workloads to run on. */ + name: string; + /** Workload profile type for the workloads to run on. */ + workloadProfileType: string; + /** The minimum capacity. */ + minimumCount?: number; + /** The maximum capacity. */ + maximumCount?: number; +} + +/** Configuration properties Keda component */ +export interface KedaConfiguration { + /** + * The version of Keda * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly createdTime?: Date; + readonly version?: string; +} + +/** Configuration properties Dapr component */ +export interface DaprConfiguration { /** - * Timestamp describing when the revision was last active. Only meaningful when revision is inactive + * The version of Dapr * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastActiveTime?: Date; + readonly version?: string; +} + +/** Available operations of the service */ +export interface AvailableOperations { + /** Collection of available operation details */ + value?: OperationDetail[]; /** - * Fully qualified domain name of the revision - * NOTE: This property will not be serialized. It can only be populated by the server. + * URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. */ - readonly fqdn?: string; + nextLink?: string; +} + +/** Operation detail payload */ +export interface OperationDetail { + /** Name of the operation */ + name?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; + /** Display of the operation */ + display?: OperationDisplay; + /** Origin of the operation */ + origin?: string; +} + +/** Operation display payload */ +export interface OperationDisplay { + /** Resource provider of the operation */ + provider?: string; + /** Resource of the operation */ + resource?: string; + /** Localized friendly name for the operation */ + operation?: string; + /** Localized friendly description for the operation */ + description?: string; +} + +/** Container Apps Jobs collection ARM resource. */ +export interface JobsCollection { + /** Collection of resources. */ + value: Job[]; /** - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly template?: Template; + readonly nextLink?: string; +} + +/** Non versioned Container Apps Job configuration properties */ +export interface JobConfiguration { + /** Collection of secrets used by a Container Apps Job */ + secrets?: Secret[]; + /** Trigger type of the job */ + triggerType: TriggerType; + /** Maximum number of seconds a replica is allowed to run. */ + replicaTimeout: number; + /** Maximum number of retries before failing the job. */ + replicaRetryLimit?: number; + /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ + manualTriggerConfig?: JobConfigurationManualTriggerConfig; + /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ + scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; + /** Collection of private container registry credentials used by a Container apps job */ + registries?: RegistryCredentials[]; +} + +/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ +export interface JobConfigurationManualTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; +} + +/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ +export interface JobConfigurationScheduleTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ + cronExpression: string; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; +} + +/** Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created */ +export interface JobTemplate { + /** List of specialized containers that run before app containers. */ + initContainers?: InitContainer[]; + /** List of container definitions for the Container App. */ + containers?: Container[]; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; +} + +/** Container Apps Job resource specific properties. */ +export interface JobPatchProperties { + /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + properties?: JobPatchPropertiesProperties; +} + +export interface JobPatchPropertiesProperties { + /** Resource ID of environment. */ + environmentId?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** Outbound IP Addresses of a container apps job. */ + outboundIpAddresses?: string[]; + /** The endpoint of the eventstream of the container apps job. */ + eventStreamEndpoint?: string; +} + +/** Job's execution template, containing container configuration for a job's execution */ +export interface JobExecutionTemplate { + /** List of container definitions for the Container Apps Job. */ + containers?: JobExecutionContainer[]; + /** List of specialized containers that run before job containers. */ + initContainers?: JobExecutionContainer[]; +} + +/** Container Apps Jobs execution container definition. */ +export interface JobExecutionContainer { + /** Container image tag. */ + image?: string; + /** Custom container name. */ + name?: string; + /** Container start command. */ + command?: string[]; + /** Container start command arguments. */ + args?: string[]; + /** Container environment variables. */ + env?: EnvironmentVar[]; + /** Container resource requirements. */ + resources?: ContainerResources; +} + +/** Container App's Job execution name. */ +export interface JobExecutionBase { + /** Job execution name. */ + name?: string; + /** Job execution Id. */ + id?: string; +} + +/** Container App executions names list. */ +export interface JobExecutionNamesCollection { + /** Collection of resources. */ + value: JobExecutionBase[]; +} + +/** Container App executions collection ARM resource. */ +export interface ContainerAppJobExecutions { + /** Collection of resources. */ + value: JobExecution[]; /** - * Boolean describing if the Revision is Active + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly active?: boolean; + readonly nextLink?: string; +} + +/** Container Apps Jobs execution. */ +export interface JobExecution { + /** Job execution Name. */ + name?: string; + /** Job execution Id. */ + id?: string; + /** Job Type. */ + type?: string; /** - * Number of pods currently running for this revision + * Current running State of the job * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicas?: number; + readonly status?: JobExecutionRunningState; + /** Job execution start time. */ + startTime?: Date; + /** Job execution start time. */ + endTime?: Date; + /** Job's execution container. */ + template?: JobExecutionTemplate; +} + +/** Container Apps Job Secrets Collection ARM resource. */ +export interface JobSecretsCollection { + /** Collection of resources. */ + value: Secret[]; +} + +/** Collection of Environments */ +export interface ManagedEnvironmentsCollection { + /** Collection of resources. */ + value: ManagedEnvironment[]; /** - * Traffic weight assigned to this revision + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trafficWeight?: number; + readonly nextLink?: string; +} + +/** Certificate resource specific properties */ +export interface ManagedCertificateProperties { /** - * Optional Field - Platform Error Message + * Provisioning state of the certificate. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningError?: string; + readonly provisioningState?: CertificateProvisioningState; + /** Subject name of the certificate. */ + subjectName?: string; /** - * Current health State of the revision + * Any error occurred during the certificate provision. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly healthState?: RevisionHealthState; + readonly error?: string; + /** Selected type of domain control validation for managed certificates. */ + domainControlValidation?: ManagedCertificateDomainControlValidation; /** - * Current provisioning State of the revision + * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: RevisionProvisioningState; + readonly validationToken?: string; } -/** Container App Revision Replica. */ -export interface Replica extends ProxyResource { +/** A managed certificate to update */ +export interface ManagedCertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** Collection of Managed Certificates. */ +export interface ManagedCertificateCollection { + /** Collection of resources. */ + value: ManagedCertificate[]; /** - * Timestamp describing when the pod was created by controller + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly createdTime?: Date; - /** The containers collection under a replica. */ - containers?: ReplicaContainer[]; + readonly nextLink?: string; } -/** Dapr Component. */ -export interface DaprComponent extends ProxyResource { - /** Component type */ - componentType?: string; - /** Component version */ - version?: string; - /** Boolean describing if the component errors are ignores */ - ignoreErrors?: boolean; - /** Initialization timeout */ - 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[]; +/** Collection of workloadProfileStates */ +export interface WorkloadProfileStatesCollection { + /** Collection of resources. */ + value: WorkloadProfileStates[]; + /** + * 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 data for a resource. */ -export interface Diagnostics extends ProxyResource { - /** Diagnostics resource specific properties */ - properties?: DiagnosticsProperties; +/** Workload Profile resource specific properties. */ +export interface WorkloadProfileStatesProperties { + /** Minimum count of instances. */ + minimumCount?: number; + /** Maximum count of nodes. */ + maximumCount?: number; + /** Current count of nodes. */ + currentCount?: number; } -/** Collection of all the workload Profile States for a Premium Managed Environment.. */ -export interface WorkloadProfileStates extends ProxyResource { - /** Workload Profile resource specific properties. */ - properties?: WorkloadProfileStatesProperties; +/** Collection of Storage for Environments */ +export interface ManagedEnvironmentStoragesCollection { + /** Collection of storage resources. */ + value: ManagedEnvironmentStorage[]; } -/** Storage resource for managedEnvironment. */ -export interface ManagedEnvironmentStorage extends ProxyResource { - /** Storage properties */ - properties?: ManagedEnvironmentStorageProperties; +/** Storage properties */ +export interface ManagedEnvironmentStorageProperties { + /** Azure file properties */ + azureFile?: AzureFileProperties; } -/** Container App SourceControl. */ -export interface SourceControl extends ProxyResource { +/** SourceControl collection ARM resource. */ +export interface SourceControlCollection { + /** Collection of resources. */ + value: SourceControl[]; /** - * Current provisioning State of the operation + * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationState?: SourceControlOperationState; - /** The repo url which will be integrated to ContainerApp. */ - repoUrl?: string; - /** The branch which will trigger the auto deployment */ - branch?: string; - /** - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time - */ - githubActionConfiguration?: GithubActionConfiguration; + readonly nextLink?: string; } -/** Storage resource for connectedEnvironment. */ -export interface ConnectedEnvironmentStorage extends ProxyResource { - /** Storage properties */ - properties?: ConnectedEnvironmentStorageProperties; +/** Configuration properties that define the mutable settings of a Container App SourceControl */ +export interface GithubActionConfiguration { + /** Registry configurations. */ + registryInfo?: RegistryInfo; + /** AzureCredentials configurations. */ + azureCredentials?: AzureCredentials; + /** Context path */ + contextPath?: string; + /** Image name */ + image?: string; + /** Code or Image */ + publishType?: string; + /** Operation system */ + os?: string; + /** Runtime stack */ + runtimeStack?: string; + /** Runtime version */ + runtimeVersion?: string; +} + +/** Container App registry information. */ +export interface RegistryInfo { + /** registry server Url. */ + registryUrl?: string; + /** registry username. */ + registryUserName?: string; + /** registry secret. */ + registryPassword?: string; +} + +/** Container App credentials. */ +export interface AzureCredentials { + /** Client Id. */ + clientId?: string; + /** Client Secret. */ + clientSecret?: string; + /** Tenant Id. */ + tenantId?: string; + /** Subscription Id. */ + 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 {} + +/** 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. */ + login?: Login; + /** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ + httpSettings?: HttpSettings; } -/** A premium workload profile. */ +/** A workload profile with specific hardware configure to run container apps. */ export interface AvailableWorkloadProfile extends ProxyResource { /** Region of the workload profile. */ location?: string; @@ -1804,7 +2016,7 @@ export interface AvailableWorkloadProfile extends ProxyResource { properties?: AvailableWorkloadProfileProperties; } -/** A premium billing meter. */ +/** Billing meter. */ export interface BillingMeter extends ProxyResource { /** Region for the billing meter. */ location?: string; @@ -1812,153 +2024,211 @@ export interface BillingMeter extends ProxyResource { 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; - /** - * Provisioning state of the Container App. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: ContainerAppProvisioningState; - /** 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. - */ - readonly latestRevisionName?: string; - /** - * Fully Qualified Domain Name of the latest revision of the Container App. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly latestRevisionFqdn?: string; +/** Information pertaining to an individual build. */ +export interface BuildResource extends ProxyResource { /** - * Id used to verify domain name ownership + * Build provisioning state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomainVerificationId?: string; - /** Non versioned Container App configuration properties. */ - configuration?: Configuration; - /** Container App versioned application definition. */ - template?: Template; + readonly provisioningState?: ProvisioningState; /** - * Outbound IP Addresses for container app. + * Status of the build once it has been provisioned. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly outboundIpAddresses?: string[]; + readonly buildStatus?: BuildStatus; + /** Container registry that the final image will be uploaded to. */ + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + /** Configuration of the build. */ + configuration?: BuildConfiguration; /** - * The endpoint of the eventstream of the container app. + * Endpoint to which the source code should be uploaded. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly eventStreamEndpoint?: string; + readonly uploadEndpoint?: string; } -/** Container App Auth Token. */ -export interface ContainerAppAuthToken extends TrackedResource { +/** Dapr Component. */ +export interface DaprComponent extends ProxyResource { + /** Component type */ + componentType?: string; + /** Component version */ + version?: string; + /** Boolean describing if the component errors are ignores */ + ignoreErrors?: boolean; + /** Initialization timeout */ + 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[]; +} + +/** Storage resource for connectedEnvironment. */ +export interface ConnectedEnvironmentStorage extends ProxyResource { + /** Storage properties */ + properties?: ConnectedEnvironmentStorageProperties; +} + +/** Container App Revision. */ +export interface Revision extends ProxyResource { /** - * Auth token value. + * Timestamp describing when the revision was created + * by controller * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly token?: string; + readonly createdTime?: Date; /** - * Token expiration 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 expires?: Date; -} - -/** An environment for hosting container apps */ -export interface ManagedEnvironment extends TrackedResource { - /** SKU properties of the Environment. */ - sku?: EnvironmentSkuProperties; + readonly lastActiveTime?: Date; /** - * Provisioning state of the Environment. + * Fully qualified domain name of the revision * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: EnvironmentProvisioningState; - /** Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ - daprAIInstrumentationKey?: string; - /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ - daprAIConnectionString?: string; - /** Vnet configuration for the environment */ - vnetConfiguration?: VnetConfiguration; + readonly fqdn?: string; /** - * Any errors that occurred during deployment or deployment validation + * Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deploymentErrors?: string; + readonly template?: Template; /** - * Default Domain Name for the cluster + * Boolean describing if the Revision is Active * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly defaultDomain?: string; + readonly active?: boolean; /** - * Static IP of the Environment + * Number of pods currently running for this revision * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly staticIp?: string; + readonly replicas?: number; /** - * Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported + * Traffic weight assigned to this revision + * NOTE: This property will not be serialized. It can only be populated by the server. */ - appLogsConfiguration?: AppLogsConfiguration; - /** Whether or not this Managed Environment is zone-redundant. */ - zoneRedundant?: boolean; - /** Custom domain configuration for the environment */ - customDomainConfiguration?: CustomDomainConfiguration; + readonly trafficWeight?: number; /** - * The endpoint of the eventstream of the Environment. + * Optional Field - Platform Error Message * 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 */ -export interface Certificate extends TrackedResource { - /** Certificate resource specific properties */ - properties?: CertificateProperties; -} - -/** Environment Auth Token. */ -export interface EnvironmentAuthToken extends TrackedResource { + readonly provisioningError?: string; /** - * Auth token value. + * Current health State of the revision * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly token?: string; + readonly healthState?: RevisionHealthState; /** - * Token expiration date. + * Current provisioning State of the revision * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly expires?: Date; + readonly provisioningState?: RevisionProvisioningState; } -/** 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; +/** Container App Revision Replica. */ +export interface Replica extends ProxyResource { /** - * Provisioning state of the Kubernetes Environment. + * Timestamp describing when the pod was created by controller * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ConnectedEnvironmentProvisioningState; + readonly createdTime?: Date; /** - * Any errors that occurred during deployment or deployment validation + * Current running state of the replica * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deploymentErrors?: string; + readonly runningState?: ContainerAppReplicaRunningState; /** - * Default Domain Name for the cluster + * The details of replica current running state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningStateDetails?: string; + /** The containers collection under a replica. */ + containers?: ReplicaContainer[]; + /** The init containers collection under a replica. */ + initContainers?: ReplicaContainer[]; +} + +/** Diagnostics data for a resource. */ +export interface Diagnostics extends ProxyResource { + /** Diagnostics resource specific properties */ + properties?: DiagnosticsProperties; +} + +/** Collection of all the workload Profile States for a Managed Environment.. */ +export interface WorkloadProfileStates extends ProxyResource { + /** Workload Profile resource specific properties. */ + properties?: WorkloadProfileStatesProperties; +} + +/** Storage resource for managedEnvironment. */ +export interface ManagedEnvironmentStorage extends ProxyResource { + /** Storage properties */ + properties?: ManagedEnvironmentStorageProperties; +} + +/** Container App SourceControl. */ +export interface SourceControl extends ProxyResource { + /** + * Current provisioning State of the operation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationState?: SourceControlOperationState; + /** The repo url which will be integrated to ContainerApp. */ + repoUrl?: string; + /** The branch which will trigger the auto deployment */ + branch?: string; + /** + * Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time + */ + githubActionConfiguration?: GithubActionConfiguration; +} + +/** Information about the SourceToCloud builder resource. */ +export interface BuilderResource extends TrackedResource { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of a builder resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; + /** + * Resource ID of the compute that the builds will be performed on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly buildComputeId?: string; + /** + * Resource ID of the compute that the patching will be performed on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchComputeId?: string; +} + +/** 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; @@ -1970,6 +2240,250 @@ export interface ConnectedEnvironment extends TrackedResource { customDomainConfiguration?: CustomDomainConfiguration; } +/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ +export interface Certificate extends TrackedResource { + /** Certificate resource specific properties */ + properties?: CertificateProperties; +} + +/** 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; + /** The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. */ + managedBy?: string; + /** + * Provisioning state of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ContainerAppProvisioningState; + /** Deprecated. Resource ID of the Container App's environment. */ + managedEnvironmentId?: string; + /** Resource ID of environment. */ + environmentId?: string; + /** Workload profile name to pin for container app execution. */ + workloadProfileName?: 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. + */ + readonly latestRevisionName?: string; + /** + * Name of the latest ready revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestReadyRevisionName?: string; + /** + * Fully Qualified Domain Name of the latest revision of the Container App. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly latestRevisionFqdn?: string; + /** + * 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; + /** Non versioned Container App configuration properties. */ + configuration?: Configuration; + /** Container App versioned application definition. */ + template?: Template; + /** + * Outbound IP Addresses for container app. + * 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 { + /** Kind of the Environment. */ + kind?: string; + /** + * Provisioning state of the Environment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: EnvironmentProvisioningState; + /** Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ + daprAIInstrumentationKey?: string; + /** Application Insights connection string used by Dapr to export Service to Service communication telemetry */ + daprAIConnectionString?: string; + /** Vnet configuration for the environment */ + vnetConfiguration?: VnetConfiguration; + /** + * 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 Environment + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly staticIp?: string; + /** + * Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported + */ + 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[]; + /** The configuration of Keda component. */ + kedaConfiguration?: KedaConfiguration; + /** The configuration of Dapr component. */ + daprConfiguration?: DaprConfiguration; + /** Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. */ + infrastructureResourceGroup?: string; +} + +/** Container App Job */ +export interface Job extends TrackedResource { + /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of the Container Apps Job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: JobProvisioningState; + /** Resource ID of environment. */ + environmentId?: string; + /** Workload profile name to pin for container apps job execution. */ + workloadProfileName?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** + * Outbound IP Addresses of a container apps job. + * 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 apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventStreamEndpoint?: string; +} + +/** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment */ +export interface ManagedCertificate extends TrackedResource { + /** Certificate resource specific properties */ + properties?: ManagedCertificateProperties; +} + +/** 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; +} + +/** Defines headers for Builders_createOrUpdate operation. */ +export interface BuildersCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Builders_update operation. */ +export interface BuildersUpdateHeaders { + location?: string; +} + +/** Defines headers for Builders_delete operation. */ +export interface BuildersDeleteHeaders { + location?: string; +} + +/** Defines headers for Builds_createOrUpdate operation. */ +export interface BuildsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Builds_delete operation. */ +export interface BuildsDeleteHeaders { + location?: string; +} + +/** Defines headers for ConnectedEnvironments_delete operation. */ +export interface ConnectedEnvironmentsDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerApps_delete operation. */ +export interface ContainerAppsDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerApps_update operation. */ +export interface ContainerAppsUpdateHeaders { + location?: string; +} + +/** Defines headers for Jobs_delete operation. */ +export interface JobsDeleteHeaders { + location?: string; +} + +/** Defines headers for Jobs_update operation. */ +export interface JobsUpdateHeaders { + location?: string; +} + +/** Defines headers for Jobs_start operation. */ +export interface JobsStartHeaders { + location?: string; +} + +/** Defines headers for Jobs_stopExecution operation. */ +export interface JobsStopExecutionHeaders { + location?: string; +} + +/** Defines headers for Jobs_stopMultipleExecutions operation. */ +export interface JobsStopMultipleExecutionsHeaders { + location?: string; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -1994,20 +2508,50 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; -/** Known values of {@link ExtendedLocationTypes} that the service accepts. */ -export enum KnownExtendedLocationTypes { - /** CustomLocation */ - CustomLocation = "CustomLocation" +/** Known values of {@link Applicability} that the service accepts. */ +export enum KnownApplicability { + /** LocationDefault */ + LocationDefault = "LocationDefault", + /** Custom */ + Custom = "Custom" } /** - * Defines values for ExtendedLocationTypes. \ - * {@link KnownExtendedLocationTypes} can be used interchangeably with ExtendedLocationTypes, + * 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 - * **CustomLocation** + * **LocationDefault** \ + * **Custom** */ -export type ExtendedLocationTypes = string; +export type Applicability = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** InProgress */ + InProgress = "InProgress", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **InProgress** \ + * **Deleting** + */ +export type ProvisioningState = string; /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ export enum KnownManagedServiceIdentityType { @@ -2033,6 +2577,147 @@ export enum KnownManagedServiceIdentityType { */ export type ManagedServiceIdentityType = string; +/** Known values of {@link BuildStatus} that the service accepts. */ +export enum KnownBuildStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for BuildStatus. \ + * {@link KnownBuildStatus} can be used interchangeably with BuildStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **InProgress** \ + * **Succeeded** \ + * **Canceled** \ + * **Failed** + */ +export type BuildStatus = 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 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 CheckNameAvailabilityReason} that the service accepts. */ +export enum KnownCheckNameAvailabilityReason { + /** Invalid */ + Invalid = "Invalid", + /** AlreadyExists */ + AlreadyExists = "AlreadyExists" +} + +/** + * Defines values for CheckNameAvailabilityReason. \ + * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AlreadyExists** + */ +export type CheckNameAvailabilityReason = string; + +/** Known values of {@link CertificateProvisioningState} that the service accepts. */ +export enum KnownCertificateProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** DeleteFailed */ + DeleteFailed = "DeleteFailed", + /** Pending */ + Pending = "Pending" +} + +/** + * Defines values for CertificateProvisioningState. \ + * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **DeleteFailed** \ + * **Pending** + */ +export type CertificateProvisioningState = string; + +/** Known values of {@link AccessMode} that the service accepts. */ +export enum KnownAccessMode { + /** ReadOnly */ + ReadOnly = "ReadOnly", + /** ReadWrite */ + ReadWrite = "ReadWrite" +} + +/** + * Defines values for AccessMode. \ + * {@link KnownAccessMode} can be used interchangeably with AccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReadOnly** \ + * **ReadWrite** + */ +export type AccessMode = string; + /** Known values of {@link ContainerAppProvisioningState} that the service accepts. */ export enum KnownContainerAppProvisioningState { /** InProgress */ @@ -2138,6 +2823,45 @@ export enum KnownAction { */ export type Action = string; +/** Known values of {@link Affinity} that the service accepts. */ +export enum KnownAffinity { + /** Sticky */ + Sticky = "sticky", + /** None */ + None = "none" +} + +/** + * Defines values for Affinity. \ + * {@link KnownAffinity} can be used interchangeably with Affinity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **sticky** \ + * **none** + */ +export type Affinity = string; + +/** Known values of {@link IngressClientCertificateMode} that the service accepts. */ +export enum KnownIngressClientCertificateMode { + /** Ignore */ + Ignore = "ignore", + /** Accept */ + Accept = "accept", + /** Require */ + Require = "require" +} + +/** + * Defines values for IngressClientCertificateMode. \ + * {@link KnownIngressClientCertificateMode} can be used interchangeably with IngressClientCertificateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ignore** \ + * **accept** \ + * **require** + */ +export type IngressClientCertificateMode = string; + /** Known values of {@link AppProtocol} that the service accepts. */ export enum KnownAppProtocol { /** Http */ @@ -2224,7 +2948,9 @@ export enum KnownStorageType { /** AzureFile */ AzureFile = "AzureFile", /** EmptyDir */ - EmptyDir = "EmptyDir" + EmptyDir = "EmptyDir", + /** Secret */ + Secret = "Secret" } /** @@ -2233,7 +2959,8 @@ export enum KnownStorageType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **AzureFile** \ - * **EmptyDir** + * **EmptyDir** \ + * **Secret** */ export type StorageType = string; @@ -2285,23 +3012,47 @@ 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" +/** Known values of {@link ContainerAppReplicaRunningState} that the service accepts. */ +export enum KnownContainerAppReplicaRunningState { + /** Running */ + Running = "Running", + /** NotRunning */ + NotRunning = "NotRunning", + /** Unknown */ + Unknown = "Unknown" } /** - * Defines values for SkuName. \ - * {@link KnownSkuName} can be used interchangeably with SkuName, + * Defines values for ContainerAppReplicaRunningState. \ + * {@link KnownContainerAppReplicaRunningState} can be used interchangeably with ContainerAppReplicaRunningState, * 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. + * **Running** \ + * **NotRunning** \ + * **Unknown** */ -export type SkuName = string; +export type ContainerAppReplicaRunningState = string; + +/** Known values of {@link ContainerAppContainerRunningState} that the service accepts. */ +export enum KnownContainerAppContainerRunningState { + /** Running */ + Running = "Running", + /** Terminated */ + Terminated = "Terminated", + /** Waiting */ + Waiting = "Waiting" +} + +/** + * Defines values for ContainerAppContainerRunningState. \ + * {@link KnownContainerAppContainerRunningState} can be used interchangeably with ContainerAppContainerRunningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running** \ + * **Terminated** \ + * **Waiting** + */ +export type ContainerAppContainerRunningState = string; /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { @@ -2345,86 +3096,107 @@ 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 { +/** Known values of {@link JobProvisioningState} that the service accepts. */ +export enum KnownJobProvisioningState { + /** InProgress */ + InProgress = "InProgress", /** Succeeded */ Succeeded = "Succeeded", /** Failed */ Failed = "Failed", /** Canceled */ Canceled = "Canceled", - /** DeleteFailed */ - DeleteFailed = "DeleteFailed", - /** Pending */ - Pending = "Pending" + /** Deleting */ + Deleting = "Deleting" } /** - * Defines values for CertificateProvisioningState. \ - * {@link KnownCertificateProvisioningState} can be used interchangeably with CertificateProvisioningState, + * Defines values for JobProvisioningState. \ + * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **InProgress** \ * **Succeeded** \ * **Failed** \ * **Canceled** \ - * **DeleteFailed** \ - * **Pending** + * **Deleting** */ -export type CertificateProvisioningState = string; +export type JobProvisioningState = string; -/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ -export enum KnownCheckNameAvailabilityReason { - /** Invalid */ - Invalid = "Invalid", - /** AlreadyExists */ - AlreadyExists = "AlreadyExists" +/** Known values of {@link TriggerType} that the service accepts. */ +export enum KnownTriggerType { + /** Scheduled */ + Scheduled = "Scheduled", + /** Event */ + Event = "Event", + /** Manual */ + Manual = "Manual" } /** - * Defines values for CheckNameAvailabilityReason. \ - * {@link KnownCheckNameAvailabilityReason} can be used interchangeably with CheckNameAvailabilityReason, + * Defines values for TriggerType. \ + * {@link KnownTriggerType} can be used interchangeably with TriggerType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Invalid** \ - * **AlreadyExists** + * **Scheduled** \ + * **Event** \ + * **Manual** */ -export type CheckNameAvailabilityReason = string; +export type TriggerType = string; + +/** Known values of {@link JobExecutionRunningState} that the service accepts. */ +export enum KnownJobExecutionRunningState { + /** Running */ + Running = "Running", + /** Processing */ + Processing = "Processing", + /** Stopped */ + Stopped = "Stopped", + /** Degraded */ + Degraded = "Degraded", + /** Failed */ + Failed = "Failed", + /** Unknown */ + Unknown = "Unknown", + /** Succeeded */ + Succeeded = "Succeeded" +} -/** Known values of {@link AccessMode} that the service accepts. */ -export enum KnownAccessMode { - /** ReadOnly */ - ReadOnly = "ReadOnly", - /** ReadWrite */ - ReadWrite = "ReadWrite" +/** + * Defines values for JobExecutionRunningState. \ + * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running** \ + * **Processing** \ + * **Stopped** \ + * **Degraded** \ + * **Failed** \ + * **Unknown** \ + * **Succeeded** + */ +export type JobExecutionRunningState = string; + +/** Known values of {@link ManagedCertificateDomainControlValidation} that the service accepts. */ +export enum KnownManagedCertificateDomainControlValidation { + /** Cname */ + Cname = "CNAME", + /** Http */ + Http = "HTTP", + /** TXT */ + TXT = "TXT" } /** - * Defines values for AccessMode. \ - * {@link KnownAccessMode} can be used interchangeably with AccessMode, + * Defines values for ManagedCertificateDomainControlValidation. \ + * {@link KnownManagedCertificateDomainControlValidation} can be used interchangeably with ManagedCertificateDomainControlValidation, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ReadOnly** \ - * **ReadWrite** + * **CNAME** \ + * **HTTP** \ + * **TXT** */ -export type AccessMode = string; +export type ManagedCertificateDomainControlValidation = string; /** Known values of {@link SourceControlOperationState} that the service accepts. */ export enum KnownSourceControlOperationState { @@ -2449,127 +3221,358 @@ export enum KnownSourceControlOperationState { * **Canceled** */ export type SourceControlOperationState = string; +/** Defines values for UnauthenticatedClientActionV2. */ +export type UnauthenticatedClientActionV2 = + | "RedirectToLoginPage" + | "AllowAnonymous" + | "Return401" + | "Return403"; +/** Defines values for CookieExpirationConvention. */ +export type CookieExpirationConvention = + | "FixedTime" + | "IdentityProviderDerived"; +/** Defines values for ForwardProxyConvention. */ +export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; +/** Defines values for DnsVerificationTestResult. */ +export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; -/** 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" +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsAuthConfigsGetResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; + +/** 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 BuildersListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type BuildersListBySubscriptionResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type BuildersListByResourceGroupResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BuildersGetResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersCreateOrUpdateOptionalParams + 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 BuildersCreateOrUpdateResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersUpdateOptionalParams + 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 update operation. */ +export type BuildersUpdateResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersDeleteOptionalParams + 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 BuildersListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type BuildersListBySubscriptionNextResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type BuildersListByResourceGroupNextResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildsListByBuilderResourceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByBuilderResource operation. */ +export type BuildsListByBuilderResourceResponse = BuildCollection; + +/** Optional parameters. */ +export interface BuildsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BuildsGetResponse = BuildResource; + +/** Optional parameters. */ +export interface BuildsCreateOrUpdateOptionalParams + 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 BuildsCreateOrUpdateResponse = BuildResource; + +/** Optional parameters. */ +export interface BuildsDeleteOptionalParams + 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 BuildsListByBuilderResourceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByBuilderResourceNext operation. */ +export type BuildsListByBuilderResourceNextResponse = BuildCollection; + +/** 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; } -/** - * 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; +/** Contains response data for the createOrUpdate operation. */ +export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; -/** Known values of {@link Category} that the service accepts. */ -export enum KnownCategory { - /** PremiumSkuGeneralPurpose */ - PremiumSkuGeneralPurpose = "PremiumSkuGeneralPurpose", - /** PremiumSkuMemoryOptimized */ - PremiumSkuMemoryOptimized = "PremiumSkuMemoryOptimized", - /** PremiumSkuComputeOptimized */ - PremiumSkuComputeOptimized = "PremiumSkuComputeOptimized" -} +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * 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; +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link Applicability} that the service accepts. */ -export enum KnownApplicability { - /** LocationDefault */ - LocationDefault = "LocationDefault", - /** Custom */ - Custom = "Custom" -} +/** Contains response data for the update operation. */ +export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; -/** - * 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" - | "AllowAnonymous" - | "Return401" - | "Return403"; -/** Defines values for CookieExpirationConvention. */ -export type CookieExpirationConvention = - | "FixedTime" - | "IdentityProviderDerived"; -/** Defines values for ForwardProxyConvention. */ -export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; -/** Defines values for DnsVerificationTestResult. */ -export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; +/** Optional parameters. */ +export interface ConnectedEnvironmentsCertificatesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectedEnvironmentsCertificatesListNextResponse = CertificateCollection; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams +export interface ConnectedEnvironmentsDaprComponentsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; +/** Contains response data for the list operation. */ +export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsGetOptionalParams +export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ContainerAppsAuthConfigsGetResponse = AuthConfig; +export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsCreateOrUpdateOptionalParams +export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsAuthConfigsCreateOrUpdateResponse = AuthConfig; +export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = DaprComponent; /** Optional parameters. */ -export interface ContainerAppsAuthConfigsDeleteOptionalParams +export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ContainerAppsAuthConfigsListByContainerAppNextOptionalParams +export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByContainerAppNext operation. */ -export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigCollection; +/** 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 ContainerAppsListBySubscriptionOptionalParams @@ -2622,6 +3625,9 @@ export interface ContainerAppsUpdateOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type ContainerAppsUpdateResponse = ContainerApp; + /** Optional parameters. */ export interface ContainerAppsListCustomHostNameAnalysisOptionalParams extends coreClient.OperationOptions { @@ -2691,10 +3697,7 @@ export interface ContainerAppsRevisionsRestartRevisionOptionalParams /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsNextOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} + extends coreClient.OperationOptions {} /** Contains response data for the listRevisionsNext operation. */ export type ContainerAppsRevisionsListRevisionsNextResponse = RevisionCollection; @@ -2714,133 +3717,212 @@ export interface ContainerAppsRevisionReplicasListReplicasOptionalParams export type ContainerAppsRevisionReplicasListReplicasResponse = ReplicaCollection; /** Optional parameters. */ -export interface DaprComponentsListOptionalParams +export interface ContainerAppsDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type DaprComponentsListResponse = DaprComponentsCollection; +/** Contains response data for the listDetectors operation. */ +export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface DaprComponentsGetOptionalParams +export interface ContainerAppsDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DaprComponentsGetResponse = DaprComponent; +/** Contains response data for the getDetector operation. */ +export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; /** Optional parameters. */ -export interface DaprComponentsCreateOrUpdateOptionalParams +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 createOrUpdate operation. */ -export type DaprComponentsCreateOrUpdateResponse = DaprComponent; +/** Contains response data for the getRevision operation. */ +export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; /** Optional parameters. */ -export interface DaprComponentsDeleteOptionalParams +export interface ContainerAppsDiagnosticsGetRootOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the getRoot operation. */ +export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; + /** Optional parameters. */ -export interface DaprComponentsListSecretsOptionalParams +export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSecrets operation. */ -export type DaprComponentsListSecretsResponse = DaprSecretsCollection; +/** Contains response data for the listDetectorsNext operation. */ +export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface DaprComponentsListNextOptionalParams +export interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type DaprComponentsListNextResponse = DaprComponentsCollection; +/** Contains response data for the listRevisionsNext operation. */ +export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListDetectorsOptionalParams +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listDetectors operation. */ -export type ContainerAppsDiagnosticsListDetectorsResponse = DiagnosticsCollection; +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsGetDetectorOptionalParams +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getDetector operation. */ -export type ContainerAppsDiagnosticsGetDetectorResponse = Diagnostics; +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListRevisionsOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} +export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listRevisions operation. */ -export type ContainerAppsDiagnosticsListRevisionsResponse = RevisionCollection; +/** Contains response data for the getRoot operation. */ +export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsGetRevisionOptionalParams +export interface OperationsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getRevision operation. */ -export type ContainerAppsDiagnosticsGetRevisionResponse = Revision; +/** Contains response data for the list operation. */ +export type OperationsListResponse = AvailableOperations; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsGetRootOptionalParams +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getRoot operation. */ -export type ContainerAppsDiagnosticsGetRootResponse = ContainerApp; +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = AvailableOperations; /** Optional parameters. */ -export interface ContainerAppsDiagnosticsListDetectorsNextOptionalParams +export interface JobsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listDetectorsNext operation. */ -export type ContainerAppsDiagnosticsListDetectorsNextResponse = DiagnosticsCollection; +/** Contains response data for the listBySubscription operation. */ +export type JobsListBySubscriptionResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type JobsListByResourceGroupResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JobsGetResponse = Job; + +/** Optional parameters. */ +export interface JobsCreateOrUpdateOptionalParams + 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 JobsCreateOrUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsDeleteOptionalParams 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 JobsUpdateOptionalParams 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 update operation. */ +export type JobsUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsStartOptionalParams 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 start operation. */ +export type JobsStartResponse = JobExecutionBase; + +/** Optional parameters. */ +export interface JobsStopExecutionOptionalParams + 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 ContainerAppsDiagnosticsListRevisionsNextOptionalParams +export interface JobsStopMultipleExecutionsOptionalParams extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; + /** 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 listRevisionsNext operation. */ -export type ContainerAppsDiagnosticsListRevisionsNextResponse = RevisionCollection; +/** Contains response data for the stopMultipleExecutions operation. */ +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; /** Optional parameters. */ -export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams +export interface JobsListSecretsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listDetectors operation. */ -export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; +/** Contains response data for the listSecrets operation. */ +export type JobsListSecretsResponse = JobSecretsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams +export interface JobsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getDetector operation. */ -export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; +/** Contains response data for the listBySubscriptionNext operation. */ +export type JobsListBySubscriptionNextResponse = JobsCollection; /** Optional parameters. */ -export interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams +export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getRoot operation. */ -export type ManagedEnvironmentsDiagnosticsGetRootResponse = ManagedEnvironment; +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobsCollection; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface JobsExecutionsListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} /** Contains response data for the list operation. */ -export type OperationsListResponse = AvailableOperations; +export type JobsExecutionsListResponse = ContainerAppJobExecutions; /** Optional parameters. */ -export interface OperationsListNextOptionalParams +export interface JobsExecutionsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = AvailableOperations; +export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionOptionalParams @@ -2893,6 +3975,9 @@ export interface ManagedEnvironmentsUpdateOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type ManagedEnvironmentsUpdateResponse = ManagedEnvironment; + /** Optional parameters. */ export interface ManagedEnvironmentsGetAuthTokenOptionalParams extends coreClient.OperationOptions {} @@ -2971,54 +4056,17 @@ export interface CertificatesListNextOptionalParams export type CertificatesListNextResponse = CertificateCollection; /** Optional parameters. */ -export interface NamespacesCheckNameAvailabilityOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the checkNameAvailability operation. */ -export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; - -/** Optional parameters. */ -export interface ManagedEnvironmentsStoragesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsListByContainerAppOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByContainerApp operation. */ -export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsGetOptionalParams +export interface ManagedCertificatesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ContainerAppsSourceControlsGetResponse = SourceControl; +export type ManagedCertificatesGetResponse = ManagedCertificate; /** Optional parameters. */ -export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams +export interface ManagedCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** Managed Certificate to be created or updated */ + managedCertificateEnvelope?: ManagedCertificate; /** 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. */ @@ -3026,220 +4074,145 @@ export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; - -/** Optional parameters. */ -export interface ContainerAppsSourceControlsDeleteOptionalParams - 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 ContainerAppsSourceControlsListByContainerAppNextOptionalParams - extends coreClient.OperationOptions {} - -/** 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; +export type ManagedCertificatesCreateOrUpdateResponse = ManagedCertificate; /** Optional parameters. */ -export interface ConnectedEnvironmentsGetOptionalParams +export interface ManagedCertificatesDeleteOptionalParams 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 +export interface ManagedCertificatesUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the update operation. */ -export type ConnectedEnvironmentsUpdateResponse = ConnectedEnvironment; +export type ManagedCertificatesUpdateResponse = ManagedCertificate; /** Optional parameters. */ -export interface ConnectedEnvironmentsCheckNameAvailabilityOptionalParams +export interface ManagedCertificatesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the checkNameAvailability operation. */ -export type ConnectedEnvironmentsCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; +/** Contains response data for the list operation. */ +export type ManagedCertificatesListResponse = ManagedCertificateCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsListBySubscriptionNextOptionalParams +export interface ManagedCertificatesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySubscriptionNext operation. */ -export type ConnectedEnvironmentsListBySubscriptionNextResponse = ConnectedEnvironmentCollection; +/** Contains response data for the listNext operation. */ +export type ManagedCertificatesListNextResponse = ManagedCertificateCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsListByResourceGroupNextOptionalParams +export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ConnectedEnvironmentsListByResourceGroupNextResponse = ConnectedEnvironmentCollection; +/** Contains response data for the checkNameAvailability operation. */ +export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesListOptionalParams +export interface DaprComponentsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type ConnectedEnvironmentsCertificatesListResponse = CertificateCollection; +export type DaprComponentsListResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesGetOptionalParams +export interface DaprComponentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsCertificatesGetResponse = Certificate; +export type DaprComponentsGetResponse = DaprComponent; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Certificate to be created or updated */ - certificateEnvelope?: Certificate; -} +export interface DaprComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams +export interface DaprComponentsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams +export interface DaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; +/** Contains response data for the listSecrets operation. */ +export type DaprComponentsListSecretsResponse = DaprSecretsCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsCertificatesListNextOptionalParams +export interface DaprComponentsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type ConnectedEnvironmentsCertificatesListNextResponse = CertificateCollection; +export type DaprComponentsListNextResponse = DaprComponentsCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsListOptionalParams +export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; +export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams +export interface ManagedEnvironmentsStoragesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; +export type ManagedEnvironmentsStoragesGetResponse = ManagedEnvironmentStorage; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams +export interface ManagedEnvironmentsStoragesCreateOrUpdateOptionalParams 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; +export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = ManagedEnvironmentStorage; /** Optional parameters. */ -export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams +export interface ManagedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type ConnectedEnvironmentsDaprComponentsListNextResponse = DaprComponentsCollection; - /** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesListOptionalParams +export interface ContainerAppsSourceControlsListByContainerAppOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type ConnectedEnvironmentsStoragesListResponse = ConnectedEnvironmentStoragesCollection; +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; /** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesGetOptionalParams +export interface ContainerAppsSourceControlsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsStoragesGetResponse = ConnectedEnvironmentStorage; +export type ContainerAppsSourceControlsGetResponse = SourceControl; /** Optional parameters. */ -export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams + 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 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; +export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; /** Optional parameters. */ -export interface AvailableWorkloadProfilesGetNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getNext operation. */ -export type AvailableWorkloadProfilesGetNextResponse = AvailableWorkloadProfilesCollection; +export interface ContainerAppsSourceControlsDeleteOptionalParams + 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 BillingMetersGetOptionalParams +export interface ContainerAppsSourceControlsListByContainerAppNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type BillingMetersGetResponse = BillingMeterCollection; +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsSourceControlsListByContainerAppNextResponse = SourceControlCollection; /** Optional parameters. */ export interface ContainerAppsAPIClientOptionalParams diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index e70ccb8c77eb..4e459e980f31 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -1214,10 +1214,10 @@ export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = } }; -export const ContainerAppCollection: coreClient.CompositeMapper = { +export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppCollection", + className: "AvailableWorkloadProfilesCollection", modelProperties: { value: { serializedName: "value", @@ -1227,7 +1227,7 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerApp" + className: "AvailableWorkloadProfile" } } } @@ -1243,244 +1243,155 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { } }; -export const ExtendedLocation: coreClient.CompositeMapper = { +export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedLocation", + className: "AvailableWorkloadProfileProperties", modelProperties: { - name: { - serializedName: "name", + category: { + serializedName: "category", type: { name: "String" } }, - type: { - serializedName: "type", + applicability: { + serializedName: "applicability", type: { name: "String" } - } - } - } -}; - -export const ManagedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedServiceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + cores: { + serializedName: "cores", type: { - name: "Uuid" + name: "Number" } }, - type: { - serializedName: "type", - required: true, + memoryGiB: { + serializedName: "memoryGiB", type: { - name: "String" + name: "Number" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + displayName: { + serializedName: "displayName", type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } + name: "String" } } } } }; -export const UserAssignedIdentity: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserAssignedIdentity", + className: "ErrorResponse", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - clientId: { - serializedName: "clientId", - readOnly: true, + error: { + serializedName: "error", type: { - name: "Uuid" + name: "Composite", + className: "ErrorDetail" } } } } }; -export const Configuration: coreClient.CompositeMapper = { +export const ErrorDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Configuration", + className: "ErrorDetail", modelProperties: { - secrets: { - serializedName: "secrets", + code: { + serializedName: "code", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "String" } }, - activeRevisionsMode: { - serializedName: "activeRevisionsMode", + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } }, - ingress: { - serializedName: "ingress", + target: { + serializedName: "target", + readOnly: true, type: { - name: "Composite", - className: "Ingress" + name: "String" } }, - registries: { - serializedName: "registries", + details: { + serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RegistryCredentials" + className: "ErrorDetail" } } } }, - dapr: { - serializedName: "dapr", - type: { - name: "Composite", - className: "Dapr" - } - }, - maxInactiveRevisions: { - serializedName: "maxInactiveRevisions", + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } } }; -export const Secret: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Secret", + className: "ErrorAdditionalInfo", modelProperties: { - name: { - serializedName: "name", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", + info: { + serializedName: "info", + readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const Ingress: coreClient.CompositeMapper = { +export const BillingMeterCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Ingress", + className: "BillingMeterCollection", modelProperties: { - fqdn: { - serializedName: "fqdn", - readOnly: true, - type: { - name: "String" - } - }, - external: { - defaultValue: false, - serializedName: "external", - type: { - name: "Boolean" - } - }, - targetPort: { - serializedName: "targetPort", - type: { - name: "Number" - } - }, - exposedPort: { - serializedName: "exposedPort", - type: { - name: "Number" - } - }, - transport: { - serializedName: "transport", - type: { - name: "String" - } - }, - traffic: { - serializedName: "traffic", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TrafficWeight" - } - } - } - }, - customDomains: { - serializedName: "customDomains", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomDomain" - } - } - } - }, - allowInsecure: { - serializedName: "allowInsecure", - type: { - name: "Boolean" - } - }, - ipSecurityRestrictions: { - serializedName: "ipSecurityRestrictions", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "IpSecurityRestrictionRule" + className: "BillingMeter" } } } @@ -1489,32 +1400,25 @@ export const Ingress: coreClient.CompositeMapper = { } }; -export const TrafficWeight: coreClient.CompositeMapper = { +export const BillingMeterProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrafficWeight", + className: "BillingMeterProperties", modelProperties: { - revisionName: { - serializedName: "revisionName", + category: { + serializedName: "category", type: { name: "String" } }, - weight: { - serializedName: "weight", - type: { - name: "Number" - } - }, - latestRevision: { - defaultValue: false, - serializedName: "latestRevision", + meterType: { + serializedName: "meterType", type: { - name: "Boolean" + name: "String" } }, - label: { - serializedName: "label", + displayName: { + serializedName: "displayName", type: { name: "String" } @@ -1523,27 +1427,26 @@ export const TrafficWeight: coreClient.CompositeMapper = { } }; -export const CustomDomain: coreClient.CompositeMapper = { +export const BuilderCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomain", + className: "BuilderCollection", modelProperties: { - name: { - serializedName: "name", + value: { + serializedName: "value", required: true, type: { - name: "String" - } - }, - bindingType: { - serializedName: "bindingType", - type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BuilderResource" + } + } } }, - certificateId: { - serializedName: "certificateId", - required: true, + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -1552,256 +1455,197 @@ export const CustomDomain: coreClient.CompositeMapper = { } }; -export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IpSecurityRestrictionRule", + className: "ManagedServiceIdentity", modelProperties: { - name: { - serializedName: "name", - required: true, + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - description: { - serializedName: "description", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - ipAddressRange: { - serializedName: "ipAddressRange", + type: { + serializedName: "type", required: true, type: { name: "String" } }, - action: { - serializedName: "action", - required: true, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "String" + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } } } } } }; -export const RegistryCredentials: coreClient.CompositeMapper = { +export const UserAssignedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryCredentials", + className: "UserAssignedIdentity", modelProperties: { - server: { - serializedName: "server", - type: { - name: "String" - } - }, - username: { - serializedName: "username", - type: { - name: "String" - } - }, - passwordSecretRef: { - serializedName: "passwordSecretRef", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" + name: "Uuid" } }, - identity: { - serializedName: "identity", + clientId: { + serializedName: "clientId", + readOnly: true, type: { - name: "String" + name: "Uuid" } } } } }; -export const Dapr: coreClient.CompositeMapper = { +export const BuilderResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Dapr", + className: "BuilderResourceUpdate", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - appId: { - serializedName: "appId", - type: { - name: "String" - } - }, - appProtocol: { - serializedName: "appProtocol", - type: { - name: "String" - } - }, - appPort: { - serializedName: "appPort", - type: { - name: "Number" - } - }, - httpReadBufferSize: { - serializedName: "httpReadBufferSize", + identity: { + serializedName: "identity", type: { - name: "Number" + name: "Composite", + className: "ManagedServiceIdentity" } }, - httpMaxRequestSize: { - serializedName: "httpMaxRequestSize", + tags: { + serializedName: "tags", type: { - name: "Number" + name: "Dictionary", + value: { type: { name: "String" } } } }, - logLevel: { - serializedName: "logLevel", + environmentId: { + serializedName: "properties.environmentId", type: { name: "String" } - }, - enableApiLogging: { - serializedName: "enableApiLogging", - type: { - name: "Boolean" - } } } } }; -export const Template: coreClient.CompositeMapper = { +export const BuildCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Template", + className: "BuildCollection", modelProperties: { - revisionSuffix: { - serializedName: "revisionSuffix", - type: { - name: "String" - } - }, - initContainers: { - serializedName: "initContainers", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "InitContainer" + className: "BuildResource" } } } }, - containers: { - serializedName: "containers", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Container" - } - } + name: "String" + } + } + } + } +}; + +export const ContainerRegistryWithCustomImage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryWithCustomImage", + modelProperties: { + server: { + serializedName: "server", + required: true, + type: { + name: "String" } }, - scale: { - serializedName: "scale", + identity: { + serializedName: "identity", + required: true, type: { - name: "Composite", - className: "Scale" + name: "String" } }, - volumes: { - serializedName: "volumes", + image: { + serializedName: "image", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume" - } - } + name: "String" } } } } }; -export const BaseContainer: coreClient.CompositeMapper = { +export const BuildConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaseContainer", + className: "BuildConfiguration", modelProperties: { - image: { - serializedName: "image", + baseOs: { + serializedName: "baseOs", type: { name: "String" } }, - name: { - serializedName: "name", + platform: { + serializedName: "platform", type: { name: "String" } }, - command: { - serializedName: "command", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - args: { - serializedName: "args", + platformVersion: { + serializedName: "platformVersion", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - env: { - serializedName: "env", + environmentVariables: { + serializedName: "environmentVariables", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EnvironmentVar" + className: "EnvironmentVariable" } } } }, - resources: { - serializedName: "resources", - type: { - name: "Composite", - className: "ContainerResources" - } - }, - volumeMounts: { - serializedName: "volumeMounts", + preBuildSteps: { + serializedName: "preBuildSteps", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VolumeMount" + className: "PreBuildStep" } } } @@ -1810,25 +1654,21 @@ export const BaseContainer: coreClient.CompositeMapper = { } }; -export const EnvironmentVar: coreClient.CompositeMapper = { +export const EnvironmentVariable: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentVar", + className: "EnvironmentVariable", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, value: { serializedName: "value", - type: { - name: "String" - } - }, - secretRef: { - serializedName: "secretRef", + required: true, type: { name: "String" } @@ -1837,108 +1677,109 @@ export const EnvironmentVar: coreClient.CompositeMapper = { } }; -export const ContainerResources: coreClient.CompositeMapper = { +export const PreBuildStep: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerResources", + className: "PreBuildStep", modelProperties: { - cpu: { - serializedName: "cpu", + description: { + serializedName: "description", type: { - name: "Number" + name: "String" } }, - memory: { - serializedName: "memory", + scripts: { + serializedName: "scripts", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - ephemeralStorage: { - serializedName: "ephemeralStorage", - readOnly: true, + httpGet: { + serializedName: "httpGet", type: { - name: "String" + name: "Composite", + className: "HttpGet" } } } } }; -export const VolumeMount: coreClient.CompositeMapper = { +export const HttpGet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumeMount", + className: "HttpGet", modelProperties: { - volumeName: { - serializedName: "volumeName", + url: { + serializedName: "url", + required: true, type: { name: "String" } }, - mountPath: { - serializedName: "mountPath", + fileName: { + serializedName: "fileName", type: { name: "String" } + }, + headers: { + serializedName: "headers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const ContainerAppProbe: coreClient.CompositeMapper = { +export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbe", + className: "ConnectedEnvironmentCollection", modelProperties: { - failureThreshold: { - serializedName: "failureThreshold", - type: { - name: "Number" - } - }, - httpGet: { - serializedName: "httpGet", - type: { - name: "Composite", - className: "ContainerAppProbeHttpGet" - } - }, - initialDelaySeconds: { - serializedName: "initialDelaySeconds", - type: { - name: "Number" - } - }, - periodSeconds: { - serializedName: "periodSeconds", - type: { - name: "Number" - } - }, - successThreshold: { - serializedName: "successThreshold", - type: { - name: "Number" - } - }, - tcpSocket: { - serializedName: "tcpSocket", + value: { + serializedName: "value", type: { - name: "Composite", - className: "ContainerAppProbeTcpSocket" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironment" + } + } } }, - terminationGracePeriodSeconds: { - serializedName: "terminationGracePeriodSeconds", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - timeoutSeconds: { - serializedName: "timeoutSeconds", + } + } + } +}; + +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + name: { + serializedName: "name", type: { - name: "Number" + name: "String" } }, type: { @@ -1951,44 +1792,53 @@ export const ContainerAppProbe: coreClient.CompositeMapper = { } }; -export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { +export const CustomDomainConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGet", + className: "CustomDomainConfiguration", modelProperties: { - host: { - serializedName: "host", + customDomainVerificationId: { + serializedName: "customDomainVerificationId", + readOnly: true, type: { name: "String" } }, - httpHeaders: { - serializedName: "httpHeaders", + dnsSuffix: { + serializedName: "dnsSuffix", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem" - } - } + name: "String" } }, - path: { - serializedName: "path", + certificateValue: { + serializedName: "certificateValue", + type: { + name: "ByteArray" + } + }, + certificatePassword: { + serializedName: "certificatePassword", type: { name: "String" } }, - port: { - serializedName: "port", - required: true, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - scheme: { - serializedName: "scheme", + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + subjectName: { + serializedName: "subjectName", + readOnly: true, type: { name: "String" } @@ -1997,21 +1847,19 @@ export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { } }; -export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem", + className: "CheckNameAvailabilityRequest", modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + type: { + serializedName: "type", type: { name: "String" } @@ -2020,150 +1868,221 @@ export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper } }; -export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeTcpSocket", + className: "CheckNameAvailabilityResponse", modelProperties: { - host: { - serializedName: "host", + nameAvailable: { + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + serializedName: "reason", type: { name: "String" } }, - port: { - serializedName: "port", - required: true, + message: { + serializedName: "message", type: { - name: "Number" + name: "String" } } } } }; -export const Scale: coreClient.CompositeMapper = { +export const CertificateCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Scale", + className: "CertificateCollection", modelProperties: { - minReplicas: { - serializedName: "minReplicas", - type: { - name: "Number" - } - }, - maxReplicas: { - serializedName: "maxReplicas", - type: { - name: "Number" - } - }, - rules: { - serializedName: "rules", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRule" + className: "Certificate" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const ScaleRule: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRule", + className: "CertificateProperties", modelProperties: { - name: { - serializedName: "name", + provisioningState: { + serializedName: "provisioningState", + readOnly: true, type: { name: "String" } }, - azureQueue: { - serializedName: "azureQueue", + password: { + serializedName: "password", type: { - name: "Composite", - className: "QueueScaleRule" + name: "String" } }, - custom: { - serializedName: "custom", + subjectName: { + serializedName: "subjectName", + readOnly: true, type: { - name: "Composite", - className: "CustomScaleRule" + name: "String" } }, - http: { - serializedName: "http", + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", + readOnly: true, type: { - name: "Composite", - className: "HttpScaleRule" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - tcp: { - serializedName: "tcp", + value: { + serializedName: "value", type: { - name: "Composite", - className: "TcpScaleRule" + name: "ByteArray" } - } - } - } -}; - -export const QueueScaleRule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueueScaleRule", - modelProperties: { - queueName: { - serializedName: "queueName", + }, + issuer: { + serializedName: "issuer", + readOnly: true, type: { name: "String" } }, - queueLength: { - serializedName: "queueLength", + issueDate: { + serializedName: "issueDate", + readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - auth: { - serializedName: "auth", + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String" + } + }, + valid: { + serializedName: "valid", + readOnly: true, + type: { + name: "Boolean" + } + }, + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const CertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const DaprComponentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRuleAuth" + className: "DaprComponent" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const ScaleRuleAuth: coreClient.CompositeMapper = { +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRuleAuth", + className: "Secret", modelProperties: { - secretRef: { - serializedName: "secretRef", + name: { + serializedName: "name", type: { name: "String" } }, - triggerParameter: { - serializedName: "triggerParameter", + value: { + serializedName: "value", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", type: { name: "String" } @@ -2172,60 +2091,47 @@ export const ScaleRuleAuth: coreClient.CompositeMapper = { } }; -export const CustomScaleRule: coreClient.CompositeMapper = { +export const DaprMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomScaleRule", + className: "DaprMetadata", modelProperties: { - type: { - serializedName: "type", + name: { + serializedName: "name", type: { name: "String" } }, - metadata: { - serializedName: "metadata", + value: { + serializedName: "value", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - auth: { - serializedName: "auth", + secretRef: { + serializedName: "secretRef", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth" - } - } + name: "String" } } } } }; -export const HttpScaleRule: coreClient.CompositeMapper = { +export const DaprSecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpScaleRule", + className: "DaprSecretsCollection", modelProperties: { - metadata: { - serializedName: "metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - auth: { - serializedName: "auth", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRuleAuth" + className: "DaprSecret" } } } @@ -2234,26 +2140,43 @@ export const HttpScaleRule: coreClient.CompositeMapper = { } }; -export const TcpScaleRule: coreClient.CompositeMapper = { +export const DaprSecret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TcpScaleRule", + className: "DaprSecret", modelProperties: { - metadata: { - serializedName: "metadata", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - auth: { - serializedName: "auth", + value: { + serializedName: "value", + 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: "ScaleRuleAuth" + className: "ConnectedEnvironmentStorage" } } } @@ -2262,25 +2185,47 @@ export const TcpScaleRule: coreClient.CompositeMapper = { } }; -export const Volume: coreClient.CompositeMapper = { +export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Volume", + className: "ConnectedEnvironmentStorageProperties", modelProperties: { - name: { - serializedName: "name", + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties" + } + } + } + } +}; + +export const AzureFileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureFileProperties", + modelProperties: { + accountName: { + serializedName: "accountName", type: { name: "String" } }, - storageType: { - serializedName: "storageType", + accountKey: { + serializedName: "accountKey", type: { name: "String" } }, - storageName: { - serializedName: "storageName", + accessMode: { + serializedName: "accessMode", + type: { + name: "String" + } + }, + shareName: { + serializedName: "shareName", type: { name: "String" } @@ -2289,188 +2234,254 @@ export const Volume: coreClient.CompositeMapper = { } }; -export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { +export const ContainerAppCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomHostnameAnalysisResult", + className: "ContainerAppCollection", modelProperties: { - hostName: { - serializedName: "hostName", - readOnly: true, - type: { - name: "String" - } - }, - isHostnameAlreadyVerified: { - serializedName: "isHostnameAlreadyVerified", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerApp" + } + } } }, - customDomainVerificationTest: { - serializedName: "customDomainVerificationTest", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Enum", - allowedValues: ["Passed", "Failed", "Skipped"] + name: "String" + } + } + } + } +}; + +export const Configuration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Configuration", + modelProperties: { + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } }, - customDomainVerificationFailureInfo: { - serializedName: "customDomainVerificationFailureInfo", + activeRevisionsMode: { + defaultValue: "Single", + serializedName: "activeRevisionsMode", + type: { + name: "String" + } + }, + ingress: { + serializedName: "ingress", type: { name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo" + className: "Ingress" } }, - hasConflictOnManagedEnvironment: { - serializedName: "hasConflictOnManagedEnvironment", - readOnly: true, + registries: { + serializedName: "registries", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryCredentials" + } + } } }, - conflictWithEnvironmentCustomDomain: { - serializedName: "conflictWithEnvironmentCustomDomain", + dapr: { + serializedName: "dapr", + type: { + name: "Composite", + className: "Dapr" + } + }, + maxInactiveRevisions: { + serializedName: "maxInactiveRevisions", + type: { + name: "Number" + } + } + } + } +}; + +export const Ingress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Ingress", + modelProperties: { + fqdn: { + serializedName: "fqdn", readOnly: true, + type: { + name: "String" + } + }, + external: { + defaultValue: false, + serializedName: "external", type: { name: "Boolean" } }, - conflictingContainerAppResourceId: { - serializedName: "conflictingContainerAppResourceId", - readOnly: true, + targetPort: { + serializedName: "targetPort", + type: { + name: "Number" + } + }, + exposedPort: { + serializedName: "exposedPort", + type: { + name: "Number" + } + }, + transport: { + defaultValue: "auto", + serializedName: "transport", type: { name: "String" } }, - cNameRecords: { - serializedName: "cNameRecords", + traffic: { + serializedName: "traffic", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "TrafficWeight" } } } }, - txtRecords: { - serializedName: "txtRecords", + customDomains: { + serializedName: "customDomains", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "CustomDomain" } } } }, - aRecords: { - serializedName: "aRecords", + allowInsecure: { + defaultValue: false, + serializedName: "allowInsecure", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - alternateCNameRecords: { - serializedName: "alternateCNameRecords", + ipSecurityRestrictions: { + serializedName: "ipSecurityRestrictions", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "IpSecurityRestrictionRule" } } } }, - alternateTxtRecords: { - serializedName: "alternateTxtRecords", + stickySessions: { + serializedName: "stickySessions", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "IngressStickySessions" + } + }, + clientCertificateMode: { + serializedName: "clientCertificateMode", + type: { + name: "String" + } + }, + corsPolicy: { + serializedName: "corsPolicy", + type: { + name: "Composite", + className: "CorsPolicy" } } } } }; -export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = { +export const TrafficWeight: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + className: "TrafficWeight", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + revisionName: { + serializedName: "revisionName", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + weight: { + serializedName: "weight", type: { - name: "String" + name: "Number" } }, - target: { - serializedName: "target", - readOnly: true, + latestRevision: { + defaultValue: false, + serializedName: "latestRevision", type: { - name: "String" + name: "Boolean" } }, - details: { - serializedName: "details", + label: { + serializedName: "label", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem" - } - } + name: "String" } } } } }; -export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = { +export const CustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + className: "CustomDomain", modelProperties: { - code: { - serializedName: "code", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + bindingType: { + serializedName: "bindingType", type: { name: "String" } }, - target: { - serializedName: "target", - readOnly: true, + certificateId: { + serializedName: "certificateId", type: { name: "String" } @@ -2479,43 +2490,49 @@ export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDeta } }; -export const SecretsCollection: coreClient.CompositeMapper = { +export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretsCollection", + className: "IpSecurityRestrictionRule", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppSecret" - } - } + 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 ContainerAppSecret: coreClient.CompositeMapper = { +export const IngressStickySessions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppSecret", + className: "IngressStickySessions", modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - readOnly: true, + affinity: { + serializedName: "affinity", type: { name: "String" } @@ -2524,102 +2541,220 @@ export const ContainerAppSecret: coreClient.CompositeMapper = { } }; -export const RevisionCollection: coreClient.CompositeMapper = { +export const CorsPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RevisionCollection", + className: "CorsPolicy", modelProperties: { - value: { - serializedName: "value", + allowedOrigins: { + serializedName: "allowedOrigins", required: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Revision" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + allowedMethods: { + serializedName: "allowedMethods", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + allowedHeaders: { + serializedName: "allowedHeaders", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + exposeHeaders: { + serializedName: "exposeHeaders", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxAge: { + serializedName: "maxAge", + type: { + name: "Number" + } + }, + allowCredentials: { + serializedName: "allowCredentials", + type: { + name: "Boolean" } } } } }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "RegistryCredentials", modelProperties: { - name: { - serializedName: "name", + server: { + serializedName: "server", type: { name: "String" } }, - containerId: { - serializedName: "containerId", + username: { + serializedName: "username", type: { name: "String" } }, - ready: { - serializedName: "ready", + passwordSecretRef: { + serializedName: "passwordSecretRef", type: { - name: "Boolean" + name: "String" } }, - started: { - serializedName: "started", + identity: { + serializedName: "identity", + type: { + name: "String" + } + } + } + } +}; + +export const Dapr: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Dapr", + modelProperties: { + enabled: { + defaultValue: false, + serializedName: "enabled", type: { name: "Boolean" } }, - restartCount: { - serializedName: "restartCount", + appId: { + serializedName: "appId", type: { - name: "Number" + name: "String" } }, - logStreamEndpoint: { - serializedName: "logStreamEndpoint", - readOnly: true, + appProtocol: { + defaultValue: "http", + serializedName: "appProtocol", type: { name: "String" } }, - execEndpoint: { - serializedName: "execEndpoint", - readOnly: true, + appPort: { + serializedName: "appPort", + 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" + } } } } }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const Template: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "Template", modelProperties: { - value: { - serializedName: "value", - required: true, + revisionSuffix: { + serializedName: "revisionSuffix", + type: { + name: "String" + } + }, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, + initContainers: { + serializedName: "initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Replica" + className: "InitContainer" + } + } + } + }, + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } + } + }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "Scale" + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" } } } @@ -2628,39 +2763,84 @@ export const ReplicaCollection: coreClient.CompositeMapper = { } }; -export const DaprComponentsCollection: coreClient.CompositeMapper = { +export const BaseContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprComponentsCollection", + className: "BaseContainer", modelProperties: { - value: { - serializedName: "value", - required: true, + image: { + serializedName: "image", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + env: { + serializedName: "env", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprComponent" + className: "EnvironmentVar" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + resources: { + serializedName: "resources", type: { - name: "String" + name: "Composite", + className: "ContainerResources" + } + }, + volumeMounts: { + serializedName: "volumeMounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeMount" + } + } } } } } }; -export const DaprMetadata: coreClient.CompositeMapper = { +export const EnvironmentVar: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprMetadata", + className: "EnvironmentVar", modelProperties: { name: { serializedName: "name", @@ -2684,49 +2864,53 @@ export const DaprMetadata: coreClient.CompositeMapper = { } }; -export const DaprSecretsCollection: coreClient.CompositeMapper = { +export const ContainerResources: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecretsCollection", + className: "ContainerResources", modelProperties: { - value: { - serializedName: "value", - required: true, + cpu: { + serializedName: "cpu", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret" - } - } + name: "Number" + } + }, + memory: { + serializedName: "memory", + type: { + name: "String" + } + }, + ephemeralStorage: { + serializedName: "ephemeralStorage", + readOnly: true, + type: { + name: "String" } } } } }; -export const DiagnosticsCollection: coreClient.CompositeMapper = { +export const VolumeMount: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsCollection", + className: "VolumeMount", modelProperties: { - value: { - serializedName: "value", - required: true, + volumeName: { + serializedName: "volumeName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Diagnostics" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + mountPath: { + serializedName: "mountPath", + type: { + name: "String" + } + }, + subPath: { + serializedName: "subPath", type: { name: "String" } @@ -2735,144 +2919,132 @@ export const DiagnosticsCollection: coreClient.CompositeMapper = { } }; -export const DiagnosticsProperties: coreClient.CompositeMapper = { +export const ContainerAppProbe: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProperties", + className: "ContainerAppProbe", modelProperties: { - metadata: { - serializedName: "metadata", + failureThreshold: { + serializedName: "failureThreshold", + type: { + name: "Number" + } + }, + httpGet: { + serializedName: "httpGet", type: { name: "Composite", - className: "DiagnosticsDefinition" + className: "ContainerAppProbeHttpGet" } }, - dataset: { - serializedName: "dataset", + initialDelaySeconds: { + serializedName: "initialDelaySeconds", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticsDataApiResponse" - } - } + name: "Number" } }, - status: { - serializedName: "status", + periodSeconds: { + serializedName: "periodSeconds", type: { - name: "Composite", - className: "DiagnosticsStatus" + name: "Number" } }, - dataProviderMetadata: { - serializedName: "dataProviderMetadata", + successThreshold: { + serializedName: "successThreshold", type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata" + name: "Number" } - } - } - } -}; - -export const DiagnosticsDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticsDefinition", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, + }, + tcpSocket: { + serializedName: "tcpSocket", type: { - name: "String" + name: "Composite", + className: "ContainerAppProbeTcpSocket" } }, - name: { - serializedName: "name", - readOnly: true, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", type: { - name: "String" + name: "Number" } }, - description: { - serializedName: "description", - readOnly: true, + timeoutSeconds: { + serializedName: "timeoutSeconds", type: { - name: "String" + name: "Number" } }, - author: { - serializedName: "author", - readOnly: true, + type: { + serializedName: "type", type: { name: "String" } - }, - category: { - serializedName: "category", - readOnly: true, + } + } + } +}; + +export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGet", + modelProperties: { + host: { + serializedName: "host", type: { name: "String" } }, - supportTopicList: { - serializedName: "supportTopicList", + httpHeaders: { + serializedName: "httpHeaders", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticSupportTopic" + className: "ContainerAppProbeHttpGetHttpHeadersItem" } } } }, - analysisTypes: { - serializedName: "analysisTypes", + path: { + serializedName: "path", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + port: { + serializedName: "port", + required: true, type: { - name: "String" + name: "Number" } }, - score: { - serializedName: "score", - readOnly: true, + scheme: { + serializedName: "scheme", type: { - name: "Number" + name: "String" } } } } }; -export const DiagnosticSupportTopic: coreClient.CompositeMapper = { +export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticSupportTopic", + className: "ContainerAppProbeHttpGetHttpHeadersItem", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - pesId: { - serializedName: "pesId", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { name: "String" } @@ -2881,60 +3053,54 @@ export const DiagnosticSupportTopic: coreClient.CompositeMapper = { } }; -export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { +export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "ContainerAppProbeTcpSocket", modelProperties: { - table: { - serializedName: "table", + host: { + serializedName: "host", type: { - name: "Composite", - className: "DiagnosticDataTableResponseObject" + name: "String" } }, - renderingProperties: { - serializedName: "renderingProperties", + port: { + serializedName: "port", + required: true, type: { - name: "Composite", - className: "DiagnosticRendering" + name: "Number" } } } } }; -export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { +export const Scale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseObject", + className: "Scale", modelProperties: { - tableName: { - serializedName: "tableName", + minReplicas: { + serializedName: "minReplicas", type: { - name: "String" + name: "Number" } }, - columns: { - serializedName: "columns", + maxReplicas: { + defaultValue: 10, + serializedName: "maxReplicas", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticDataTableResponseColumn" - } - } + name: "Number" } }, - rows: { - serializedName: "rows", + rules: { + serializedName: "rules", type: { name: "Sequence", element: { type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Composite", + className: "ScaleRule" } } } @@ -2943,106 +3109,129 @@ export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { } }; -export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { +export const ScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "ScaleRule", modelProperties: { - columnName: { - serializedName: "columnName", + name: { + serializedName: "name", type: { name: "String" } }, - dataType: { - serializedName: "dataType", + azureQueue: { + serializedName: "azureQueue", type: { - name: "String" + name: "Composite", + className: "QueueScaleRule" } }, - columnType: { - serializedName: "columnType", + custom: { + serializedName: "custom", type: { - name: "String" - } + name: "Composite", + className: "CustomScaleRule" + } + }, + http: { + serializedName: "http", + type: { + name: "Composite", + className: "HttpScaleRule" + } + }, + tcp: { + serializedName: "tcp", + type: { + name: "Composite", + className: "TcpScaleRule" + } } } } }; -export const DiagnosticRendering: coreClient.CompositeMapper = { +export const QueueScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticRendering", + className: "QueueScaleRule", modelProperties: { - type: { - serializedName: "type", - type: { - name: "Number" - } - }, - title: { - serializedName: "title", + queueName: { + serializedName: "queueName", type: { name: "String" } }, - description: { - serializedName: "description", + queueLength: { + serializedName: "queueLength", type: { - name: "String" + name: "Number" } }, - isVisible: { - serializedName: "isVisible", + auth: { + serializedName: "auth", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const DiagnosticsStatus: coreClient.CompositeMapper = { +export const ScaleRuleAuth: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsStatus", + className: "ScaleRuleAuth", modelProperties: { - message: { - serializedName: "message", + secretRef: { + serializedName: "secretRef", type: { name: "String" } }, - statusId: { - serializedName: "statusId", + triggerParameter: { + serializedName: "triggerParameter", type: { - name: "Number" + name: "String" } } } } }; -export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { +export const CustomScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadata", + className: "CustomScaleRule", modelProperties: { - providerName: { - serializedName: "providerName", + type: { + serializedName: "type", type: { name: "String" } }, - propertyBag: { - serializedName: "propertyBag", + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem" + className: "ScaleRuleAuth" } } } @@ -3051,330 +3240,310 @@ export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { } }; -export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { +export const HttpScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", + className: "HttpScaleRule", modelProperties: { - name: { - serializedName: "name", + metadata: { + serializedName: "metadata", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - value: { - serializedName: "value", + auth: { + serializedName: "auth", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const EnvironmentSkuProperties: coreClient.CompositeMapper = { +export const TcpScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentSkuProperties", + className: "TcpScaleRule", modelProperties: { - name: { - serializedName: "name", - required: true, + metadata: { + serializedName: "metadata", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const Volume: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "Volume", modelProperties: { - internal: { - serializedName: "internal", - type: { - name: "Boolean" - } - }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + name: { + serializedName: "name", type: { name: "String" } }, - runtimeSubnetId: { - serializedName: "runtimeSubnetId", + storageType: { + serializedName: "storageType", type: { name: "String" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + storageName: { + serializedName: "storageName", type: { name: "String" } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + secrets: { + serializedName: "secrets", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecretVolumeItem" + } + } } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + mountOptions: { + serializedName: "mountOptions", type: { name: "String" } - }, - outboundSettings: { - serializedName: "outboundSettings", - type: { - name: "Composite", - className: "ManagedEnvironmentOutboundSettings" - } } } } }; -export const ManagedEnvironmentOutboundSettings: coreClient.CompositeMapper = { +export const SecretVolumeItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentOutboundSettings", + className: "SecretVolumeItem", modelProperties: { - outBoundType: { - serializedName: "outBoundType", + secretRef: { + serializedName: "secretRef", type: { name: "String" } }, - virtualNetworkApplianceIp: { - serializedName: "virtualNetworkApplianceIp", - type: { - name: "String" - } - } - } - } -}; - -export const AppLogsConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AppLogsConfiguration", - modelProperties: { - destination: { - serializedName: "destination", + path: { + serializedName: "path", type: { name: "String" } - }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", - type: { - name: "Composite", - className: "LogAnalyticsConfiguration" - } } } } }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "CustomHostnameAnalysisResult", modelProperties: { - customerId: { - serializedName: "customerId", + hostName: { + serializedName: "hostName", + readOnly: true, type: { name: "String" } }, - sharedKey: { - serializedName: "sharedKey", - type: { - name: "String" - } - } - } - } -}; - -export const CustomDomainConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomDomainConfiguration", - modelProperties: { - customDomainVerificationId: { - serializedName: "customDomainVerificationId", + isHostnameAlreadyVerified: { + serializedName: "isHostnameAlreadyVerified", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - dnsSuffix: { - serializedName: "dnsSuffix", + customDomainVerificationTest: { + serializedName: "customDomainVerificationTest", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Passed", "Failed", "Skipped"] } }, - certificateValue: { - serializedName: "certificateValue", + customDomainVerificationFailureInfo: { + serializedName: "customDomainVerificationFailureInfo", type: { - name: "ByteArray" + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo" } }, - certificatePassword: { - serializedName: "certificatePassword", + hasConflictOnManagedEnvironment: { + serializedName: "hasConflictOnManagedEnvironment", + readOnly: true, type: { - name: "ByteArray" + name: "Boolean" } }, - expirationDate: { - serializedName: "expirationDate", + conflictWithEnvironmentCustomDomain: { + serializedName: "conflictWithEnvironmentCustomDomain", readOnly: true, type: { - name: "DateTime" + name: "Boolean" } }, - thumbprint: { - serializedName: "thumbprint", + conflictingContainerAppResourceId: { + serializedName: "conflictingContainerAppResourceId", 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, + cNameRecords: { + serializedName: "cNameRecords", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - minimumCount: { - serializedName: "minimumCount", - required: true, + txtRecords: { + serializedName: "txtRecords", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - maximumCount: { - serializedName: "maximumCount", - required: true, + aRecords: { + serializedName: "aRecords", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const AvailableOperations: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableOperations", - modelProperties: { - value: { - serializedName: "value", + }, + alternateCNameRecords: { + serializedName: "alternateCNameRecords", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "OperationDetail" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", + alternateTxtRecords: { + serializedName: "alternateTxtRecords", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", modelProperties: { - name: { - serializedName: "name", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + message: { + serializedName: "message", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - display: { - serializedName: "display", + target: { + serializedName: "target", + readOnly: true, type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } }, - origin: { - serializedName: "origin", + details: { + serializedName: "details", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem" + } + } } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", modelProperties: { - provider: { - serializedName: "provider", - type: { - name: "String" - } - }, - resource: { - serializedName: "resource", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - operation: { - serializedName: "operation", + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", + target: { + serializedName: "target", + readOnly: true, type: { name: "String" } @@ -3383,10 +3552,10 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { +export const SecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentsCollection", + className: "SecretsCollection", modelProperties: { value: { serializedName: "value", @@ -3396,13 +3565,43 @@ export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ManagedEnvironment" + className: "ContainerAppSecret" } } } + } + } + } +}; + +export const ContainerAppSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } }, - nextLink: { - serializedName: "nextLink", + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + readOnly: true, + type: { + name: "String" + } + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", readOnly: true, type: { name: "String" @@ -3412,10 +3611,10 @@ export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { } }; -export const CertificateCollection: coreClient.CompositeMapper = { +export const RevisionCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateCollection", + className: "RevisionCollection", modelProperties: { value: { serializedName: "value", @@ -3425,7 +3624,7 @@ export const CertificateCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Certificate" + className: "Revision" } } } @@ -3441,86 +3640,64 @@ export const CertificateCollection: coreClient.CompositeMapper = { } }; -export const CertificateProperties: coreClient.CompositeMapper = { +export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateProperties", + className: "ReplicaContainer", modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - password: { - serializedName: "password", + containerId: { + serializedName: "containerId", type: { name: "String" } }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + ready: { + serializedName: "ready", type: { - name: "String" + name: "Boolean" } }, - subjectAlternativeNames: { - serializedName: "subjectAlternativeNames", - readOnly: true, + started: { + serializedName: "started", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - value: { - serializedName: "value", + restartCount: { + serializedName: "restartCount", type: { - name: "ByteArray" + name: "Number" } }, - issuer: { - serializedName: "issuer", + runningState: { + serializedName: "runningState", readOnly: true, type: { name: "String" } }, - issueDate: { - serializedName: "issueDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - thumbprint: { - serializedName: "thumbprint", + runningStateDetails: { + serializedName: "runningStateDetails", readOnly: true, type: { name: "String" } }, - valid: { - serializedName: "valid", + logStreamEndpoint: { + serializedName: "logStreamEndpoint", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - publicKeyHash: { - serializedName: "publicKeyHash", + execEndpoint: { + serializedName: "execEndpoint", readOnly: true, type: { name: "String" @@ -3530,35 +3707,49 @@ export const CertificateProperties: coreClient.CompositeMapper = { } }; -export const CertificatePatch: coreClient.CompositeMapper = { +export const ReplicaCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificatePatch", + className: "ReplicaCollection", modelProperties: { - tags: { - serializedName: "tags", + value: { + serializedName: "value", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replica" + } + } } } } } }; -export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { +export const DiagnosticsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityRequest", + className: "DiagnosticsCollection", modelProperties: { - name: { - serializedName: "name", + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Diagnostics" + } + } } }, - type: { - serializedName: "type", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -3567,152 +3758,233 @@ export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { } }; -export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { +export const DiagnosticsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityResponse", + className: "DiagnosticsProperties", modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", + metadata: { + serializedName: "metadata", type: { - name: "Boolean" + name: "Composite", + className: "DiagnosticsDefinition" } }, - reason: { - serializedName: "reason", + dataset: { + serializedName: "dataset", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse" + } + } } }, - message: { - serializedName: "message", + status: { + serializedName: "status", type: { - name: "String" + name: "Composite", + className: "DiagnosticsStatus" + } + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata" } } } } }; -export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { +export const DiagnosticsDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfileStatesCollection", + className: "DiagnosticsDefinition", modelProperties: { - value: { - serializedName: "value", - required: true, + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String" + } + }, + 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: "WorkloadProfileStates" + className: "DiagnosticSupportTopic" } } } }, - nextLink: { - serializedName: "nextLink", + 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 WorkloadProfileStatesProperties: coreClient.CompositeMapper = { +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfileStatesProperties", + className: "DiagnosticSupportTopic", modelProperties: { - minimumCount: { - serializedName: "minimumCount", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Number" + name: "String" } }, - maximumCount: { - serializedName: "maximumCount", + pesId: { + serializedName: "pesId", + readOnly: true, type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse", + modelProperties: { + table: { + serializedName: "table", + type: { + name: "Composite", + className: "DiagnosticDataTableResponseObject" } }, - currentCount: { - serializedName: "currentCount", + renderingProperties: { + serializedName: "renderingProperties", type: { - name: "Number" + name: "Composite", + className: "DiagnosticRendering" } } } } }; -export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentStoragesCollection", + className: "DiagnosticDataTableResponseObject", modelProperties: { - value: { - serializedName: "value", - required: true, + tableName: { + serializedName: "tableName", + type: { + name: "String" + } + }, + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagedEnvironmentStorage" + className: "DiagnosticDataTableResponseColumn" } } } - } - } - } -}; - -export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedEnvironmentStorageProperties", - modelProperties: { - azureFile: { - serializedName: "azureFile", + }, + rows: { + serializedName: "rows", type: { - name: "Composite", - className: "AzureFileProperties" + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + } } } } } }; -export const AzureFileProperties: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureFileProperties", + className: "DiagnosticDataTableResponseColumn", modelProperties: { - accountName: { - serializedName: "accountName", - type: { - name: "String" - } - }, - accountKey: { - serializedName: "accountKey", + columnName: { + serializedName: "columnName", type: { name: "String" } }, - accessMode: { - serializedName: "accessMode", + dataType: { + serializedName: "dataType", type: { name: "String" } }, - shareName: { - serializedName: "shareName", + columnType: { + serializedName: "columnType", type: { name: "String" } @@ -3721,86 +3993,100 @@ export const AzureFileProperties: coreClient.CompositeMapper = { } }; -export const SourceControlCollection: coreClient.CompositeMapper = { +export const DiagnosticRendering: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceControlCollection", + className: "DiagnosticRendering", modelProperties: { - value: { - serializedName: "value", - required: true, + type: { + serializedName: "type", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SourceControl" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + title: { + serializedName: "title", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean" + } } } } }; -export const GithubActionConfiguration: coreClient.CompositeMapper = { +export const DiagnosticsStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GithubActionConfiguration", + className: "DiagnosticsStatus", modelProperties: { - registryInfo: { - serializedName: "registryInfo", - type: { - name: "Composite", - className: "RegistryInfo" - } - }, - azureCredentials: { - serializedName: "azureCredentials", - type: { - name: "Composite", - className: "AzureCredentials" - } - }, - contextPath: { - serializedName: "contextPath", + message: { + serializedName: "message", type: { name: "String" } }, - image: { - serializedName: "image", + statusId: { + serializedName: "statusId", type: { - name: "String" + name: "Number" } - }, - publishType: { - serializedName: "publishType", + } + } + } +}; + +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata", + modelProperties: { + providerName: { + serializedName: "providerName", type: { name: "String" } }, - os: { - serializedName: "os", + propertyBag: { + serializedName: "propertyBag", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadataPropertyBagItem" + } + } } - }, - runtimeStack: { - serializedName: "runtimeStack", + } + } + } +}; + +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadataPropertyBagItem", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - runtimeVersion: { - serializedName: "runtimeVersion", + value: { + serializedName: "value", type: { name: "String" } @@ -3809,25 +4095,37 @@ export const GithubActionConfiguration: coreClient.CompositeMapper = { } }; -export const RegistryInfo: coreClient.CompositeMapper = { +export const VnetConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryInfo", + className: "VnetConfiguration", modelProperties: { - registryUrl: { - serializedName: "registryUrl", + internal: { + serializedName: "internal", + type: { + name: "Boolean" + } + }, + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { name: "String" } }, - registryUserName: { - serializedName: "registryUserName", + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { name: "String" } }, - registryPassword: { - serializedName: "registryPassword", + platformReservedCidr: { + serializedName: "platformReservedCidr", + type: { + name: "String" + } + }, + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", type: { name: "String" } @@ -3836,31 +4134,41 @@ export const RegistryInfo: coreClient.CompositeMapper = { } }; -export const AzureCredentials: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureCredentials", + className: "AppLogsConfiguration", modelProperties: { - clientId: { - serializedName: "clientId", + destination: { + serializedName: "destination", type: { name: "String" } }, - clientSecret: { - serializedName: "clientSecret", + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", type: { - name: "String" + name: "Composite", + className: "LogAnalyticsConfiguration" } - }, - tenantId: { - serializedName: "tenantId", + } + } + } +}; + +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogAnalyticsConfiguration", + modelProperties: { + customerId: { + serializedName: "customerId", type: { name: "String" } }, - subscriptionId: { - serializedName: "subscriptionId", + sharedKey: { + serializedName: "sharedKey", type: { name: "String" } @@ -3869,93 +4177,92 @@ export const AzureCredentials: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { +export const WorkloadProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentCollection", + className: "WorkloadProfile", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedEnvironment" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, type: { name: "String" } + }, + minimumCount: { + serializedName: "minimumCount", + type: { + name: "Number" + } + }, + maximumCount: { + serializedName: "maximumCount", + type: { + name: "Number" + } } } } }; -export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { +export const KedaConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStoragesCollection", + className: "KedaConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + version: { + serializedName: "version", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedEnvironmentStorage" - } - } + name: "String" } } } } }; -export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { +export const DaprConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties", + className: "DaprConfiguration", modelProperties: { - azureFile: { - serializedName: "azureFile", + version: { + serializedName: "version", + readOnly: true, type: { - name: "Composite", - className: "AzureFileProperties" + name: "String" } } } } }; -export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { +export const AvailableOperations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableWorkloadProfilesCollection", + className: "AvailableOperations", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "AvailableWorkloadProfile" + className: "OperationDetail" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -3964,109 +4271,162 @@ export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { } }; -export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableWorkloadProfileProperties", + className: "OperationDetail", modelProperties: { - billingMeterCategory: { - serializedName: "billingMeterCategory", + name: { + serializedName: "name", type: { name: "String" } }, - applicability: { - serializedName: "applicability", + isDataAction: { + serializedName: "isDataAction", type: { - name: "String" + name: "Boolean" } }, - cores: { - serializedName: "cores", + display: { + serializedName: "display", type: { - name: "Number" + name: "Composite", + className: "OperationDisplay" } }, - memoryGiB: { - serializedName: "memoryGiB", + origin: { + serializedName: "origin", type: { - name: "Number" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" + name: "String" } } } } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "OperationDisplay", modelProperties: { - error: { - serializedName: "error", + provider: { + serializedName: "provider", type: { - name: "Composite", - className: "ErrorDetail" + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" } } } } }; -export const ErrorDetail: coreClient.CompositeMapper = { +export const JobsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorDetail", + className: "JobsCollection", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Job" + } + } } }, - target: { - serializedName: "target", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" } - }, - details: { - serializedName: "details", - readOnly: true, + } + } + } +}; + +export const JobConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobConfiguration", + modelProperties: { + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ErrorDetail" + className: "Secret" } } } }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + triggerType: { + defaultValue: "Manual", + serializedName: "triggerType", + required: true, + type: { + name: "String" + } + }, + replicaTimeout: { + serializedName: "replicaTimeout", + required: true, + type: { + name: "Number" + } + }, + replicaRetryLimit: { + serializedName: "replicaRetryLimit", + type: { + name: "Number" + } + }, + manualTriggerConfig: { + serializedName: "manualTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationManualTriggerConfig" + } + }, + scheduleTriggerConfig: { + serializedName: "scheduleTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationScheduleTriggerConfig" + } + }, + registries: { + serializedName: "registries", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ErrorAdditionalInfo" + className: "RegistryCredentials" } } } @@ -4075,44 +4435,92 @@ export const ErrorDetail: coreClient.CompositeMapper = { } }; -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { +export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorAdditionalInfo", + className: "JobConfigurationManualTriggerConfig", modelProperties: { - type: { - serializedName: "type", - readOnly: true, + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - info: { - serializedName: "info", - readOnly: true, + parallelism: { + serializedName: "parallelism", type: { - name: "Dictionary", - value: { type: { name: "any" } } + name: "Number" } } } } }; -export const BillingMeterCollection: coreClient.CompositeMapper = { +export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingMeterCollection", + className: "JobConfigurationScheduleTriggerConfig", modelProperties: { - value: { - serializedName: "value", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", + type: { + name: "Number" + } + }, + cronExpression: { + serializedName: "cronExpression", required: true, + type: { + name: "String" + } + }, + parallelism: { + serializedName: "parallelism", + type: { + name: "Number" + } + } + } + } +}; + +export const JobTemplate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobTemplate", + modelProperties: { + initContainers: { + serializedName: "initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "BillingMeter" + className: "InitContainer" + } + } + } + }, + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container" + } + } + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" } } } @@ -4121,48 +4529,74 @@ export const BillingMeterCollection: coreClient.CompositeMapper = { } }; -export const BillingMeterProperties: coreClient.CompositeMapper = { +export const JobPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingMeterProperties", + className: "JobPatchProperties", modelProperties: { - category: { - serializedName: "category", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ManagedServiceIdentity" } }, - meterType: { - serializedName: "meterType", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - displayName: { - serializedName: "displayName", + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "JobPatchPropertiesProperties" } } } } }; -export const DaprSecret: coreClient.CompositeMapper = { +export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecret", + className: "JobPatchPropertiesProperties", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + environmentId: { + serializedName: "environmentId", type: { name: "String" } }, - value: { - serializedName: "value", - readOnly: true, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: "JobConfiguration" + } + }, + template: { + serializedName: "template", + type: { + name: "Composite", + className: "JobTemplate" + } + }, + outboundIpAddresses: { + serializedName: "outboundIpAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + eventStreamEndpoint: { + serializedName: "eventStreamEndpoint", type: { name: "String" } @@ -4171,64 +4605,876 @@ export const DaprSecret: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const JobExecutionTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "JobExecutionTemplate", modelProperties: { - ...Resource.type.modelProperties + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } + } + }, + initContainers: { + serializedName: "initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } + } + } } } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const JobExecutionContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "JobExecutionContainer", modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + image: { + serializedName: "image", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } + } + }, + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "ContainerResources" + } + } + } + } +}; + +export const JobExecutionBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionBase", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const JobExecutionNamesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionNamesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionBase" + } + } + } + } + } + } +}; + +export const ContainerAppJobExecutions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppJobExecutions", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecution" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobExecution: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecution", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + template: { + serializedName: "template", + type: { + name: "Composite", + className: "JobExecutionTemplate" + } + } + } + } +}; + +export const JobSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + } + } + } +}; + +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" + } + } + } + } +}; + +export const ManagedCertificateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificateProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + subjectName: { + serializedName: "subjectName", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + readOnly: true, + type: { + name: "String" + } + }, + domainControlValidation: { + serializedName: "domainControlValidation", + type: { + name: "String" + } + }, + validationToken: { + serializedName: "validationToken", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ManagedCertificateCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificateCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedCertificate" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfileStatesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadProfileStates" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const WorkloadProfileStatesProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfileStatesProperties", + modelProperties: { + minimumCount: { + serializedName: "minimumCount", + type: { + name: "Number" + } + }, + maximumCount: { + serializedName: "maximumCount", + type: { + name: "Number" + } + }, + currentCount: { + serializedName: "currentCount", + type: { + name: "Number" + } + } + } + } +}; + +export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStoragesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironmentStorage" + } + } + } + } + } + } +}; + +export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStorageProperties", + modelProperties: { + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties" + } + } + } + } +}; + +export const SourceControlCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceControlCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SourceControl" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GithubActionConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GithubActionConfiguration", + modelProperties: { + registryInfo: { + serializedName: "registryInfo", + type: { + name: "Composite", + className: "RegistryInfo" + } + }, + azureCredentials: { + serializedName: "azureCredentials", + type: { + name: "Composite", + className: "AzureCredentials" + } + }, + contextPath: { + serializedName: "contextPath", + type: { + name: "String" + } + }, + image: { + serializedName: "image", + type: { + name: "String" + } + }, + publishType: { + serializedName: "publishType", + type: { + name: "String" + } + }, + os: { + serializedName: "os", + type: { + name: "String" + } + }, + runtimeStack: { + serializedName: "runtimeStack", + type: { + name: "String" + } + }, + runtimeVersion: { + serializedName: "runtimeVersion", + type: { + name: "String" + } + } + } + } +}; + +export const RegistryInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryInfo", + modelProperties: { + registryUrl: { + serializedName: "registryUrl", + type: { + name: "String" + } + }, + registryUserName: { + serializedName: "registryUserName", + type: { + name: "String" + } + }, + registryPassword: { + serializedName: "registryPassword", + type: { + 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 ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +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", + className: "AuthConfig", + modelProperties: { + ...ProxyResource.type.modelProperties, + platform: { + serializedName: "properties.platform", + type: { + name: "Composite", + className: "AuthPlatform" + } + }, + globalValidation: { + serializedName: "properties.globalValidation", + type: { + name: "Composite", + className: "GlobalValidation" + } + }, + identityProviders: { + serializedName: "properties.identityProviders", + type: { + name: "Composite", + className: "IdentityProviders" + } + }, + login: { + serializedName: "properties.login", + type: { + name: "Composite", + className: "Login" + } + }, + httpSettings: { + serializedName: "properties.httpSettings", + type: { + name: "Composite", + className: "HttpSettings" + } + } + } + } +}; + +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 BuildResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + buildStatus: { + serializedName: "properties.buildStatus", + readOnly: true, + type: { + name: "String" + } + }, + destinationContainerRegistry: { + serializedName: "properties.destinationContainerRegistry", + type: { + name: "Composite", + className: "ContainerRegistryWithCustomImage" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "BuildConfiguration" + } + }, + uploadEndpoint: { + serializedName: "properties.uploadEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DaprComponent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponent", + modelProperties: { + ...ProxyResource.type.modelProperties, + componentType: { + serializedName: "properties.componentType", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + ignoreErrors: { + defaultValue: false, + serializedName: "properties.ignoreErrors", + type: { + name: "Boolean" + } + }, + initTimeout: { + serializedName: "properties.initTimeout", + type: { + name: "String" + } + }, + secrets: { + serializedName: "properties.secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } }, - location: { - serializedName: "location", - required: true, + secretStoreComponent: { + serializedName: "properties.secretStoreComponent", type: { name: "String" } - } - } - } -}; - -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", + }, + metadata: { + serializedName: "properties.metadata", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ContainerAppProbe" + className: "DaprMetadata" + } + } + } + }, + scopes: { + serializedName: "properties.scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" } } } @@ -4237,45 +5483,17 @@ export const Container: coreClient.CompositeMapper = { } }; -export const AuthConfig: coreClient.CompositeMapper = { +export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfig", + className: "ConnectedEnvironmentStorage", modelProperties: { ...ProxyResource.type.modelProperties, - platform: { - serializedName: "properties.platform", - type: { - name: "Composite", - className: "AuthPlatform" - } - }, - globalValidation: { - serializedName: "properties.globalValidation", - type: { - name: "Composite", - className: "GlobalValidation" - } - }, - identityProviders: { - serializedName: "properties.identityProviders", - type: { - name: "Composite", - className: "IdentityProviders" - } - }, - login: { - serializedName: "properties.login", - type: { - name: "Composite", - className: "Login" - } - }, - httpSettings: { - serializedName: "properties.httpSettings", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "HttpSettings" + className: "ConnectedEnvironmentStorageProperties" } } } @@ -4375,89 +5593,40 @@ export const Replica: coreClient.CompositeMapper = { name: "DateTime" } }, - containers: { - serializedName: "properties.containers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReplicaContainer" - } - } - } - } - } - } -}; - -export const DaprComponent: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DaprComponent", - modelProperties: { - ...ProxyResource.type.modelProperties, - componentType: { - serializedName: "properties.componentType", - type: { - name: "String" - } - }, - version: { - serializedName: "properties.version", + runningState: { + serializedName: "properties.runningState", + readOnly: true, type: { name: "String" } }, - ignoreErrors: { - serializedName: "properties.ignoreErrors", - type: { - name: "Boolean" - } - }, - initTimeout: { - serializedName: "properties.initTimeout", + runningStateDetails: { + serializedName: "properties.runningStateDetails", + readOnly: true, type: { name: "String" } }, - secrets: { - serializedName: "properties.secrets", + containers: { + serializedName: "properties.containers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Secret" + className: "ReplicaContainer" } } } }, - secretStoreComponent: { - serializedName: "properties.secretStoreComponent", - type: { - name: "String" - } - }, - metadata: { - serializedName: "properties.metadata", + initContainers: { + serializedName: "properties.initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprMetadata" - } - } - } - }, - scopes: { - serializedName: "properties.scopes", - type: { - name: "Sequence", - element: { - type: { - name: "String" + className: "ReplicaContainer" } } } @@ -4553,63 +5722,118 @@ export const SourceControl: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { +export const BuilderResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorage", + className: "BuilderResource", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties" + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + buildComputeId: { + serializedName: "properties.buildComputeId", + readOnly: true, + type: { + name: "String" + } + }, + patchComputeId: { + serializedName: "properties.patchComputeId", + readOnly: true, + type: { + name: "String" } } } } }; -export const AvailableWorkloadProfile: coreClient.CompositeMapper = { +export const ConnectedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableWorkloadProfile", + className: "ConnectedEnvironment", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - properties: { - serializedName: "properties", + 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: "AvailableWorkloadProfileProperties" + className: "CustomDomainConfiguration" } } } } }; -export const BillingMeter: coreClient.CompositeMapper = { +export const Certificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BillingMeter", + className: "Certificate", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - type: { - name: "String" - } - }, + ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "BillingMeterProperties" + className: "CertificateProperties" } } } @@ -4636,6 +5860,12 @@ export const ContainerApp: coreClient.CompositeMapper = { className: "ManagedServiceIdentity" } }, + managedBy: { + serializedName: "managedBy", + type: { + name: "String" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -4655,8 +5885,8 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String" } }, - workloadProfileType: { - serializedName: "properties.workloadProfileType", + workloadProfileName: { + serializedName: "properties.workloadProfileName", type: { name: "String" } @@ -4668,6 +5898,13 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String" } }, + latestReadyRevisionName: { + serializedName: "properties.latestReadyRevisionName", + readOnly: true, + type: { + name: "String" + } + }, latestRevisionFqdn: { serializedName: "properties.latestRevisionFqdn", readOnly: true, @@ -4749,11 +5986,10 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { className: "ManagedEnvironment", modelProperties: { ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", + kind: { + serializedName: "kind", type: { - name: "Composite", - className: "EnvironmentSkuProperties" + name: "String" } }, provisioningState: { @@ -4841,22 +6077,111 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { } } } + }, + kedaConfiguration: { + serializedName: "properties.kedaConfiguration", + type: { + name: "Composite", + className: "KedaConfiguration" + } + }, + daprConfiguration: { + serializedName: "properties.daprConfiguration", + type: { + name: "Composite", + className: "DaprConfiguration" + } + }, + infrastructureResourceGroup: { + serializedName: "properties.infrastructureResourceGroup", + type: { + name: "String" + } } } } }; -export const Certificate: coreClient.CompositeMapper = { +export const Job: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Certificate", + className: "Job", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + workloadProfileName: { + serializedName: "properties.workloadProfileName", + type: { + name: "String" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "JobConfiguration" + } + }, + template: { + serializedName: "properties.template", + type: { + name: "Composite", + className: "JobTemplate" + } + }, + outboundIpAddresses: { + serializedName: "properties.outboundIpAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCertificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificate", modelProperties: { ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "CertificateProperties" + className: "ManagedCertificateProperties" } } } @@ -4887,57 +6212,195 @@ export const EnvironmentAuthToken: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironment: coreClient.CompositeMapper = { +export const BuildersCreateOrUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironment", + className: "BuildersCreateOrUpdateHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Composite", - className: "ExtendedLocation" + name: "String" } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + } + } + } +}; + +export const BuildersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - deploymentErrors: { - serializedName: "properties.deploymentErrors", - readOnly: true, + } + } + } +}; + +export const BuildersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - defaultDomain: { - serializedName: "properties.defaultDomain", - readOnly: true, + } + } + } +}; + +export const BuildsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } - }, - staticIp: { - serializedName: "properties.staticIp", + } + } + } +}; + +export const BuildsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - daprAIConnectionString: { - serializedName: "properties.daprAIConnectionString", + } + } + } +}; + +export const ConnectedEnvironmentsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - customDomainConfiguration: { - serializedName: "properties.customDomainConfiguration", + } + } + } +}; + +export const ContainerAppsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "CustomDomainConfiguration" + name: "String" + } + } + } + } +}; + +export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsStopExecutionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsStopExecutionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsStopMultipleExecutionsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsStopMultipleExecutionsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" } } } diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index 8f3673eadcad..7dcf8ce26402 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -13,16 +13,25 @@ import { } from "@azure/core-client"; import { AuthConfig as AuthConfigMapper, - ContainerApp as ContainerAppMapper, - DaprComponent as DaprComponentMapper, - ManagedEnvironment as ManagedEnvironmentMapper, + BuilderResource as BuilderResourceMapper, + BuilderResourceUpdate as BuilderResourceUpdateMapper, + BuildResource as BuildResourceMapper, + ConnectedEnvironment as ConnectedEnvironmentMapper, + CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, Certificate as CertificateMapper, CertificatePatch as CertificatePatchMapper, - CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, + DaprComponent as DaprComponentMapper, + ConnectedEnvironmentStorage as ConnectedEnvironmentStorageMapper, + ContainerApp as ContainerAppMapper, + Job as JobMapper, + JobPatchProperties as JobPatchPropertiesMapper, + JobExecutionTemplate as JobExecutionTemplateMapper, + JobExecutionNamesCollection as JobExecutionNamesCollectionMapper, + ManagedEnvironment as ManagedEnvironmentMapper, + ManagedCertificate as ManagedCertificateMapper, + ManagedCertificatePatch as ManagedCertificatePatchMapper, ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper, - SourceControl as SourceControlMapper, - ConnectedEnvironment as ConnectedEnvironmentMapper, - ConnectedEnvironmentStorage as ConnectedEnvironmentStorageMapper + SourceControl as SourceControlMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -92,7 +101,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-06-01-preview", + defaultValue: "2023-05-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -141,35 +150,55 @@ export const nextLink: OperationURLParameter = { skipEncoding: true }; -export const containerAppEnvelope: OperationParameter = { - parameterPath: "containerAppEnvelope", - mapper: ContainerAppMapper -}; - -export const customHostname: OperationQueryParameter = { - parameterPath: ["options", "customHostname"], +export const location: OperationURLParameter = { + parameterPath: "location", mapper: { - serializedName: "customHostname", + constraints: { + MinLength: 1 + }, + serializedName: "location", + required: true, type: { name: "String" } } }; -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], +export const builderName: OperationURLParameter = { + parameterPath: "builderName", mapper: { - serializedName: "$filter", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 32, + MinLength: 2 + }, + serializedName: "builderName", + required: true, type: { name: "String" } } }; -export const revisionName: OperationURLParameter = { - parameterPath: "revisionName", +export const builderEnvelope: OperationParameter = { + parameterPath: "builderEnvelope", + mapper: BuilderResourceMapper +}; + +export const builderEnvelope1: OperationParameter = { + parameterPath: "builderEnvelope", + mapper: BuilderResourceUpdateMapper +}; + +export const buildName: OperationURLParameter = { + parameterPath: "buildName", mapper: { - serializedName: "revisionName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 64, + MinLength: 2 + }, + serializedName: "buildName", required: true, type: { name: "String" @@ -177,10 +206,15 @@ export const revisionName: OperationURLParameter = { } }; -export const replicaName: OperationURLParameter = { - parameterPath: "replicaName", +export const buildEnvelope: OperationParameter = { + parameterPath: "buildEnvelope", + mapper: BuildResourceMapper +}; + +export const connectedEnvironmentName: OperationURLParameter = { + parameterPath: "connectedEnvironmentName", mapper: { - serializedName: "replicaName", + serializedName: "connectedEnvironmentName", required: true, type: { name: "String" @@ -188,10 +222,20 @@ export const replicaName: OperationURLParameter = { } }; -export const environmentName: OperationURLParameter = { - parameterPath: "environmentName", +export const environmentEnvelope: OperationParameter = { + parameterPath: "environmentEnvelope", + mapper: ConnectedEnvironmentMapper +}; + +export const checkNameAvailabilityRequest: OperationParameter = { + parameterPath: "checkNameAvailabilityRequest", + mapper: CheckNameAvailabilityRequestMapper +}; + +export const certificateName: OperationURLParameter = { + parameterPath: "certificateName", mapper: { - serializedName: "environmentName", + serializedName: "certificateName", required: true, type: { name: "String" @@ -199,6 +243,16 @@ export const environmentName: OperationURLParameter = { } }; +export const certificateEnvelope: OperationParameter = { + parameterPath: ["options", "certificateEnvelope"], + mapper: CertificateMapper +}; + +export const certificateEnvelope1: OperationParameter = { + parameterPath: "certificateEnvelope", + mapper: CertificatePatchMapper +}; + export const componentName: OperationURLParameter = { parameterPath: "componentName", mapper: { @@ -215,10 +269,10 @@ export const daprComponentEnvelope: OperationParameter = { mapper: DaprComponentMapper }; -export const detectorName: OperationURLParameter = { - parameterPath: "detectorName", +export const storageName: OperationURLParameter = { + parameterPath: "storageName", mapper: { - serializedName: "detectorName", + serializedName: "storageName", required: true, type: { name: "String" @@ -226,15 +280,40 @@ export const detectorName: OperationURLParameter = { } }; -export const environmentEnvelope: OperationParameter = { - parameterPath: "environmentEnvelope", - mapper: ManagedEnvironmentMapper +export const storageEnvelope: OperationParameter = { + parameterPath: "storageEnvelope", + mapper: ConnectedEnvironmentStorageMapper }; -export const certificateName: OperationURLParameter = { - parameterPath: "certificateName", +export const containerAppEnvelope: OperationParameter = { + parameterPath: "containerAppEnvelope", + mapper: ContainerAppMapper +}; + +export const customHostname: OperationQueryParameter = { + parameterPath: ["options", "customHostname"], mapper: { - serializedName: "certificateName", + serializedName: "customHostname", + type: { + name: "String" + } + } +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const revisionName: OperationURLParameter = { + parameterPath: "revisionName", + mapper: { + serializedName: "revisionName", required: true, type: { name: "String" @@ -242,25 +321,46 @@ export const certificateName: OperationURLParameter = { } }; -export const certificateEnvelope: OperationParameter = { - parameterPath: ["options", "certificateEnvelope"], - mapper: CertificateMapper +export const replicaName: OperationURLParameter = { + parameterPath: "replicaName", + mapper: { + serializedName: "replicaName", + required: true, + type: { + name: "String" + } + } }; -export const certificateEnvelope1: OperationParameter = { - parameterPath: "certificateEnvelope", - mapper: CertificatePatchMapper +export const detectorName: OperationURLParameter = { + parameterPath: "detectorName", + mapper: { + serializedName: "detectorName", + required: true, + type: { + name: "String" + } + } }; -export const checkNameAvailabilityRequest: OperationParameter = { - parameterPath: "checkNameAvailabilityRequest", - mapper: CheckNameAvailabilityRequestMapper +export const environmentName: OperationURLParameter = { + parameterPath: "environmentName", + mapper: { + serializedName: "environmentName", + required: true, + type: { + name: "String" + } + } }; -export const storageName: OperationURLParameter = { - parameterPath: "storageName", +export const jobName: OperationURLParameter = { + parameterPath: "jobName", mapper: { - serializedName: "storageName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobName", required: true, type: { name: "String" @@ -268,15 +368,15 @@ export const storageName: OperationURLParameter = { } }; -export const storageEnvelope: OperationParameter = { - parameterPath: "storageEnvelope", - mapper: ManagedEnvironmentStorageMapper +export const jobEnvelope: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobMapper }; -export const sourceControlName: OperationURLParameter = { - parameterPath: "sourceControlName", +export const jobName1: OperationURLParameter = { + parameterPath: "jobName", mapper: { - serializedName: "sourceControlName", + serializedName: "jobName", required: true, type: { name: "String" @@ -284,15 +384,23 @@ export const sourceControlName: OperationURLParameter = { } }; -export const sourceControlEnvelope: OperationParameter = { - parameterPath: "sourceControlEnvelope", - mapper: SourceControlMapper +export const jobEnvelope1: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobPatchPropertiesMapper }; -export const connectedEnvironmentName: OperationURLParameter = { - parameterPath: "connectedEnvironmentName", +export const template: OperationParameter = { + parameterPath: "template", + mapper: JobExecutionTemplateMapper +}; + +export const jobExecutionName: OperationURLParameter = { + parameterPath: "jobExecutionName", mapper: { - serializedName: "connectedEnvironmentName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobExecutionName", required: true, type: { name: "String" @@ -300,26 +408,54 @@ export const connectedEnvironmentName: OperationURLParameter = { } }; +export const jobExecutionName1: OperationParameter = { + parameterPath: "jobExecutionName", + mapper: JobExecutionNamesCollectionMapper +}; + export const environmentEnvelope1: OperationParameter = { parameterPath: "environmentEnvelope", - mapper: ConnectedEnvironmentMapper + mapper: ManagedEnvironmentMapper +}; + +export const managedCertificateName: OperationURLParameter = { + parameterPath: "managedCertificateName", + mapper: { + serializedName: "managedCertificateName", + required: true, + type: { + name: "String" + } + } +}; + +export const managedCertificateEnvelope: OperationParameter = { + parameterPath: ["options", "managedCertificateEnvelope"], + mapper: ManagedCertificateMapper +}; + +export const managedCertificateEnvelope1: OperationParameter = { + parameterPath: "managedCertificateEnvelope", + mapper: ManagedCertificatePatchMapper }; export const storageEnvelope1: OperationParameter = { parameterPath: "storageEnvelope", - mapper: ConnectedEnvironmentStorageMapper + mapper: ManagedEnvironmentStorageMapper }; -export const location: OperationURLParameter = { - parameterPath: "location", +export const sourceControlName: OperationURLParameter = { + parameterPath: "sourceControlName", mapper: { - constraints: { - MinLength: 1 - }, - serializedName: "location", + serializedName: "sourceControlName", required: true, type: { name: "String" } } }; + +export const sourceControlEnvelope: OperationParameter = { + parameterPath: "sourceControlEnvelope", + mapper: SourceControlMapper +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts b/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts index 40572dc25833..0a770c0b01be 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/availableWorkloadProfiles.ts @@ -160,7 +160,6 @@ const getNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts new file mode 100644 index 000000000000..1417cbd4f37b --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts @@ -0,0 +1,719 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Builders } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + BuilderResource, + BuildersListBySubscriptionNextOptionalParams, + BuildersListBySubscriptionOptionalParams, + BuildersListBySubscriptionResponse, + BuildersListByResourceGroupNextOptionalParams, + BuildersListByResourceGroupOptionalParams, + BuildersListByResourceGroupResponse, + BuildersGetOptionalParams, + BuildersGetResponse, + BuildersCreateOrUpdateOptionalParams, + BuildersCreateOrUpdateResponse, + BuilderResourceUpdate, + BuildersUpdateOptionalParams, + BuildersUpdateResponse, + BuildersDeleteOptionalParams, + BuildersListBySubscriptionNextResponse, + BuildersListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Builders operations. */ +export class BuildersImpl implements Builders { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Builders class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + public listBySubscription( + options?: BuildersListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: BuildersListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildersListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: BuildersListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List BuilderResource resources by 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?: BuildersListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildersListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + private _listBySubscription( + options?: BuildersListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * List BuilderResource resources by 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?: BuildersListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + options?: BuildersGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + getOperationSpec + ); + } + + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, builderEnvelope, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + builderName, + builderEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, builderEnvelope, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + BuildersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + builderName, + builderEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + builderName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: BuildersListBySubscriptionNextOptionalParams + ): 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?: BuildersListByResourceGroupNextOptionalParams + ): 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/builders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + 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/builders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + 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/builders/{builderName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource + }, + 201: { + bodyMapper: Mappers.BuilderResource + }, + 202: { + bodyMapper: Mappers.BuilderResource + }, + 204: { + bodyMapper: Mappers.BuilderResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.builderEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource + }, + 201: { + bodyMapper: Mappers.BuilderResource + }, + 202: { + bodyMapper: Mappers.BuilderResource + }, + 204: { + bodyMapper: Mappers.BuilderResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.builderEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts new file mode 100644 index 000000000000..091e4ad538f4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts @@ -0,0 +1,508 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Builds } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + BuildResource, + BuildsListByBuilderResourceNextOptionalParams, + BuildsListByBuilderResourceOptionalParams, + BuildsListByBuilderResourceResponse, + BuildsGetOptionalParams, + BuildsGetResponse, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams, + BuildsListByBuilderResourceNextResponse +} from "../models"; + +/// +/** Class containing Builds operations. */ +export class BuildsImpl implements Builds { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Builds class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + public listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByBuilderResourcePagingAll( + resourceGroupName, + builderName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByBuilderResourcePagingPage( + resourceGroupName, + builderName, + options, + settings + ); + } + }; + } + + private async *listByBuilderResourcePagingPage( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildsListByBuilderResourceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByBuilderResource( + resourceGroupName, + builderName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByBuilderResourceNext( + resourceGroupName, + builderName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByBuilderResourcePagingAll( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByBuilderResourcePagingPage( + resourceGroupName, + builderName, + options + )) { + yield* page; + } + } + + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + private _listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + listByBuilderResourceOperationSpec + ); + } + + /** + * Get a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, buildName, options }, + getOperationSpec + ); + } + + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + builderName, + buildName, + buildEnvelope, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + builderName, + buildName, + buildEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, buildName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + builderName, + buildName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByBuilderResourceNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param nextLink The nextLink from the previous successful call to the ListByBuilderResource method. + * @param options The options parameters. + */ + private _listByBuilderResourceNext( + resourceGroupName: string, + builderName: string, + nextLink: string, + options?: BuildsListByBuilderResourceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, nextLink, options }, + listByBuilderResourceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByBuilderResourceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuildResource + }, + 201: { + bodyMapper: Mappers.BuildResource + }, + 202: { + bodyMapper: Mappers.BuildResource + }, + 204: { + bodyMapper: Mappers.BuildResource + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.buildEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByBuilderResourceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts index abc53d53ec7c..50def81fbc80 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts @@ -284,8 +284,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -308,8 +308,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -331,8 +331,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -355,8 +355,8 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.certificateName + Parameters.certificateName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -373,7 +373,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts index 6e00f85d2ff8..6567cc8d202b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts @@ -13,8 +13,12 @@ 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ConnectedEnvironment, ConnectedEnvironmentsListBySubscriptionNextOptionalParams, @@ -231,8 +235,8 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConnectedEnvironmentsCreateOrUpdateResponse > > { @@ -242,7 +246,7 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -275,19 +279,23 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, environmentEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -325,14 +333,14 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -365,14 +373,15 @@ export class ConnectedEnvironmentsImpl implements ConnectedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, connectedEnvironmentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -513,7 +522,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "GET", responses: { 200: { @@ -535,7 +544,7 @@ const getOperationSpec: coreClient.OperationSpec = { }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "PUT", responses: { 200: { @@ -554,7 +563,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope1, + requestBody: Parameters.environmentEnvelope, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -568,7 +577,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }; const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "DELETE", responses: { 200: {}, @@ -591,7 +600,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { }; const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}", httpMethod: "PATCH", responses: { 200: { @@ -646,7 +655,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -666,7 +674,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts index a920e82c0390..10bf2489fb05 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts @@ -289,8 +289,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept], serializer @@ -313,8 +313,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -336,8 +336,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept], serializer @@ -360,8 +360,8 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.certificateName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.certificateName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -378,7 +378,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts index 1d69b38a5dcd..e4f61d14dee4 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts @@ -288,8 +288,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer @@ -312,8 +312,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -335,8 +335,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer @@ -358,8 +358,8 @@ const listSecretsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.componentName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.componentName ], headerParameters: [Parameters.accept], serializer @@ -375,7 +375,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts index e1f12b3c7f33..38a5f292aa22 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts @@ -159,8 +159,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.storageName ], headerParameters: [Parameters.accept], serializer @@ -177,14 +177,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.storageEnvelope1, + requestBody: Parameters.storageEnvelope, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.storageName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -206,8 +206,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageName, - Parameters.connectedEnvironmentName + Parameters.connectedEnvironmentName, + Parameters.storageName ], 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 ef137d3b1ba5..0293fbdf4e9c 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -13,8 +13,12 @@ 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ContainerApp, ContainerAppsListBySubscriptionNextOptionalParams, @@ -29,6 +33,7 @@ import { ContainerAppsCreateOrUpdateResponse, ContainerAppsDeleteOptionalParams, ContainerAppsUpdateOptionalParams, + ContainerAppsUpdateResponse, ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, @@ -233,8 +238,8 @@ export class ContainerAppsImpl implements ContainerApps { containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsCreateOrUpdateResponse > > { @@ -244,7 +249,7 @@ export class ContainerAppsImpl implements ContainerApps { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -277,14 +282,23 @@ export class ContainerAppsImpl implements ContainerApps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, containerAppEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + containerAppName, + containerAppEnvelope, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -322,14 +336,14 @@ export class ContainerAppsImpl implements ContainerApps { resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -362,14 +376,15 @@ export class ContainerAppsImpl implements ContainerApps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -406,14 +421,19 @@ export class ContainerAppsImpl implements ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -446,13 +466,21 @@ export class ContainerAppsImpl implements ContainerApps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, containerAppEnvelope, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + containerAppName, + containerAppEnvelope, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -471,7 +499,7 @@ export class ContainerAppsImpl implements ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise { + ): Promise { const poller = await this.beginUpdate( resourceGroupName, containerAppName, @@ -690,10 +718,18 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}", httpMethod: "PATCH", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, default: { bodyMapper: Mappers.DefaultErrorResponse } @@ -790,7 +826,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -810,7 +845,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts index 9e45d15ab288..730b4f246cc7 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts @@ -330,7 +330,6 @@ const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts index 849175306fc6..2f5bac546cb4 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts @@ -469,7 +469,6 @@ const listDetectorsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -491,7 +490,6 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts index daf6f1750a48..102a0c9d61d6 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts @@ -357,7 +357,6 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts index 4afa93622d9f..5a5c0ff192fa 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts @@ -13,8 +13,12 @@ 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { SourceControl, ContainerAppsSourceControlsListByContainerAppNextOptionalParams, @@ -177,8 +181,8 @@ export class ContainerAppsSourceControlsImpl sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsSourceControlsCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class ContainerAppsSourceControlsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,19 +225,22 @@ export class ContainerAppsSourceControlsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsSourceControlsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -277,14 +284,14 @@ export class ContainerAppsSourceControlsImpl containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -317,13 +324,13 @@ export class ContainerAppsSourceControlsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, containerAppName, sourceControlName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, sourceControlName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -488,7 +495,6 @@ const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts index d05d6ff004b3..e288f99384fb 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts @@ -283,8 +283,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -307,8 +307,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -330,8 +330,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -353,8 +353,8 @@ const listSecretsOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.componentName + Parameters.componentName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -370,7 +370,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index cb79504dd5c6..2cf675e30017 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -7,22 +7,27 @@ */ export * from "./containerAppsAuthConfigs"; +export * from "./availableWorkloadProfiles"; +export * from "./billingMeters"; +export * from "./builders"; +export * from "./builds"; +export * from "./connectedEnvironments"; +export * from "./connectedEnvironmentsCertificates"; +export * from "./connectedEnvironmentsDaprComponents"; +export * from "./connectedEnvironmentsStorages"; 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 "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; +export * from "./managedCertificates"; export * from "./namespaces"; +export * from "./daprComponents"; 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/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts new file mode 100644 index 000000000000..6e20e44af0c2 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts @@ -0,0 +1,1126 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Jobs } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + Job, + JobsListBySubscriptionNextOptionalParams, + JobsListBySubscriptionOptionalParams, + JobsListBySubscriptionResponse, + JobsListByResourceGroupNextOptionalParams, + JobsListByResourceGroupOptionalParams, + JobsListByResourceGroupResponse, + JobsGetOptionalParams, + JobsGetResponse, + JobsCreateOrUpdateOptionalParams, + JobsCreateOrUpdateResponse, + JobsDeleteOptionalParams, + JobPatchProperties, + JobsUpdateOptionalParams, + JobsUpdateResponse, + JobExecutionTemplate, + JobsStartOptionalParams, + JobsStartResponse, + JobsStopExecutionOptionalParams, + JobExecutionNamesCollection, + JobsStopMultipleExecutionsOptionalParams, + JobsStopMultipleExecutionsResponse, + JobsListSecretsOptionalParams, + JobsListSecretsResponse, + JobsListBySubscriptionNextResponse, + JobsListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing Jobs operations. */ +export class JobsImpl implements Jobs { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Jobs class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Container Apps Jobs in a given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: JobsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: JobsListBySubscriptionOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: JobsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: JobsListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get the Container Apps Jobs in a given 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?: JobsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: JobsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Get the Container Apps Jobs in a given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: JobsListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + + /** + * Get the Container Apps Jobs in a given 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?: JobsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Get the properties of a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + jobName: string, + options?: JobsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, options }, + getOperationSpec + ); + } + + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + jobName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, jobEnvelope, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + JobsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + jobName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + jobName, + jobEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, jobName, options); + return poller.pollUntilDone(); + } + + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + jobName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise< + SimplePollerLike, JobsUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, jobEnvelope, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + JobsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + jobName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + jobName, + jobEnvelope, + options + ); + return poller.pollUntilDone(); + } + + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + async beginStart( + resourceGroupName: string, + jobName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise< + SimplePollerLike, JobsStartResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, template, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + JobsStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + async beginStartAndWait( + resourceGroupName: string, + jobName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + jobName, + template, + options + ); + return poller.pollUntilDone(); + } + + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName Job execution name. + * @param options The options parameters. + */ + async beginStopExecution( + resourceGroupName: string, + jobName: string, + jobExecutionName: string, + options?: JobsStopExecutionOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, jobExecutionName, options }, + spec: stopExecutionOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName Job execution name. + * @param options The options parameters. + */ + async beginStopExecutionAndWait( + resourceGroupName: string, + jobName: string, + jobExecutionName: string, + options?: JobsStopExecutionOptionalParams + ): Promise { + const poller = await this.beginStopExecution( + resourceGroupName, + jobName, + jobExecutionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName List of all job executions that should be stopped. + * @param options The options parameters. + */ + async beginStopMultipleExecutions( + resourceGroupName: string, + jobName: string, + jobExecutionName: JobExecutionNamesCollection, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsStopMultipleExecutionsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, jobExecutionName, options }, + spec: stopMultipleExecutionsOperationSpec + }); + const poller = await createHttpPoller< + JobsStopMultipleExecutionsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName List of all job executions that should be stopped. + * @param options The options parameters. + */ + async beginStopMultipleExecutionsAndWait( + resourceGroupName: string, + jobName: string, + jobExecutionName: JobExecutionNamesCollection, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise { + const poller = await this.beginStopMultipleExecutions( + resourceGroupName, + jobName, + jobExecutionName, + options + ); + return poller.pollUntilDone(); + } + + /** + * List secrets for a container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + jobName: string, + options?: JobsListSecretsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, options }, + listSecretsOperationSpec + ); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: JobsListBySubscriptionNextOptionalParams + ): 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?: JobsListByResourceGroupNextOptionalParams + ): 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/jobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + 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/jobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + 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/jobs/{jobName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Job + }, + 201: { + bodyMapper: Mappers.Job + }, + 202: { + bodyMapper: Mappers.Job + }, + 204: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.jobEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Job + }, + 201: { + bodyMapper: Mappers.Job + }, + 202: { + bodyMapper: Mappers.Job + }, + 204: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.jobEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.JobExecutionBase + }, + 201: { + bodyMapper: Mappers.JobExecutionBase + }, + 202: { + bodyMapper: Mappers.JobExecutionBase + }, + 204: { + bodyMapper: Mappers.JobExecutionBase + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.template, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const stopExecutionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName, + Parameters.jobExecutionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopMultipleExecutionsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + 201: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + 202: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + 204: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.jobExecutionName1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listSecretsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.JobSecretsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobsCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts new file mode 100644 index 000000000000..46b05e90c511 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts @@ -0,0 +1,194 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { JobsExecutions } 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 { + JobExecution, + JobsExecutionsListNextOptionalParams, + JobsExecutionsListOptionalParams, + JobsExecutionsListResponse, + JobsExecutionsListNextResponse +} from "../models"; + +/// +/** Class containing JobsExecutions operations. */ +export class JobsExecutionsImpl implements JobsExecutions { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class JobsExecutions class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get a Container Apps Job's executions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + jobName: string, + options?: JobsExecutionsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, jobName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + jobName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + jobName: string, + options?: JobsExecutionsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: JobsExecutionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, jobName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + jobName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + jobName: string, + options?: JobsExecutionsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + jobName, + options + )) { + yield* page; + } + } + + /** + * Get a Container Apps Job's executions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + jobName: string, + options?: JobsExecutionsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + jobName: string, + nextLink: string, + options?: JobsExecutionsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppJobExecutions + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.jobName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts new file mode 100644 index 000000000000..7954e51450ab --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts @@ -0,0 +1,485 @@ +/* + * 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, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedCertificates } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ManagedCertificate, + ManagedCertificatesListNextOptionalParams, + ManagedCertificatesListOptionalParams, + ManagedCertificatesListResponse, + ManagedCertificatesGetOptionalParams, + ManagedCertificatesGetResponse, + ManagedCertificatesCreateOrUpdateOptionalParams, + ManagedCertificatesCreateOrUpdateResponse, + ManagedCertificatesDeleteOptionalParams, + ManagedCertificatePatch, + ManagedCertificatesUpdateOptionalParams, + ManagedCertificatesUpdateResponse, + ManagedCertificatesListNextResponse +} from "../models"; + +/// +/** Class containing ManagedCertificates operations. */ +export class ManagedCertificatesImpl implements ManagedCertificates { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedCertificates class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Managed Certificates in a given managed environment. + * @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. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedCertificatesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options + )) { + yield* page; + } + } + + /** + * Get the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, managedCertificateName, options }, + getOperationSpec + ); + } + + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCertificatesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + managedCertificateName, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ManagedCertificatesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + environmentName, + managedCertificateName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, managedCertificateName, options }, + deleteOperationSpec + ); + } + + /** + * Patches a managed certificate. Oly patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + managedCertificateEnvelope: ManagedCertificatePatch, + options?: ManagedCertificatesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + managedCertificateName, + managedCertificateEnvelope, + options + }, + updateOperationSpec + ); + } + + /** + * Get the Managed Certificates in a given managed environment. + * @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. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: ManagedCertificatesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificate + }, + 201: { + bodyMapper: Mappers.ManagedCertificate + }, + 202: { + bodyMapper: Mappers.ManagedCertificate + }, + 204: { + bodyMapper: Mappers.ManagedCertificate + }, + 400: { + isError: true + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.managedCertificateEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificate + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + requestBody: Parameters.managedCertificateEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.managedCertificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedCertificateCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts index a74c66507b36..b8c4ee4edaae 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentDiagnostics.ts @@ -109,8 +109,8 @@ const getDetectorOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.detectorName + Parameters.detectorName, + Parameters.environmentName ], 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 709d202cfaaa..8a7c9a6b0e9b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts @@ -13,8 +13,12 @@ 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ManagedEnvironment, ManagedEnvironmentsListBySubscriptionNextOptionalParams, @@ -33,6 +37,7 @@ import { ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsUpdateResponse, ManagedEnvironmentsGetAuthTokenOptionalParams, ManagedEnvironmentsGetAuthTokenResponse, ManagedEnvironmentsListBySubscriptionNextResponse, @@ -177,7 +182,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { } /** - * Get all workload Profile States for a Premium Managed Environment. + * Get all workload Profile States for a Managed Environment. * @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. @@ -318,8 +323,8 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedEnvironmentsCreateOrUpdateResponse > > { @@ -329,7 +334,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -362,13 +367,21 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, environmentName, environmentEnvelope, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + environmentEnvelope, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ManagedEnvironmentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -407,14 +420,14 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -447,13 +460,13 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, environmentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, environmentName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -491,14 +504,19 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise, void>> { + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentsUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -531,13 +549,21 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, environmentName, environmentEnvelope, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + environmentEnvelope, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ManagedEnvironmentsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -556,7 +582,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise { + ): Promise { const poller = await this.beginUpdate( resourceGroupName, environmentName, @@ -584,7 +610,7 @@ export class ManagedEnvironmentsImpl implements ManagedEnvironments { } /** - * Get all workload Profile States for a Premium Managed Environment. + * Get all workload Profile States for a Managed Environment. * @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. @@ -736,7 +762,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope, + requestBody: Parameters.environmentEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -776,15 +802,23 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}", httpMethod: "PATCH", responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.ManagedEnvironment + }, + 201: { + bodyMapper: Mappers.ManagedEnvironment + }, + 202: { + bodyMapper: Mappers.ManagedEnvironment + }, + 204: { + bodyMapper: Mappers.ManagedEnvironment + }, default: { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.environmentEnvelope, + requestBody: Parameters.environmentEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -851,7 +885,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -871,7 +904,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -892,7 +924,6 @@ const listWorkloadProfileStatesNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts index ed330cba0b98..8f0707995923 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts @@ -159,8 +159,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.storageName + Parameters.storageName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer @@ -177,14 +177,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.storageEnvelope, + requestBody: Parameters.storageEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.storageName + Parameters.storageName, + Parameters.environmentName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -206,8 +206,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName, - Parameters.storageName + Parameters.storageName, + Parameters.environmentName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts b/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts index ce821e2ed00d..4ed2af793177 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts new file mode 100644 index 000000000000..a51aa8373e5d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts @@ -0,0 +1,139 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + BuilderResource, + BuildersListBySubscriptionOptionalParams, + BuildersListByResourceGroupOptionalParams, + BuildersGetOptionalParams, + BuildersGetResponse, + BuildersCreateOrUpdateOptionalParams, + BuildersCreateOrUpdateResponse, + BuilderResourceUpdate, + BuildersUpdateOptionalParams, + BuildersUpdateResponse, + BuildersDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Builders. */ +export interface Builders { + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + listBySubscription( + options?: BuildersListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * List BuilderResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + options?: BuildersGetOptionalParams + ): Promise; + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersCreateOrUpdateResponse + > + >; + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildersUpdateResponse + > + >; + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams + ): Promise; + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts new file mode 100644 index 000000000000..5dbf100a312f --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts @@ -0,0 +1,109 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + BuildResource, + BuildsListByBuilderResourceOptionalParams, + BuildsGetOptionalParams, + BuildsGetResponse, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Builds. */ +export interface Builds { + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsGetOptionalParams + ): Promise; + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildsCreateOrUpdateResponse + > + >; + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts index 7770413e4575..b55958c95dbc 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ConnectedEnvironment, ConnectedEnvironmentsListBySubscriptionOptionalParams, @@ -67,8 +67,8 @@ export interface ConnectedEnvironments { environmentEnvelope: ConnectedEnvironment, options?: ConnectedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConnectedEnvironmentsCreateOrUpdateResponse > >; @@ -95,7 +95,7 @@ export interface ConnectedEnvironments { resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an connectedEnvironment. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts index e891805063ca..fa70e90ca85c 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ContainerApp, ContainerAppsListBySubscriptionOptionalParams, @@ -18,6 +18,7 @@ import { ContainerAppsCreateOrUpdateResponse, ContainerAppsDeleteOptionalParams, ContainerAppsUpdateOptionalParams, + ContainerAppsUpdateResponse, ContainerAppsListCustomHostNameAnalysisOptionalParams, ContainerAppsListCustomHostNameAnalysisResponse, ContainerAppsListSecretsOptionalParams, @@ -69,8 +70,8 @@ export interface ContainerApps { containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsCreateOrUpdateResponse > >; @@ -97,7 +98,7 @@ export interface ContainerApps { resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Container App. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -121,7 +122,12 @@ export interface ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsUpdateResponse + > + >; /** * Patches a Container App using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -134,7 +140,7 @@ export interface ContainerApps { containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams - ): Promise; + ): Promise; /** * Analyzes a custom hostname for a Container App * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts index d276be2eaa6d..0858efd0fcd0 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSourceControls.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SourceControl, ContainerAppsSourceControlsListByContainerAppOptionalParams, @@ -60,8 +60,8 @@ export interface ContainerAppsSourceControls { sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ContainerAppsSourceControlsCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface ContainerAppsSourceControls { containerAppName: string, sourceControlName: string, options?: ContainerAppsSourceControlsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Container App SourceControl. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index cb79504dd5c6..2cf675e30017 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -7,22 +7,27 @@ */ export * from "./containerAppsAuthConfigs"; +export * from "./availableWorkloadProfiles"; +export * from "./billingMeters"; +export * from "./builders"; +export * from "./builds"; +export * from "./connectedEnvironments"; +export * from "./connectedEnvironmentsCertificates"; +export * from "./connectedEnvironmentsDaprComponents"; +export * from "./connectedEnvironmentsStorages"; 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 "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; +export * from "./managedCertificates"; export * from "./namespaces"; +export * from "./daprComponents"; 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/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts new file mode 100644 index 000000000000..2540edf36f78 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts @@ -0,0 +1,241 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + Job, + JobsListBySubscriptionOptionalParams, + JobsListByResourceGroupOptionalParams, + JobsGetOptionalParams, + JobsGetResponse, + JobsCreateOrUpdateOptionalParams, + JobsCreateOrUpdateResponse, + JobsDeleteOptionalParams, + JobPatchProperties, + JobsUpdateOptionalParams, + JobsUpdateResponse, + JobExecutionTemplate, + JobsStartOptionalParams, + JobsStartResponse, + JobsStopExecutionOptionalParams, + JobExecutionNamesCollection, + JobsStopMultipleExecutionsOptionalParams, + JobsStopMultipleExecutionsResponse, + JobsListSecretsOptionalParams, + JobsListSecretsResponse +} from "../models"; + +/// +/** Interface representing a Jobs. */ +export interface Jobs { + /** + * Get the Container Apps Jobs in a given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: JobsListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the Container Apps Jobs in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the properties of a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + jobName: string, + options?: JobsGetOptionalParams + ): Promise; + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + jobName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsCreateOrUpdateResponse + > + >; + /** + * Create or Update a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + jobName: string, + jobEnvelope: Job, + options?: JobsCreateOrUpdateOptionalParams + ): Promise; + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Container Apps Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise; + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + jobName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise< + SimplePollerLike, JobsUpdateResponse> + >; + /** + * Patches a Container Apps Job using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobEnvelope Properties used to create a container apps job + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + jobName: string, + jobEnvelope: JobPatchProperties, + options?: JobsUpdateOptionalParams + ): Promise; + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + beginStart( + resourceGroupName: string, + jobName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise< + SimplePollerLike, JobsStartResponse> + >; + /** + * Start a Container Apps Job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param template Properties used to start a job instance. + * @param options The options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + jobName: string, + template: JobExecutionTemplate, + options?: JobsStartOptionalParams + ): Promise; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName Job execution name. + * @param options The options parameters. + */ + beginStopExecution( + resourceGroupName: string, + jobName: string, + jobExecutionName: string, + options?: JobsStopExecutionOptionalParams + ): Promise, void>>; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName Job execution name. + * @param options The options parameters. + */ + beginStopExecutionAndWait( + resourceGroupName: string, + jobName: string, + jobExecutionName: string, + options?: JobsStopExecutionOptionalParams + ): Promise; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName List of all job executions that should be stopped. + * @param options The options parameters. + */ + beginStopMultipleExecutions( + resourceGroupName: string, + jobName: string, + jobExecutionName: JobExecutionNamesCollection, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + JobsStopMultipleExecutionsResponse + > + >; + /** + * Terminates execution of a running container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param jobExecutionName List of all job executions that should be stopped. + * @param options The options parameters. + */ + beginStopMultipleExecutionsAndWait( + resourceGroupName: string, + jobName: string, + jobExecutionName: JobExecutionNamesCollection, + options?: JobsStopMultipleExecutionsOptionalParams + ): Promise; + /** + * List secrets for a container apps job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + listSecrets( + resourceGroupName: string, + jobName: string, + options?: JobsListSecretsOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts new file mode 100644 index 000000000000..ba8d707255f1 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts @@ -0,0 +1,26 @@ +/* + * 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 { JobExecution, JobsExecutionsListOptionalParams } from "../models"; + +/// +/** Interface representing a JobsExecutions. */ +export interface JobsExecutions { + /** + * Get a Container Apps Job's executions + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Container Apps Job. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + jobName: string, + options?: JobsExecutionsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts new file mode 100644 index 000000000000..ce0723009a74 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedCertificates.ts @@ -0,0 +1,110 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ManagedCertificate, + ManagedCertificatesListOptionalParams, + ManagedCertificatesGetOptionalParams, + ManagedCertificatesGetResponse, + ManagedCertificatesCreateOrUpdateOptionalParams, + ManagedCertificatesCreateOrUpdateResponse, + ManagedCertificatesDeleteOptionalParams, + ManagedCertificatePatch, + ManagedCertificatesUpdateOptionalParams, + ManagedCertificatesUpdateResponse +} from "../models"; + +/// +/** Interface representing a ManagedCertificates. */ +export interface ManagedCertificates { + /** + * Get the Managed Certificates in a given managed environment. + * @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. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: ManagedCertificatesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesGetOptionalParams + ): Promise; + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ManagedCertificatesCreateOrUpdateResponse + > + >; + /** + * Create or Update a Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified Managed Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + options?: ManagedCertificatesDeleteOptionalParams + ): Promise; + /** + * Patches a managed certificate. Oly patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param managedCertificateName Name of the Managed Certificate. + * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + managedCertificateName: string, + managedCertificateEnvelope: ManagedCertificatePatch, + options?: ManagedCertificatesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts index 1d2e810c840f..895d16a1f5b0 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ManagedEnvironment, ManagedEnvironmentsListBySubscriptionOptionalParams, @@ -20,6 +20,7 @@ import { ManagedEnvironmentsCreateOrUpdateResponse, ManagedEnvironmentsDeleteOptionalParams, ManagedEnvironmentsUpdateOptionalParams, + ManagedEnvironmentsUpdateResponse, ManagedEnvironmentsGetAuthTokenOptionalParams, ManagedEnvironmentsGetAuthTokenResponse } from "../models"; @@ -44,7 +45,7 @@ export interface ManagedEnvironments { options?: ManagedEnvironmentsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Get all workload Profile States for a Premium Managed Environment. + * Get all workload Profile States for a Managed Environment. * @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. @@ -78,8 +79,8 @@ export interface ManagedEnvironments { environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ManagedEnvironmentsCreateOrUpdateResponse > >; @@ -106,7 +107,7 @@ export interface ManagedEnvironments { resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a Managed Environment if it does not have any container apps. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -130,7 +131,12 @@ export interface ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise, void>>; + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentsUpdateResponse + > + >; /** * Patches a Managed Environment using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -143,7 +149,7 @@ export interface ManagedEnvironments { environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsUpdateOptionalParams - ): Promise; + ): Promise; /** * Checks if resource name is available. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts b/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts +++ b/sdk/appcontainers/arm-appcontainers/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { 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"