diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 9cd68a249254..3b1e9a667f24 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1019,7 +1019,7 @@ packages: resolution: {integrity: sha512-Q71Buur3RMcg6lCnisLL8Im562DBw+ybzgm+YQj/FbAaI8ZNu/zl/5z1fE4k3Q9LSIzYrz6HLRzlhdSBXpydlQ==} engines: {node: '>=8.0.0'} dependencies: - '@azure/core-http': 1.2.3 + '@azure/core-http': 1.2.6 '@azure/core-tracing': 1.0.0-preview.9 '@azure/logger': 1.0.3 '@azure/msal-node': 1.0.0-beta.6_debug@4.3.4 @@ -2348,7 +2348,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/chai-as-promised/7.1.5: @@ -2374,7 +2374,7 @@ packages: /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/cookie/0.4.1: @@ -2409,7 +2409,7 @@ packages: /@types/express-serve-static-core/4.17.30: resolution: {integrity: sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 dev: false @@ -2426,20 +2426,20 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/glob/7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 3.0.5 - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/inquirer/8.2.1: @@ -2452,7 +2452,7 @@ packages: /@types/is-buffer/2.0.0: resolution: {integrity: sha512-0f7N/e3BAz32qDYvgB4d2cqv1DqUwvGxHkXsrucICn8la1Vb6Yl6Eg8mPScGwUiqHJeE7diXlzaK+QMA9m4Gxw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/json-schema/7.0.11: @@ -2466,13 +2466,13 @@ packages: /@types/jsonwebtoken/8.5.8: resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/jws/3.2.4: resolution: {integrity: sha512-aqtH4dPw1wUjFZaeMD1ak/pf8iXlu/odFe+trJrvw0g1sTh93i+SCykg0Ek8C6B7rVK3oBORbfZAsKO7P10etg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/long/4.0.2: @@ -2508,13 +2508,13 @@ packages: /@types/mock-fs/4.13.1: resolution: {integrity: sha512-m6nFAJ3lBSnqbvDZioawRvpLXSaPyn52Srf7OfzjubYbYX8MTUdIgDxQl0wEapm4m/pNYSd9TXocpQ0TvZFlYA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/mock-require/2.0.1: resolution: {integrity: sha512-O7U5DVGboY/Crueb5/huUCIRjKtRVRaLmRDbZJBlDQgJn966z3aiFDN+6AtYviu2ExwMkl34LjT/IiC0OPtKuQ==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/ms/0.7.31: @@ -2532,7 +2532,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 form-data: 3.0.1 dev: false @@ -2579,7 +2579,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/semaphore/1.1.1: @@ -2590,7 +2590,7 @@ packages: resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==} dependencies: '@types/mime': 3.0.0 - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/sinon/10.0.13: @@ -2612,13 +2612,13 @@ packages: /@types/stoppable/1.1.1: resolution: {integrity: sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/tough-cookie/4.0.2: @@ -2632,13 +2632,13 @@ packages: /@types/tunnel/0.0.1: resolution: {integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/tunnel/0.0.3: resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/underscore/1.11.4: @@ -2656,19 +2656,19 @@ packages: /@types/ws/7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/xml2js/0.4.11: resolution: {integrity: sha512-JdigeAKmCyoJUiQljjr7tQG3if9NkqGUgwEUqBvV0N7LM4HyQk7UXCnusRa1lnvXAEYJ8mw8GtZWioagNztOwA==} dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false /@types/yargs-parser/21.0.0: @@ -2685,7 +2685,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 12.20.55 + '@types/node': 18.6.3 dev: false optional: true @@ -3742,7 +3742,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: @@ -3943,7 +3943,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.6.4 + typescript: 4.7.4 dev: false /ecdsa-sig-formatter/1.0.11: @@ -3994,7 +3994,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 12.20.55 + '@types/node': 18.6.3 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -5005,7 +5005,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 @@ -9813,7 +9813,7 @@ packages: dev: false file:projects/arm-appcontainers.tgz: - resolution: {integrity: sha512-0mYXpQ7m6iizIGXzG6HnEPmLT14PU6oRsPF3/mMoYZbA4xqYcpLteEsog6fCexy0ol1oJYF++DRzTNULxzbanQ==, tarball: file:projects/arm-appcontainers.tgz} + resolution: {integrity: sha512-N4mw3UQVy0kmeQ7PHC+FHyz0c+ACwPgzhM6BNq1eyFDuZXKWBZL4/McVUaiQjZ9EAgzr36wfowWCJsipUj8Z1w==, tarball: file:projects/arm-appcontainers.tgz} name: '@rush-temp/arm-appcontainers' version: 0.0.0 dependencies: @@ -9824,6 +9824,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.77.2 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.77.2 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.77.2 + '@types/chai': 4.3.1 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -9831,12 +9833,10 @@ packages: rollup: 2.77.2 rollup-plugin-sourcemaps: 0.6.3_rollup@2.77.2 tslib: 2.4.0 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' - - encoding - - supports-color dev: false file:projects/arm-appinsights.tgz: diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index c0454ae53877..30a2ec94fff9 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History + +## 1.1.0 (2022-08-02) + +**Features** -## 1.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface AuthConfig + - Added Interface Certificate + - Added Interface ContainerApp + - Added Interface CustomHostnameAnalysisResult + - Added Interface DaprComponent + - Added Interface ManagedEnvironment + - Added Interface ManagedEnvironmentStorage + - Added Interface ProxyResource + - Added Interface Replica + - Added Interface Revision + - Added Interface SourceControl + - Added Interface TrackedResource + + ## 1.0.0 (2022-05-20) The package of @azure/arm-appcontainers is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index da4da9210524..8c9eff4bc253 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "af0952425f0a9addae574dcc3103df7e50e152f5", + "commit": "1dd79c416cdccde274113ec03b92b75069fad464", "readme": "specification/app/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220721.1 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", + "use": "@autorest/typescript@6.0.0-rc.1.20220721.1" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index 4bcae304ef20..079f1df235c4 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "1.0.1", + "version": "1.1.0", "engines": { "node": ">=12.0.0" }, @@ -36,13 +36,17 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -115,4 +118,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.js b/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.js deleted file mode 100644 index 0f6ecb857acf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.js +++ /dev/null @@ -1,5 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7a6be38bb8cb644d64b4094802301751"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.json b/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/recordings/node/my_test/recording_sample_test.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md index 6718e8cfe1fa..c22c0ab5d095 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -56,13 +56,13 @@ export interface AppRegistration { } // @public -export type AuthConfig = ProxyResource & { - platform?: AuthPlatform; +export interface AuthConfig extends ProxyResource { globalValidation?: GlobalValidation; + httpSettings?: HttpSettings; identityProviders?: IdentityProviders; login?: Login; - httpSettings?: HttpSettings; -}; + platform?: AuthPlatform; +} // @public export interface AuthConfigCollection { @@ -145,9 +145,9 @@ export interface AzureStaticWebAppsRegistration { export type BindingType = string; // @public -export type Certificate = TrackedResource & { +export interface Certificate extends TrackedResource { properties?: CertificateProperties; -}; +} // @public export interface CertificateCollection { @@ -272,17 +272,17 @@ export interface Container { } // @public -export type ContainerApp = TrackedResource & { +export interface ContainerApp extends TrackedResource { + configuration?: Configuration; + readonly customDomainVerificationId?: string; identity?: ManagedServiceIdentity; - readonly provisioningState?: ContainerAppProvisioningState; - managedEnvironmentId?: string; - readonly latestRevisionName?: string; readonly latestRevisionFqdn?: string; - readonly customDomainVerificationId?: string; - configuration?: Configuration; + readonly latestRevisionName?: string; + managedEnvironmentId?: string; + readonly outboundIpAddresses?: string[]; + readonly provisioningState?: ContainerAppProvisioningState; template?: Template; - readonly outboundIPAddresses?: string[]; -}; +} // @public export interface ContainerAppCollection { @@ -636,19 +636,19 @@ export interface CustomDomain { } // @public -export type CustomHostnameAnalysisResult = ProxyResource & { - readonly hostName?: string; - readonly isHostnameAlreadyVerified?: boolean; - readonly customDomainVerificationTest?: DnsVerificationTestResult; +export interface CustomHostnameAnalysisResult { + alternateCNameRecords?: string[]; + alternateTxtRecords?: string[]; + aRecords?: string[]; + cNameRecords?: string[]; + readonly conflictingContainerAppResourceId?: string; readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; + readonly customDomainVerificationTest?: DnsVerificationTestResult; readonly hasConflictOnManagedEnvironment?: boolean; - readonly conflictingContainerAppResourceId?: string; - cNameRecords?: string[]; + readonly hostName?: string; + readonly isHostnameAlreadyVerified?: boolean; txtRecords?: string[]; - aRecords?: string[]; - alternateCNameRecords?: string[]; - alternateTxtRecords?: string[]; -}; +} // @public export interface CustomOpenIdConnectProvider { @@ -675,15 +675,15 @@ export interface Dapr { } // @public -export type DaprComponent = ProxyResource & { +export interface DaprComponent extends ProxyResource { componentType?: string; - version?: string; ignoreErrors?: boolean; initTimeout?: string; - secrets?: Secret[]; metadata?: DaprMetadata[]; scopes?: string[]; -}; + secrets?: Secret[]; + version?: string; +} // @public export interface DaprComponents { @@ -899,187 +899,128 @@ export interface JwtClaimChecks { // @public export enum KnownAccessMode { - // (undocumented) ReadOnly = "ReadOnly", - // (undocumented) ReadWrite = "ReadWrite" } // @public export enum KnownActiveRevisionsMode { - // (undocumented) Multiple = "Multiple", - // (undocumented) Single = "Single" } // @public export enum KnownAppProtocol { - // (undocumented) Grpc = "grpc", - // (undocumented) Http = "http" } // @public export enum KnownBindingType { - // (undocumented) Disabled = "Disabled", - // (undocumented) SniEnabled = "SniEnabled" } // @public export enum KnownCertificateProvisioningState { - // (undocumented) Canceled = "Canceled", - // (undocumented) DeleteFailed = "DeleteFailed", - // (undocumented) Failed = "Failed", - // (undocumented) Pending = "Pending", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownCheckNameAvailabilityReason { - // (undocumented) AlreadyExists = "AlreadyExists", - // (undocumented) Invalid = "Invalid" } // @public export enum KnownContainerAppProvisioningState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Failed = "Failed", - // (undocumented) InProgress = "InProgress", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownCreatedByType { - // (undocumented) Application = "Application", - // (undocumented) Key = "Key", - // (undocumented) ManagedIdentity = "ManagedIdentity", - // (undocumented) User = "User" } // @public export enum KnownEnvironmentProvisioningState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Failed = "Failed", - // (undocumented) InfrastructureSetupComplete = "InfrastructureSetupComplete", - // (undocumented) InfrastructureSetupInProgress = "InfrastructureSetupInProgress", - // (undocumented) InitializationInProgress = "InitializationInProgress", - // (undocumented) ScheduledForDelete = "ScheduledForDelete", - // (undocumented) Succeeded = "Succeeded", - // (undocumented) UpgradeFailed = "UpgradeFailed", - // (undocumented) UpgradeRequested = "UpgradeRequested", - // (undocumented) Waiting = "Waiting" } // @public export enum KnownIngressTransportMethod { - // (undocumented) Auto = "auto", - // (undocumented) Http = "http", - // (undocumented) Http2 = "http2" } // @public export enum KnownManagedServiceIdentityType { - // (undocumented) None = "None", - // (undocumented) SystemAssigned = "SystemAssigned", - // (undocumented) SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", - // (undocumented) UserAssigned = "UserAssigned" } // @public export enum KnownRevisionHealthState { - // (undocumented) Healthy = "Healthy", - // (undocumented) None = "None", - // (undocumented) Unhealthy = "Unhealthy" } // @public export enum KnownRevisionProvisioningState { - // (undocumented) Deprovisioned = "Deprovisioned", - // (undocumented) Deprovisioning = "Deprovisioning", - // (undocumented) Failed = "Failed", - // (undocumented) Provisioned = "Provisioned", - // (undocumented) Provisioning = "Provisioning" } // @public export enum KnownScheme { - // (undocumented) Http = "HTTP", - // (undocumented) Https = "HTTPS" } // @public export enum KnownSourceControlOperationState { - // (undocumented) Canceled = "Canceled", - // (undocumented) Failed = "Failed", - // (undocumented) InProgress = "InProgress", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownStorageType { - // (undocumented) AzureFile = "AzureFile", - // (undocumented) EmptyDir = "EmptyDir" } // @public export enum KnownType { - // (undocumented) Liveness = "Liveness", - // (undocumented) Readiness = "Readiness", - // (undocumented) Startup = "Startup" } @@ -1109,17 +1050,17 @@ export interface LoginScopes { } // @public -export type ManagedEnvironment = TrackedResource & { - readonly provisioningState?: EnvironmentProvisioningState; - daprAIInstrumentationKey?: string; +export interface ManagedEnvironment extends TrackedResource { + appLogsConfiguration?: AppLogsConfiguration; daprAIConnectionString?: string; - vnetConfiguration?: VnetConfiguration; - readonly deploymentErrors?: string; + daprAIInstrumentationKey?: string; readonly defaultDomain?: string; + readonly deploymentErrors?: string; + readonly provisioningState?: EnvironmentProvisioningState; readonly staticIp?: string; - appLogsConfiguration?: AppLogsConfiguration; + vnetConfiguration?: VnetConfiguration; zoneRedundant?: boolean; -}; +} // @public export interface ManagedEnvironments { @@ -1224,9 +1165,9 @@ export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClien export type ManagedEnvironmentsStoragesListResponse = ManagedEnvironmentStoragesCollection; // @public -export type ManagedEnvironmentStorage = ProxyResource & { +export interface ManagedEnvironmentStorage extends ProxyResource { properties?: ManagedEnvironmentStorageProperties; -}; +} // @public export interface ManagedEnvironmentStorageProperties { @@ -1339,7 +1280,8 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = AvailableOperations; // @public -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource { +} // @public export interface QueueScaleRule { @@ -1364,10 +1306,10 @@ export interface RegistryInfo { } // @public -export type Replica = ProxyResource & { - readonly createdTime?: Date; +export interface Replica extends ProxyResource { containers?: ReplicaContainer[]; -}; + readonly createdTime?: Date; +} // @public export interface ReplicaCollection { @@ -1392,17 +1334,17 @@ export interface Resource { } // @public -export type Revision = ProxyResource & { +export interface Revision extends ProxyResource { + readonly active?: boolean; readonly createdTime?: Date; readonly fqdn?: string; - readonly template?: Template; - readonly active?: boolean; - readonly replicas?: number; - readonly trafficWeight?: number; - readonly provisioningError?: string; readonly healthState?: RevisionHealthState; + readonly provisioningError?: string; readonly provisioningState?: RevisionProvisioningState; -}; + readonly replicas?: number; + readonly template?: Template; + readonly trafficWeight?: number; +} // @public export interface RevisionCollection { @@ -1452,12 +1394,12 @@ export interface SecretsCollection { } // @public -export type SourceControl = ProxyResource & { - readonly operationState?: SourceControlOperationState; - repoUrl?: string; +export interface SourceControl extends ProxyResource { branch?: string; githubActionConfiguration?: GithubActionConfiguration; -}; + readonly operationState?: SourceControlOperationState; + repoUrl?: string; +} // @public export interface SourceControlCollection { @@ -1490,12 +1432,12 @@ export interface Template { } // @public -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { + location: string; tags?: { [propertyName: string]: string; }; - location: string; -}; +} // @public export interface TrafficWeight { diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts index 0e5d91f4230e..6986bdb4013d 100644 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts +++ b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts @@ -29,7 +29,8 @@ async function createOrUpdateCertificate() { const certificateEnvelope: Certificate = { location: "East US", properties: { - password: "private key password" + password: "private key password", + value: Buffer.from("PFX-or-PEM-blob") } }; const options: CertificatesCreateOrUpdateOptionalParams = { diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js index 610c9d4c1ced..358c3afc4982 100644 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js +++ b/sdk/appcontainers/arm-appcontainers/samples/v1/javascript/certificatesCreateOrUpdateSample.js @@ -26,6 +26,7 @@ async function createOrUpdateCertificate() { location: "East US", properties: { password: "private key password", + value: Buffer.from("PFX-or-PEM-blob"), }, }; const options = { diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json index 386b9ee0f8b9..1748a252b821 100644 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json +++ b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^12.0.0", - "typescript": "~4.4.0", + "typescript": "~4.6.0", "rimraf": "latest" } } diff --git a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts index 0e5d91f4230e..6986bdb4013d 100644 --- a/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts +++ b/sdk/appcontainers/arm-appcontainers/samples/v1/typescript/src/certificatesCreateOrUpdateSample.ts @@ -29,7 +29,8 @@ async function createOrUpdateCertificate() { const certificateEnvelope: Certificate = { location: "East US", properties: { - password: "private key password" + password: "private key password", + value: Buffer.from("PFX-or-PEM-blob") } }; const options: CertificatesCreateOrUpdateOptionalParams = { diff --git a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index 74e6683734c2..847807afb70d 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { ContainerAppsAuthConfigsImpl, @@ -69,7 +74,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-appcontainers/1.0.1`; + const packageDetails = `azsdk-js-arm-appcontainers/1.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -89,27 +94,34 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; @@ -134,6 +146,35 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( this ); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } containerAppsAuthConfigs: ContainerAppsAuthConfigs; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 6463ddecf112..27985e70410b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -819,6 +819,50 @@ export interface Volume { storageName?: string; } +/** Custom domain analysis. */ +export interface CustomHostnameAnalysisResult { + /** + * Host name that was analyzed + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; + /** + * true if hostname is already verified; otherwise, false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isHostnameAlreadyVerified?: boolean; + /** + * DNS verification test result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationTest?: DnsVerificationTestResult; + /** + * Raw failure information if DNS verification fails. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; + /** + * true if there is a conflict on the Container App's managed environment; otherwise, false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hasConflictOnManagedEnvironment?: boolean; + /** + * 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 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[]; +} + /** Container App Secrets Collection ARM resource. */ export interface SecretsCollection { /** Collection of resources. */ @@ -945,7 +989,7 @@ export interface ManagedEnvironmentsCollection { /** 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, must provide ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this property */ + /** 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; @@ -1136,18 +1180,18 @@ export interface AzureCredentials { } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; +export interface ProxyResource extends Resource {} /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; -}; +} /** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ -export type AuthConfig = ProxyResource & { +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. */ @@ -1158,54 +1202,10 @@ export type AuthConfig = ProxyResource & { login?: Login; /** The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ httpSettings?: HttpSettings; -}; - -/** Custom domain analysis. */ -export type CustomHostnameAnalysisResult = ProxyResource & { - /** - * Host name that was analyzed - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostName?: string; - /** - * true if hostname is already verified; otherwise, false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isHostnameAlreadyVerified?: boolean; - /** - * DNS verification test result. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customDomainVerificationTest?: DnsVerificationTestResult; - /** - * Raw failure information if DNS verification fails. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly customDomainVerificationFailureInfo?: DefaultErrorResponse; - /** - * true if there is a conflict on the Container App's managed environment; otherwise, false. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hasConflictOnManagedEnvironment?: boolean; - /** - * 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 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[]; -}; +} /** Container App Revision. */ -export type Revision = ProxyResource & { +export interface Revision extends ProxyResource { /** * Timestamp describing when the revision was created * by controller @@ -1254,10 +1254,10 @@ export type Revision = ProxyResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: RevisionProvisioningState; -}; +} /** Container App Revision Replica. */ -export type Replica = ProxyResource & { +export interface Replica extends ProxyResource { /** * Timestamp describing when the pod was created by controller * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1265,10 +1265,10 @@ export type Replica = ProxyResource & { readonly createdTime?: Date; /** The containers collection under a replica. */ containers?: ReplicaContainer[]; -}; +} /** Dapr Component. */ -export type DaprComponent = ProxyResource & { +export interface DaprComponent extends ProxyResource { /** Component type */ componentType?: string; /** Component version */ @@ -1283,16 +1283,16 @@ export type DaprComponent = ProxyResource & { metadata?: DaprMetadata[]; /** Names of container apps that can use this Dapr component */ scopes?: string[]; -}; +} /** Storage resource for managedEnvironment. */ -export type ManagedEnvironmentStorage = ProxyResource & { +export interface ManagedEnvironmentStorage extends ProxyResource { /** Storage properties */ properties?: ManagedEnvironmentStorageProperties; -}; +} /** Container App SourceControl. */ -export type SourceControl = ProxyResource & { +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. @@ -1308,10 +1308,10 @@ export type SourceControl = ProxyResource & { * as they were at the creation time */ githubActionConfiguration?: GithubActionConfiguration; -}; +} /** Container App. */ -export type ContainerApp = TrackedResource & { +export interface ContainerApp extends TrackedResource { /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ identity?: ManagedServiceIdentity; /** @@ -1344,11 +1344,11 @@ export type ContainerApp = TrackedResource & { * Outbound IP Addresses for container app. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly outboundIPAddresses?: string[]; -}; + readonly outboundIpAddresses?: string[]; +} /** An environment for hosting container apps */ -export type ManagedEnvironment = TrackedResource & { +export interface ManagedEnvironment extends TrackedResource { /** * Provisioning state of the Environment. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1383,19 +1383,23 @@ export type ManagedEnvironment = TrackedResource & { appLogsConfiguration?: AppLogsConfiguration; /** Whether or not this Managed Environment is zone-redundant. */ zoneRedundant?: boolean; -}; +} /** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment */ -export type Certificate = TrackedResource & { +export interface Certificate extends TrackedResource { /** Certificate resource specific properties */ properties?: CertificateProperties; -}; +} /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { + /** User */ User = "User", + /** Application */ Application = "Application", + /** ManagedIdentity */ ManagedIdentity = "ManagedIdentity", + /** Key */ Key = "Key" } @@ -1413,9 +1417,13 @@ export type CreatedByType = string; /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ export enum KnownManagedServiceIdentityType { + /** None */ None = "None", + /** SystemAssigned */ SystemAssigned = "SystemAssigned", + /** UserAssigned */ UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" } @@ -1433,9 +1441,13 @@ export type ManagedServiceIdentityType = string; /** Known values of {@link ContainerAppProvisioningState} that the service accepts. */ export enum KnownContainerAppProvisioningState { + /** InProgress */ InProgress = "InProgress", + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed", + /** Canceled */ Canceled = "Canceled" } @@ -1453,7 +1465,9 @@ export type ContainerAppProvisioningState = string; /** Known values of {@link ActiveRevisionsMode} that the service accepts. */ export enum KnownActiveRevisionsMode { + /** Multiple */ Multiple = "Multiple", + /** Single */ Single = "Single" } @@ -1469,8 +1483,11 @@ export type ActiveRevisionsMode = string; /** Known values of {@link IngressTransportMethod} that the service accepts. */ export enum KnownIngressTransportMethod { + /** Auto */ Auto = "auto", + /** Http */ Http = "http", + /** Http2 */ Http2 = "http2" } @@ -1487,7 +1504,9 @@ export type IngressTransportMethod = string; /** Known values of {@link BindingType} that the service accepts. */ export enum KnownBindingType { + /** Disabled */ Disabled = "Disabled", + /** SniEnabled */ SniEnabled = "SniEnabled" } @@ -1503,7 +1522,9 @@ export type BindingType = string; /** Known values of {@link AppProtocol} that the service accepts. */ export enum KnownAppProtocol { + /** Http */ Http = "http", + /** Grpc */ Grpc = "grpc" } @@ -1519,7 +1540,9 @@ export type AppProtocol = string; /** Known values of {@link Scheme} that the service accepts. */ export enum KnownScheme { + /** Http */ Http = "HTTP", + /** Https */ Https = "HTTPS" } @@ -1535,8 +1558,11 @@ export type Scheme = string; /** Known values of {@link Type} that the service accepts. */ export enum KnownType { + /** Liveness */ Liveness = "Liveness", + /** Readiness */ Readiness = "Readiness", + /** Startup */ Startup = "Startup" } @@ -1553,7 +1579,9 @@ export type Type = string; /** Known values of {@link StorageType} that the service accepts. */ export enum KnownStorageType { + /** AzureFile */ AzureFile = "AzureFile", + /** EmptyDir */ EmptyDir = "EmptyDir" } @@ -1569,8 +1597,11 @@ export type StorageType = string; /** Known values of {@link RevisionHealthState} that the service accepts. */ export enum KnownRevisionHealthState { + /** Healthy */ Healthy = "Healthy", + /** Unhealthy */ Unhealthy = "Unhealthy", + /** None */ None = "None" } @@ -1587,10 +1618,15 @@ export type RevisionHealthState = string; /** Known values of {@link RevisionProvisioningState} that the service accepts. */ export enum KnownRevisionProvisioningState { + /** Provisioning */ Provisioning = "Provisioning", + /** Provisioned */ Provisioned = "Provisioned", + /** Failed */ Failed = "Failed", + /** Deprovisioning */ Deprovisioning = "Deprovisioning", + /** Deprovisioned */ Deprovisioned = "Deprovisioned" } @@ -1609,15 +1645,25 @@ export type RevisionProvisioningState = string; /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed", + /** Canceled */ Canceled = "Canceled", + /** Waiting */ Waiting = "Waiting", + /** InitializationInProgress */ InitializationInProgress = "InitializationInProgress", + /** InfrastructureSetupInProgress */ InfrastructureSetupInProgress = "InfrastructureSetupInProgress", + /** InfrastructureSetupComplete */ InfrastructureSetupComplete = "InfrastructureSetupComplete", + /** ScheduledForDelete */ ScheduledForDelete = "ScheduledForDelete", + /** UpgradeRequested */ UpgradeRequested = "UpgradeRequested", + /** UpgradeFailed */ UpgradeFailed = "UpgradeFailed" } @@ -1641,10 +1687,15 @@ export type EnvironmentProvisioningState = 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" } @@ -1663,7 +1714,9 @@ export type CertificateProvisioningState = string; /** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */ export enum KnownCheckNameAvailabilityReason { + /** Invalid */ Invalid = "Invalid", + /** AlreadyExists */ AlreadyExists = "AlreadyExists" } @@ -1679,7 +1732,9 @@ export type CheckNameAvailabilityReason = string; /** Known values of {@link AccessMode} that the service accepts. */ export enum KnownAccessMode { + /** ReadOnly */ ReadOnly = "ReadOnly", + /** ReadWrite */ ReadWrite = "ReadWrite" } @@ -1695,9 +1750,13 @@ export type AccessMode = string; /** Known values of {@link SourceControlOperationState} that the service accepts. */ export enum KnownSourceControlOperationState { + /** InProgress */ InProgress = "InProgress", + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed", + /** Canceled */ Canceled = "Canceled" } diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index e3c31995385f..aa428860d929 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -2149,6 +2149,113 @@ export const Volume: coreClient.CompositeMapper = { } }; +export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomHostnameAnalysisResult", + modelProperties: { + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String" + } + }, + isHostnameAlreadyVerified: { + serializedName: "isHostnameAlreadyVerified", + readOnly: true, + type: { + name: "Boolean" + } + }, + customDomainVerificationTest: { + serializedName: "customDomainVerificationTest", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Passed", "Failed", "Skipped"] + } + }, + customDomainVerificationFailureInfo: { + serializedName: "customDomainVerificationFailureInfo", + type: { + name: "Composite", + className: "DefaultErrorResponse" + } + }, + hasConflictOnManagedEnvironment: { + serializedName: "hasConflictOnManagedEnvironment", + readOnly: true, + type: { + name: "Boolean" + } + }, + conflictingContainerAppResourceId: { + serializedName: "conflictingContainerAppResourceId", + readOnly: true, + type: { + name: "String" + } + }, + cNameRecords: { + serializedName: "cNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + txtRecords: { + serializedName: "txtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + aRecords: { + serializedName: "aRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + alternateCNameRecords: { + serializedName: "alternateCNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + alternateTxtRecords: { + serializedName: "alternateTxtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const SecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3041,114 +3148,6 @@ export const AuthConfig: coreClient.CompositeMapper = { } }; -export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CustomHostnameAnalysisResult", - modelProperties: { - ...ProxyResource.type.modelProperties, - hostName: { - serializedName: "properties.hostName", - readOnly: true, - type: { - name: "String" - } - }, - isHostnameAlreadyVerified: { - serializedName: "properties.isHostnameAlreadyVerified", - readOnly: true, - type: { - name: "Boolean" - } - }, - customDomainVerificationTest: { - serializedName: "properties.customDomainVerificationTest", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["Passed", "Failed", "Skipped"] - } - }, - customDomainVerificationFailureInfo: { - serializedName: "properties.customDomainVerificationFailureInfo", - type: { - name: "Composite", - className: "DefaultErrorResponse" - } - }, - hasConflictOnManagedEnvironment: { - serializedName: "properties.hasConflictOnManagedEnvironment", - readOnly: true, - type: { - name: "Boolean" - } - }, - conflictingContainerAppResourceId: { - serializedName: "properties.conflictingContainerAppResourceId", - readOnly: true, - type: { - name: "String" - } - }, - cNameRecords: { - serializedName: "properties.cNameRecords", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - txtRecords: { - serializedName: "properties.txtRecords", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - aRecords: { - serializedName: "properties.aRecords", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - alternateCNameRecords: { - serializedName: "properties.alternateCNameRecords", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - alternateTxtRecords: { - serializedName: "properties.alternateTxtRecords", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - export const Revision: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3434,7 +3433,7 @@ export const ContainerApp: coreClient.CompositeMapper = { className: "Template" } }, - outboundIPAddresses: { + outboundIpAddresses: { serializedName: "properties.outboundIPAddresses", readOnly: true, type: { diff --git a/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts +++ b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() {