diff --git a/sdk/appplatform/arm-appplatform/CHANGELOG.md b/sdk/appplatform/arm-appplatform/CHANGELOG.md index 5387575e44b2..750b9abfe058 100644 --- a/sdk/appplatform/arm-appplatform/CHANGELOG.md +++ b/sdk/appplatform/arm-appplatform/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 2.0.0-beta.6 (2022-05-16) -## 2.0.0-beta.6 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.5 (2022-04-07) - -The package of @azure/arm-appplatform is using our next generation design principles since version 2.0.0-beta.5, which contains breaking changes. +The package of @azure/arm-appplatform is using our next generation design principles since version 2.0.0-beta.6, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/appplatform/arm-appplatform/README.md b/sdk/appplatform/arm-appplatform/README.md index 1822e3bdf93a..83fb27b5bf5c 100644 --- a/sdk/appplatform/arm-appplatform/README.md +++ b/sdk/appplatform/arm-appplatform/README.md @@ -2,7 +2,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure AppPlatformManagement client. -REST API for Azure Spring Cloud +REST API for Azure Spring Apps [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appplatform/arm-appplatform) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-appplatform) | diff --git a/sdk/appplatform/arm-appplatform/_meta.json b/sdk/appplatform/arm-appplatform/_meta.json index ae4aced6aba3..bac5a0a2cff6 100644 --- a/sdk/appplatform/arm-appplatform/_meta.json +++ b/sdk/appplatform/arm-appplatform/_meta.json @@ -1,8 +1,8 @@ { - "commit": "54ee1a9eb50c13e0790627749f986c886ad4f4db", - "readme": "specification\\appplatform\\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\\attestation\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.18.20220329.1 --generate-sample=true", + "commit": "1be34c2955526679d441bda4fa40744b5ee5e1b1", + "readme": "specification/appplatform/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/appplatform/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220425.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.1", - "use": "@autorest/typescript@6.0.0-alpha.18.20220329.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", + "use": "@autorest/typescript@6.0.0-alpha.19.20220425.1" +} \ No newline at end of file diff --git a/sdk/appplatform/arm-appplatform/package.json b/sdk/appplatform/arm-appplatform/package.json index a3b6f5256296..a81665bdf966 100644 --- a/sdk/appplatform/arm-appplatform/package.json +++ b/sdk/appplatform/arm-appplatform/package.json @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.0.0", + "@azure/core-client": "^1.5.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" }, "keywords": [ @@ -40,9 +40,11 @@ "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" + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appplatform/arm-appplatform", "repository": { @@ -93,7 +95,7 @@ "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:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -106,13 +108,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appplatform?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/appplatform/arm-appplatform/review/arm-appplatform.api.md b/sdk/appplatform/arm-appplatform/review/arm-appplatform.api.md index 5fb9cc6cf2a3..943dbb0cbcf6 100644 --- a/sdk/appplatform/arm-appplatform/review/arm-appplatform.api.md +++ b/sdk/appplatform/arm-appplatform/review/arm-appplatform.api.md @@ -273,6 +273,7 @@ export interface AppResourceProperties { public?: boolean; temporaryDisk?: TemporaryDisk; readonly url?: string; + vnetAddons?: AppVNetAddons; } // @public @@ -363,6 +364,12 @@ export interface AppsValidateDomainOptionalParams extends coreClient.OperationOp // @public export type AppsValidateDomainResponse = CustomDomainValidateResult; +// @public +export interface AppVNetAddons { + publicEndpoint?: boolean; + readonly publicEndpointUrl?: string; +} + // @public export interface AvailableOperations { nextLink?: string; @@ -594,12 +601,19 @@ export interface BuildProperties { }; readonly provisioningState?: BuildProvisioningState; relativePath?: string; + resourceRequests?: BuildResourceRequests; readonly triggeredBuildResult?: TriggeredBuildResult; } // @public export type BuildProvisioningState = string; +// @public +export interface BuildResourceRequests { + cpu?: string; + memory?: string; +} + // @public export type BuildResult = ProxyResource & { properties?: BuildResultProperties; @@ -910,6 +924,7 @@ export interface CertificateProperties { readonly expirationDate?: string; readonly issuedDate?: string; readonly issuer?: string; + readonly provisioningState?: CertificateResourceProvisioningState; readonly subjectName?: string; readonly thumbprint?: string; type: "KeyVaultCertificate" | "ContentCertificate"; @@ -929,6 +944,9 @@ export interface CertificateResourceCollection { value?: CertificateResource[]; } +// @public +export type CertificateResourceProvisioningState = string; + // @public export interface Certificates { beginCreateOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: CertificateResource, options?: CertificatesCreateOrUpdateOptionalParams): Promise, CertificatesCreateOrUpdateResponse>>; @@ -991,11 +1009,13 @@ export interface CloudErrorBody { // @public export interface ClusterResourceProperties { readonly fqdn?: string; + marketplaceResource?: MarketplaceResource; networkProfile?: NetworkProfile; readonly powerState?: PowerState; readonly provisioningState?: ProvisioningState; readonly serviceId?: string; readonly version?: number; + vnetAddons?: ServiceVNetAddons; // (undocumented) zoneRedundant?: boolean; } @@ -1254,6 +1274,7 @@ export type CustomContainerUserSourceInfo = UserSourceInfo & { export interface CustomDomainProperties { readonly appName?: string; certName?: string; + readonly provisioningState?: CustomDomainResourceProvisioningState; thumbprint?: string; } @@ -1268,6 +1289,9 @@ export interface CustomDomainResourceCollection { value?: CustomDomainResource[]; } +// @public +export type CustomDomainResourceProvisioningState = string; + // @public export interface CustomDomains { beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsCreateOrUpdateOptionalParams): Promise, CustomDomainsCreateOrUpdateResponse>>; @@ -1443,7 +1467,11 @@ export interface DeploymentSettings { environmentVariables?: { [propertyName: string]: string; }; + livenessProbe?: Probe; + readinessProbe?: Probe; resourceRequests?: ResourceRequests; + startupProbe?: Probe; + terminationGracePeriodSeconds?: number; } // @public @@ -1550,6 +1578,12 @@ export interface ErrorModel { message?: string; } +// @public +export type ExecAction = ProbeAction & { + type: "ExecAction"; + command?: string[]; +}; + // @public export interface GatewayApiMetadataProperties { description?: string; @@ -1698,9 +1732,15 @@ export interface GatewayResourceRequests { memory?: string; } +// @public +export interface GatewayRouteConfigOpenApiProperties { + uri?: string; +} + // @public export interface GatewayRouteConfigProperties { appResourceId?: string; + openApi?: GatewayRouteConfigOpenApiProperties; readonly provisioningState?: GatewayProvisioningState; routes?: GatewayApiRoute[]; } @@ -1831,12 +1871,27 @@ export interface GitPatternRepository { username?: string; } +// @public +export type HttpGetAction = ProbeAction & { + type: "HTTPGetAction"; + path?: string; + scheme?: HttpSchemeType; +}; + +// @public +export type HttpSchemeType = string; + // @public export interface ImageRegistryCredential { password?: string; username?: string; } +// @public +export interface IngressConfig { + readTimeoutInSeconds?: number; +} + // @public export type JarUploadedUserSourceInfo = UploadedUserSourceInfo & { type: "Jar"; @@ -1973,6 +2028,20 @@ export enum KnownBuildServiceProvisioningState { Updating = "Updating" } +// @public +export enum KnownCertificateResourceProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + // @public export enum KnownConfigServerState { // (undocumented) @@ -2013,6 +2082,20 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownCustomDomainResourceProvisioningState { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} + // @public export enum KnownDeploymentResourceProvisioningState { // (undocumented) @@ -2047,6 +2130,14 @@ export enum KnownGatewayProvisioningState { Updating = "Updating" } +// @public +export enum KnownHttpSchemeType { + // (undocumented) + Http = "HTTP", + // (undocumented) + Https = "HTTPS" +} + // @public export enum KnownKPackBuildStageProvisioningState { // (undocumented) @@ -2103,6 +2194,16 @@ export enum KnownPowerState { Stopped = "Stopped" } +// @public +export enum KnownProbeActionType { + // (undocumented) + ExecAction = "ExecAction", + // (undocumented) + HttpGetAction = "HTTPGetAction", + // (undocumented) + TCPSocketAction = "TCPSocketAction" +} + // @public export enum KnownProvisioningState { // (undocumented) @@ -2169,6 +2270,12 @@ export enum KnownSkuScaleType { None = "None" } +// @public +export enum KnownStorageType { + // (undocumented) + StorageAccount = "StorageAccount" +} + // @public export enum KnownSupportedRuntimePlatform { // (undocumented) @@ -2205,6 +2312,12 @@ export enum KnownTrafficDirection { Outbound = "Outbound" } +// @public +export enum KnownType { + // (undocumented) + AzureFileVolume = "AzureFileVolume" +} + // @public export type KPackBuildStageProvisioningState = string; @@ -2242,6 +2355,13 @@ export interface ManagedIdentityProperties { // @public export type ManagedIdentityType = string; +// @public +export interface MarketplaceResource { + plan?: string; + product?: string; + publisher?: string; +} + // @public export interface MetricDimension { displayName?: string; @@ -2340,6 +2460,7 @@ export type NetCoreZipUploadedUserSourceInfo = UploadedUserSourceInfo & { export interface NetworkProfile { appNetworkResourceGroup?: string; appSubnetId?: string; + ingressConfig?: IngressConfig; readonly outboundIPs?: NetworkProfileOutboundIPs; readonly requiredTraffics?: RequiredTraffic[]; serviceCidr?: string; @@ -2404,6 +2525,28 @@ export interface PersistentDisk { // @public export type PowerState = string; +// @public +export interface Probe { + disableProbe: boolean; + failureThreshold?: number; + initialDelaySeconds?: number; + periodSeconds?: number; + probeAction?: ProbeActionUnion; + successThreshold?: number; + timeoutSeconds?: number; +} + +// @public +export interface ProbeAction { + type: "HTTPGetAction" | "ExecAction" | "TCPSocketAction"; +} + +// @public +export type ProbeActionType = string; + +// @public (undocumented) +export type ProbeActionUnion = ProbeAction | HttpGetAction | ExecAction | TCPSocketAction; + // @public export type ProvisioningState = string; @@ -2735,6 +2878,11 @@ export interface ServicesUpdateOptionalParams extends coreClient.OperationOption // @public export type ServicesUpdateResponse = ServiceResource; +// @public +export interface ServiceVNetAddons { + logStreamPublicEndpoint?: boolean; +} + // @public export interface Sku { capacity?: number; @@ -2865,6 +3013,9 @@ export interface StoragesListOptionalParams extends coreClient.OperationOptions // @public export type StoragesListResponse = StorageResourceCollection; +// @public +export type StorageType = string; + // @public export type SupportedBuildpackResource = ProxyResource & { properties?: SupportedBuildpackResourceProperties; @@ -2921,6 +3072,11 @@ export interface SystemData { lastModifiedByType?: LastModifiedByType; } +// @public +export type TCPSocketAction = ProbeAction & { + type: "TCPSocketAction"; +}; + // @public export interface TemporaryDisk { mountPath?: string; @@ -2955,6 +3111,9 @@ export interface TriggeredBuildResult { id?: string; } +// @public +export type Type = string; + // @public export type UploadedUserSourceInfo = UserSourceInfo & { type: "UploadedUserSourceInfo" | "Jar" | "Source" | "NetCoreZip"; diff --git a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts index a8a86c2c5be9..a95664f5c856 100644 --- a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts +++ b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts @@ -7,6 +7,12 @@ */ 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 { ServicesImpl, @@ -112,12 +118,35 @@ export class AppPlatformManagementClient extends coreClient.ServiceClient { options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); + + if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const 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 + } + }) + ); + } + } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-03-01-preview"; + this.apiVersion = options.apiVersion || "2022-05-01-preview"; this.services = new ServicesImpl(this); this.configServers = new ConfigServersImpl(this); this.configurationServices = new ConfigurationServicesImpl(this); @@ -141,6 +170,35 @@ export class AppPlatformManagementClient extends coreClient.ServiceClient { this.gatewayCustomDomains = new GatewayCustomDomainsImpl(this); this.apiPortals = new ApiPortalsImpl(this); this.apiPortalCustomDomains = new ApiPortalCustomDomainsImpl(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 item.replace(/(?<==).*$/, apiVersion); + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } services: Services; diff --git a/sdk/appplatform/arm-appplatform/src/models/index.ts b/sdk/appplatform/arm-appplatform/src/models/index.ts index 448f414ea767..4a8fe322cc28 100644 --- a/sdk/appplatform/arm-appplatform/src/models/index.ts +++ b/sdk/appplatform/arm-appplatform/src/models/index.ts @@ -21,6 +21,11 @@ export type UserSourceInfoUnion = | UploadedUserSourceInfoUnion | BuildResultUserSourceInfo | CustomContainerUserSourceInfo; +export type ProbeActionUnion = + | ProbeAction + | HttpGetAction + | ExecAction + | TCPSocketAction; export type UploadedUserSourceInfoUnion = | UploadedUserSourceInfo | JarUploadedUserSourceInfo @@ -36,6 +41,8 @@ export interface ClusterResourceProperties { readonly provisioningState?: ProvisioningState; /** Network profile of the Service */ networkProfile?: NetworkProfile; + /** Additional Service settings in vnet injection instance */ + vnetAddons?: ServiceVNetAddons; /** * Version of the Service * NOTE: This property will not be serialized. It can only be populated by the server. @@ -57,33 +64,37 @@ export interface ClusterResourceProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly fqdn?: string; + /** Purchasing 3rd party product of the Service resource. */ + marketplaceResource?: MarketplaceResource; } /** Service network profile payload */ export interface NetworkProfile { - /** Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime */ + /** Fully qualified resource Id of the subnet to host Azure Spring Apps Service Runtime */ serviceRuntimeSubnetId?: string; - /** Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps */ + /** Fully qualified resource Id of the subnet to host customer apps in Azure Spring Apps */ appSubnetId?: string; - /** Azure Spring Cloud service reserved CIDR */ + /** Azure Spring Apps service reserved CIDR */ serviceCidr?: string; - /** Name of the resource group containing network resources of Azure Spring Cloud Service Runtime */ + /** Name of the resource group containing network resources of Azure Spring Apps Service Runtime */ serviceRuntimeNetworkResourceGroup?: string; - /** Name of the resource group containing network resources of Azure Spring Cloud Apps */ + /** Name of the resource group containing network resources for customer apps in Azure Spring Apps */ appNetworkResourceGroup?: string; /** - * Desired outbound IP resources for Azure Spring Cloud instance. + * Desired outbound IP resources for Azure Spring Apps resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly outboundIPs?: NetworkProfileOutboundIPs; /** - * Required inbound or outbound traffics for Azure Spring Cloud instance. + * Required inbound or outbound traffics for Azure Spring Apps resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly requiredTraffics?: RequiredTraffic[]; + /** Ingress configuration payload for Azure Spring Apps resource. */ + ingressConfig?: IngressConfig; } -/** Desired outbound IP resources for Azure Spring Cloud instance. */ +/** Desired outbound IP resources for Azure Spring Apps resource. */ export interface NetworkProfileOutboundIPs { /** * A list of public IP addresses. @@ -92,7 +103,7 @@ export interface NetworkProfileOutboundIPs { readonly publicIPs?: string[]; } -/** Required inbound or outbound traffic for Azure Spring Cloud instance. */ +/** Required inbound or outbound traffic for Azure Spring Apps resource. */ export interface RequiredTraffic { /** * The protocol of required traffic @@ -121,7 +132,29 @@ export interface RequiredTraffic { readonly direction?: TrafficDirection; } -/** Sku of Azure Spring Cloud */ +/** Ingress configuration payload for Azure Spring Apps resource. */ +export interface IngressConfig { + /** Ingress read time out in seconds. */ + readTimeoutInSeconds?: number; +} + +/** Additional Service settings in vnet injection instance */ +export interface ServiceVNetAddons { + /** Indicates whether the log stream in vnet injection instance could be accessed from internet. */ + logStreamPublicEndpoint?: boolean; +} + +/** Purchasing 3rd Party product for one Azure Spring Apps instance */ +export interface MarketplaceResource { + /** The plan id of the 3rd Party Artifact that is being procured. */ + plan?: string; + /** The publisher id of the 3rd Party Artifact that is being bought. */ + publisher?: string; + /** The 3rd Party artifact that is being procured. */ + product?: string; +} + +/** Sku of Azure Spring Apps */ export interface Sku { /** Name of the Sku */ name?: string; @@ -561,6 +594,8 @@ export interface BuildProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly triggeredBuildResult?: TriggeredBuildResult; + /** The customized build resource for this build */ + resourceRequests?: BuildResourceRequests; } /** The build result triggered by a build */ @@ -569,6 +604,20 @@ export interface TriggeredBuildResult { id?: string; } +/** Resource request payload of Build Resource. */ +export interface BuildResourceRequests { + /** + * Optional Cpu allocated to the build resource. 1 core can be represented by 1 or 1000m. + * The default value is 1, this should not exceed build service agent pool cpu size. + */ + cpu?: string; + /** + * Optional Memory allocated to the build resource. 1 GB can be represented by 1Gi or 1024Mi. + * The default value is 2Gi, this should not exceed build service agent pool memory size. + */ + memory?: string; +} + /** Properties of a buildpack binding */ export interface BuildpackBindingProperties { /** Buildpack Binding Type */ @@ -838,6 +887,8 @@ export interface AppResourceProperties { enableEndToEndTLS?: boolean; /** Collection of loaded certificates */ loadedCertificates?: LoadedCertificate[]; + /** Additional App settings in vnet injection instance */ + vnetAddons?: AppVNetAddons; } /** Temporary disk payload */ @@ -865,7 +916,7 @@ export interface PersistentDisk { export interface CustomPersistentDiskResource { /** Properties of the custom persistent disk resource payload. */ customPersistentDiskProperties?: CustomPersistentDiskPropertiesUnion; - /** The resource id of Azure Spring Cloud Storage resource. */ + /** The resource id of Azure Spring Apps Storage resource. */ storageId: string; } @@ -889,6 +940,17 @@ export interface LoadedCertificate { loadTrustStore?: boolean; } +/** Additional App settings in vnet injection instance */ +export interface AppVNetAddons { + /** Indicates whether the App in vnet injection instance exposes endpoint which could be accessed from internet. */ + publicEndpoint?: boolean; + /** + * URL of the App in vnet injection instance which could be accessed from internet + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly publicEndpointUrl?: string; +} + /** Managed identity properties retrieved from ARM request headers. */ export interface ManagedIdentityProperties { /** Type of the managed identity */ @@ -1033,6 +1095,11 @@ export interface CertificateProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly dnsNames?: string[]; + /** + * Provisioning state of the Certificate + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CertificateResourceProvisioningState; } /** Collection compose of certificate resources list and a possible link for next page. */ @@ -1072,6 +1139,11 @@ export interface CustomDomainProperties { readonly appName?: string; /** The bound certificate name of domain. */ certName?: string; + /** + * Provisioning state of the Domain + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CustomDomainResourceProvisioningState; } /** Collection compose of a custom domain resources list and a possible link for next page. */ @@ -1145,6 +1217,14 @@ export interface DeploymentSettings { addonConfigs?: { [propertyName: string]: { [propertyName: string]: Record }; }; + /** Periodic probe of App Instance liveness. App Instance will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ + livenessProbe?: Probe; + /** Periodic probe of App Instance service readiness. App Instance will be removed from service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ + readinessProbe?: Probe; + /** StartupProbe indicates that the App Instance has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a App Instance's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ + startupProbe?: Probe; + /** Optional duration in seconds the App Instance needs to terminate gracefully. May be decreased in delete request. 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. The grace period is the duration in seconds after the processes running in the App Instance 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. Defaults to 90 seconds. */ + terminationGracePeriodSeconds?: number; /** Container liveness and readiness probe settings */ containerProbeSettings?: ContainerProbeSettings; } @@ -1157,6 +1237,30 @@ export interface ResourceRequests { memory?: string; } +/** Probe describes a health check to be performed against an App Instance to determine whether it is alive or ready to receive traffic. */ +export interface Probe { + /** The action of the probe. */ + probeAction?: ProbeActionUnion; + /** Indicate whether the probe is disabled. */ + disableProbe: boolean; + /** Number of seconds after the App Instance has started before probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ + initialDelaySeconds?: number; + /** How often (in seconds) to perform the probe. Minimum value is 1. */ + periodSeconds?: number; + /** Number of seconds after which the probe times out. Minimum value is 1. */ + timeoutSeconds?: number; + /** Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1. */ + failureThreshold?: number; + /** Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 for liveness and startup. Minimum value is 1. */ + successThreshold?: number; +} + +/** The action of the probe. */ +export interface ProbeAction { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "HTTPGetAction" | "ExecAction" | "TCPSocketAction"; +} + /** Container liveness and readiness probe settings */ export interface ContainerProbeSettings { /** Indicates whether disable the liveness and readiness probe */ @@ -1355,7 +1459,7 @@ export interface SupportedRuntimeVersion { version?: string; } -/** Object that includes an array of Azure Spring Cloud SKU and a possible link for next set */ +/** Object that includes an array of Azure Spring Apps SKU and a possible link for next set */ export interface ResourceSkuCollection { /** Collection of resource SKU */ value?: ResourceSku[]; @@ -1366,7 +1470,7 @@ export interface ResourceSkuCollection { nextLink?: string; } -/** Describes an available Azure Spring Cloud SKU. */ +/** Describes an available Azure Spring Apps SKU. */ export interface ResourceSku { /** Gets the type of resource the SKU applies to. */ resourceType?: string; @@ -1604,12 +1708,20 @@ export interface GatewayRouteConfigProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: GatewayProvisioningState; - /** The resource Id of the Azure Spring Cloud app, required unless route defines `uri`. */ + /** The resource Id of the Azure Spring Apps app, required unless route defines `uri`. */ appResourceId?: string; + /** OpenAPI properties of Spring Cloud Gateway route config. */ + openApi?: GatewayRouteConfigOpenApiProperties; /** Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`. */ routes?: GatewayApiRoute[]; } +/** OpenAPI properties of Spring Cloud Gateway route config. */ +export interface GatewayRouteConfigOpenApiProperties { + /** The URI of OpenAPI specification. */ + uri?: string; +} + /** API route config of the Spring Cloud Gateway */ export interface GatewayApiRoute { /** A title, will be applied to methods in the generated OpenAPI documentation. */ @@ -1849,6 +1961,36 @@ export type CustomContainerUserSourceInfo = UserSourceInfo & { customContainer?: CustomContainer; }; +/** HTTPGetAction describes an action based on HTTP Get requests. */ +export type HttpGetAction = ProbeAction & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "HTTPGetAction"; + /** Path to access on the HTTP server. */ + path?: string; + /** + * Scheme to use for connecting to the host. Defaults to HTTP. + * + * Possible enum values: + * - `"HTTP"` means that the scheme used will be http:// + * - `"HTTPS"` means that the scheme used will be https:// + */ + scheme?: HttpSchemeType; +}; + +/** ExecAction describes a "run in container" action. */ +export type ExecAction = ProbeAction & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "ExecAction"; + /** Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. */ + command?: string[]; +}; + +/** TCPSocketAction describes an action based on opening a socket */ +export type TCPSocketAction = ProbeAction & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "TCPSocketAction"; +}; + /** Service resource */ export type ServiceResource = TrackedResource & { /** Properties of the Service resource */ @@ -2422,6 +2564,20 @@ export enum KnownAppResourceProvisioningState { */ export type AppResourceProvisioningState = string; +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + AzureFileVolume = "AzureFileVolume" +} + +/** + * Defines values for Type. \ + * {@link KnownType} can be used interchangeably with Type, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureFileVolume** + */ +export type Type = string; + /** Known values of {@link ManagedIdentityType} that the service accepts. */ export enum KnownManagedIdentityType { None = "None", @@ -2442,6 +2598,82 @@ export enum KnownManagedIdentityType { */ export type ManagedIdentityType = string; +/** Known values of {@link StorageType} that the service accepts. */ +export enum KnownStorageType { + StorageAccount = "StorageAccount" +} + +/** + * Defines values for StorageType. \ + * {@link KnownStorageType} can be used interchangeably with StorageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **StorageAccount** + */ +export type StorageType = string; + +/** Known values of {@link CertificateResourceProvisioningState} that the service accepts. */ +export enum KnownCertificateResourceProvisioningState { + Creating = "Creating", + Updating = "Updating", + Succeeded = "Succeeded", + Failed = "Failed", + Deleting = "Deleting" +} + +/** + * Defines values for CertificateResourceProvisioningState. \ + * {@link KnownCertificateResourceProvisioningState} can be used interchangeably with CertificateResourceProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Succeeded** \ + * **Failed** \ + * **Deleting** + */ +export type CertificateResourceProvisioningState = string; + +/** Known values of {@link CustomDomainResourceProvisioningState} that the service accepts. */ +export enum KnownCustomDomainResourceProvisioningState { + Creating = "Creating", + Updating = "Updating", + Succeeded = "Succeeded", + Failed = "Failed", + Deleting = "Deleting" +} + +/** + * Defines values for CustomDomainResourceProvisioningState. \ + * {@link KnownCustomDomainResourceProvisioningState} can be used interchangeably with CustomDomainResourceProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Succeeded** \ + * **Failed** \ + * **Deleting** + */ +export type CustomDomainResourceProvisioningState = string; + +/** Known values of {@link ProbeActionType} that the service accepts. */ +export enum KnownProbeActionType { + HttpGetAction = "HTTPGetAction", + TCPSocketAction = "TCPSocketAction", + ExecAction = "ExecAction" +} + +/** + * Defines values for ProbeActionType. \ + * {@link KnownProbeActionType} can be used interchangeably with ProbeActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HTTPGetAction** \ + * **TCPSocketAction** \ + * **ExecAction** + */ +export type ProbeActionType = string; + /** Known values of {@link DeploymentResourceProvisioningState} that the service accepts. */ export enum KnownDeploymentResourceProvisioningState { Creating = "Creating", @@ -2622,6 +2854,22 @@ export enum KnownApiPortalProvisioningState { */ export type ApiPortalProvisioningState = string; +/** Known values of {@link HttpSchemeType} that the service accepts. */ +export enum KnownHttpSchemeType { + Http = "HTTP", + Https = "HTTPS" +} + +/** + * Defines values for HttpSchemeType. \ + * {@link KnownHttpSchemeType} can be used interchangeably with HttpSchemeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **HTTP** \ + * **HTTPS** + */ +export type HttpSchemeType = string; + /** Optional parameters. */ export interface ServicesGetOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/appplatform/arm-appplatform/src/models/mappers.ts b/sdk/appplatform/arm-appplatform/src/models/mappers.ts index 9d094157b76d..5f9a59279a8a 100644 --- a/sdk/appplatform/arm-appplatform/src/models/mappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/mappers.ts @@ -27,6 +27,13 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { className: "NetworkProfile" } }, + vnetAddons: { + serializedName: "vnetAddons", + type: { + name: "Composite", + className: "ServiceVNetAddons" + } + }, version: { serializedName: "version", readOnly: true, @@ -61,6 +68,13 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + marketplaceResource: { + serializedName: "marketplaceResource", + type: { + name: "Composite", + className: "MarketplaceResource" + } } } } @@ -120,6 +134,13 @@ export const NetworkProfile: coreClient.CompositeMapper = { } } } + }, + ingressConfig: { + serializedName: "ingressConfig", + type: { + name: "Composite", + className: "IngressConfig" + } } } } @@ -200,6 +221,64 @@ export const RequiredTraffic: coreClient.CompositeMapper = { } }; +export const IngressConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IngressConfig", + modelProperties: { + readTimeoutInSeconds: { + serializedName: "readTimeoutInSeconds", + type: { + name: "Number" + } + } + } + } +}; + +export const ServiceVNetAddons: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceVNetAddons", + modelProperties: { + logStreamPublicEndpoint: { + defaultValue: false, + serializedName: "logStreamPublicEndpoint", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MarketplaceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarketplaceResource", + modelProperties: { + plan: { + serializedName: "plan", + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + }, + product: { + serializedName: "product", + type: { + name: "String" + } + } + } + } +}; + export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1298,6 +1377,13 @@ export const BuildProperties: coreClient.CompositeMapper = { name: "Composite", className: "TriggeredBuildResult" } + }, + resourceRequests: { + serializedName: "resourceRequests", + type: { + name: "Composite", + className: "BuildResourceRequests" + } } } } @@ -1318,6 +1404,29 @@ export const TriggeredBuildResult: coreClient.CompositeMapper = { } }; +export const BuildResourceRequests: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildResourceRequests", + modelProperties: { + cpu: { + defaultValue: "1", + serializedName: "cpu", + type: { + name: "String" + } + }, + memory: { + defaultValue: "2Gi", + serializedName: "memory", + type: { + name: "String" + } + } + } + } +}; + export const BuildpackBindingProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1982,6 +2091,13 @@ export const AppResourceProperties: coreClient.CompositeMapper = { } } } + }, + vnetAddons: { + serializedName: "vnetAddons", + type: { + name: "Composite", + className: "AppVNetAddons" + } } } } @@ -2083,9 +2199,8 @@ export const CustomPersistentDiskProperties: coreClient.CompositeMapper = { }, modelProperties: { type: { - defaultValue: "AzureFileVolume", - isConstant: true, serializedName: "type", + required: true, type: { name: "String" } @@ -2141,6 +2256,29 @@ export const LoadedCertificate: coreClient.CompositeMapper = { } }; +export const AppVNetAddons: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppVNetAddons", + modelProperties: { + publicEndpoint: { + defaultValue: false, + serializedName: "publicEndpoint", + type: { + name: "Boolean" + } + }, + publicEndpointUrl: { + serializedName: "publicEndpointUrl", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ManagedIdentityProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2353,9 +2491,8 @@ export const StorageProperties: coreClient.CompositeMapper = { }, modelProperties: { storageType: { - defaultValue: "StorageAccount", - isConstant: true, serializedName: "storageType", + required: true, type: { name: "String" } @@ -2461,6 +2598,13 @@ export const CertificateProperties: coreClient.CompositeMapper = { } } } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } } } } @@ -2566,6 +2710,13 @@ export const CustomDomainProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } } } } @@ -2751,6 +2902,34 @@ export const DeploymentSettings: coreClient.CompositeMapper = { } } }, + livenessProbe: { + serializedName: "livenessProbe", + type: { + name: "Composite", + className: "Probe" + } + }, + readinessProbe: { + serializedName: "readinessProbe", + type: { + name: "Composite", + className: "Probe" + } + }, + startupProbe: { + serializedName: "startupProbe", + type: { + name: "Composite", + className: "Probe" + } + }, + terminationGracePeriodSeconds: { + defaultValue: 90, + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, containerProbeSettings: { serializedName: "containerProbeSettings", type: { @@ -2783,6 +2962,81 @@ export const ResourceRequests: coreClient.CompositeMapper = { } }; +export const Probe: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Probe", + modelProperties: { + probeAction: { + serializedName: "probeAction", + type: { + name: "Composite", + className: "ProbeAction" + } + }, + disableProbe: { + defaultValue: false, + serializedName: "disableProbe", + required: true, + type: { + name: "Boolean" + } + }, + initialDelaySeconds: { + serializedName: "initialDelaySeconds", + type: { + name: "Number" + } + }, + periodSeconds: { + serializedName: "periodSeconds", + type: { + name: "Number" + } + }, + timeoutSeconds: { + serializedName: "timeoutSeconds", + type: { + name: "Number" + } + }, + failureThreshold: { + serializedName: "failureThreshold", + type: { + name: "Number" + } + }, + successThreshold: { + serializedName: "successThreshold", + type: { + name: "Number" + } + } + } + } +}; + +export const ProbeAction: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProbeAction", + uberParent: "ProbeAction", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const ContainerProbeSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3601,6 +3855,7 @@ export const GatewayProperties: coreClient.CompositeMapper = { } }, public: { + defaultValue: false, serializedName: "public", type: { name: "Boolean" @@ -3614,6 +3869,7 @@ export const GatewayProperties: coreClient.CompositeMapper = { } }, httpsOnly: { + defaultValue: false, serializedName: "httpsOnly", type: { name: "Boolean" @@ -3961,6 +4217,13 @@ export const GatewayRouteConfigProperties: coreClient.CompositeMapper = { name: "String" } }, + openApi: { + serializedName: "openApi", + type: { + name: "Composite", + className: "GatewayRouteConfigOpenApiProperties" + } + }, routes: { serializedName: "routes", type: { @@ -3977,6 +4240,21 @@ export const GatewayRouteConfigProperties: coreClient.CompositeMapper = { } }; +export const GatewayRouteConfigOpenApiProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayRouteConfigOpenApiProperties", + modelProperties: { + uri: { + serializedName: "uri", + type: { + name: "String" + } + } + } + } +}; + export const GatewayApiRoute: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4137,6 +4415,7 @@ export const ApiPortalProperties: coreClient.CompositeMapper = { } }, public: { + defaultValue: false, serializedName: "public", type: { name: "Boolean" @@ -4150,6 +4429,7 @@ export const ApiPortalProperties: coreClient.CompositeMapper = { } }, httpsOnly: { + defaultValue: false, serializedName: "httpsOnly", type: { name: "Boolean" @@ -4603,6 +4883,68 @@ export const CustomContainerUserSourceInfo: coreClient.CompositeMapper = { } }; +export const HttpGetAction: coreClient.CompositeMapper = { + serializedName: "HTTPGetAction", + type: { + name: "Composite", + className: "HttpGetAction", + uberParent: "ProbeAction", + polymorphicDiscriminator: ProbeAction.type.polymorphicDiscriminator, + modelProperties: { + ...ProbeAction.type.modelProperties, + path: { + serializedName: "path", + type: { + name: "String" + } + }, + scheme: { + serializedName: "scheme", + type: { + name: "String" + } + } + } + } +}; + +export const ExecAction: coreClient.CompositeMapper = { + serializedName: "ExecAction", + type: { + name: "Composite", + className: "ExecAction", + uberParent: "ProbeAction", + polymorphicDiscriminator: ProbeAction.type.polymorphicDiscriminator, + modelProperties: { + ...ProbeAction.type.modelProperties, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TCPSocketAction: coreClient.CompositeMapper = { + serializedName: "TCPSocketAction", + type: { + name: "Composite", + className: "TCPSocketAction", + uberParent: "ProbeAction", + polymorphicDiscriminator: ProbeAction.type.polymorphicDiscriminator, + modelProperties: { + ...ProbeAction.type.modelProperties + } + } +}; + export const ServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5132,6 +5474,7 @@ export let discriminators = { StorageProperties: StorageProperties, CertificateProperties: CertificateProperties, UserSourceInfo: UserSourceInfo, + ProbeAction: ProbeAction, "CustomPersistentDiskProperties.AzureFileVolume": AzureFileVolume, "StorageProperties.StorageAccount": StorageAccount, "CertificateProperties.KeyVaultCertificate": KeyVaultCertificateProperties, @@ -5139,6 +5482,9 @@ export let discriminators = { "UserSourceInfo.UploadedUserSourceInfo": UploadedUserSourceInfo, "UserSourceInfo.BuildResult": BuildResultUserSourceInfo, "UserSourceInfo.Container": CustomContainerUserSourceInfo, + "ProbeAction.HTTPGetAction": HttpGetAction, + "ProbeAction.ExecAction": ExecAction, + "ProbeAction.TCPSocketAction": TCPSocketAction, "UserSourceInfo.Jar": JarUploadedUserSourceInfo, "UserSourceInfo.Source": SourceUploadedUserSourceInfo, "UserSourceInfo.NetCoreZip": NetCoreZipUploadedUserSourceInfo diff --git a/sdk/appplatform/arm-appplatform/src/models/parameters.ts b/sdk/appplatform/arm-appplatform/src/models/parameters.ts index 3aa840e05696..d25e3be413ba 100644 --- a/sdk/appplatform/arm-appplatform/src/models/parameters.ts +++ b/sdk/appplatform/arm-appplatform/src/models/parameters.ts @@ -67,7 +67,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-03-01-preview", + defaultValue: "2022-05-01-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/appplatform/arm-appplatform/src/operations/storages.ts b/sdk/appplatform/arm-appplatform/src/operations/storages.ts index d2bcac9057a5..693319f7c105 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/storages.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/storages.ts @@ -41,7 +41,7 @@ export class StoragesImpl implements Storages { } /** - * List all the storages of one Azure Spring Cloud instance. + * List all the storages of one Azure Spring Apps resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. @@ -311,7 +311,7 @@ export class StoragesImpl implements Storages { } /** - * List all the storages of one Azure Spring Cloud instance. + * List all the storages of one Azure Spring Apps resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts index 281e6bc25129..0eeb8fa2ba06 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts @@ -22,7 +22,7 @@ import { /** Interface representing a Storages. */ export interface Storages { /** - * List all the storages of one Azure Spring Cloud instance. + * List all the storages of one Azure Spring Apps resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. diff --git a/sdk/appplatform/arm-appplatform/test/sampleTest.ts b/sdk/appplatform/arm-appplatform/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/appplatform/arm-appplatform/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/appplatform/arm-appplatform/tsconfig.json b/sdk/appplatform/arm-appplatform/tsconfig.json index 04fa881dd845..3e6ae96443f3 100644 --- a/sdk/appplatform/arm-appplatform/tsconfig.json +++ b/sdk/appplatform/arm-appplatform/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appplatform": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"