From 0f73a694d2b5a413a809cb1adbe48e0e37e26063 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Mar 2023 03:20:12 +0000 Subject: [PATCH] CodeGen from PR 23213 in Azure/azure-rest-api-specs Merge db181ec7d383d67100e1e3ad98e0a205a13da347 into 9c9786a53eb85f49b77f274fb5baf666ef9f6a30 --- common/config/rush/pnpm-lock.yaml | 5 +- sdk/appplatform/arm-appplatform/CHANGELOG.md | 91 ++- sdk/appplatform/arm-appplatform/_meta.json | 8 +- sdk/appplatform/arm-appplatform/package.json | 20 +- .../review/arm-appplatform.api.md | 395 ++++++++--- .../src/appPlatformManagementClient.ts | 8 +- .../arm-appplatform/src/lroImpl.ts | 54 +- .../arm-appplatform/src/models/index.ts | 357 +++++++++- .../arm-appplatform/src/models/mappers.ts | 611 ++++++++++++++++-- .../arm-appplatform/src/models/parameters.ts | 40 +- .../src/operations/apiPortalCustomDomains.ts | 55 +- .../src/operations/apiPortals.ts | 49 +- .../src/operations/applicationAccelerators.ts | 54 +- .../src/operations/applicationLiveViews.ts | 54 +- .../arm-appplatform/src/operations/apps.ts | 93 +-- .../src/operations/bindings.ts | 72 ++- .../src/operations/buildServiceAgentPool.ts | 31 +- .../src/operations/buildServiceBuilder.ts | 49 +- .../src/operations/buildServiceOperations.ts | 278 ++++++++ .../src/operations/buildpackBinding.ts | 219 ++++++- .../src/operations/certificates.ts | 49 +- .../src/operations/configServers.ts | 79 ++- .../src/operations/configurationServices.ts | 79 ++- .../src/operations/containerRegistries.ts | 393 +++++++++++ .../src/operations/customDomains.ts | 72 ++- .../src/operations/customizedAccelerators.ts | 49 +- .../src/operations/deployments.ts | 262 +++++--- .../src/operations/devToolPortals.ts | 49 +- .../src/operations/gatewayCustomDomains.ts | 55 +- .../src/operations/gatewayRouteConfigs.ts | 55 +- .../src/operations/gateways.ts | 316 ++++++++- .../arm-appplatform/src/operations/index.ts | 1 + .../src/operations/monitoringSettings.ts | 64 +- .../src/operations/predefinedAccelerators.ts | 44 +- .../src/operations/serviceRegistries.ts | 49 +- .../src/operations/services.ts | 108 ++-- .../src/operations/storages.ts | 55 +- .../apiPortalCustomDomains.ts | 8 +- .../src/operationsInterfaces/apiPortals.ts | 8 +- .../applicationAccelerators.ts | 8 +- .../applicationLiveViews.ts | 8 +- .../src/operationsInterfaces/apps.ts | 14 +- .../src/operationsInterfaces/bindings.ts | 12 +- .../buildServiceAgentPool.ts | 6 +- .../buildServiceBuilder.ts | 8 +- .../buildServiceOperations.ts | 73 +++ .../operationsInterfaces/buildpackBinding.ts | 21 +- .../src/operationsInterfaces/certificates.ts | 8 +- .../src/operationsInterfaces/configServers.ts | 14 +- .../configurationServices.ts | 12 +- .../containerRegistries.ts | 86 +++ .../src/operationsInterfaces/customDomains.ts | 12 +- .../customizedAccelerators.ts | 8 +- .../src/operationsInterfaces/deployments.ts | 32 +- .../operationsInterfaces/devToolPortals.ts | 8 +- .../gatewayCustomDomains.ts | 8 +- .../gatewayRouteConfigs.ts | 8 +- .../src/operationsInterfaces/gateways.ts | 77 ++- .../src/operationsInterfaces/index.ts | 1 + .../monitoringSettings.ts | 10 +- .../predefinedAccelerators.ts | 6 +- .../operationsInterfaces/serviceRegistries.ts | 8 +- .../src/operationsInterfaces/services.ts | 16 +- .../src/operationsInterfaces/storages.ts | 8 +- .../arm-appplatform/test/sampleTest.ts | 43 ++ sdk/appplatform/arm-appplatform/tsconfig.json | 10 +- 66 files changed, 3862 insertions(+), 1001 deletions(-) create mode 100644 sdk/appplatform/arm-appplatform/src/operations/containerRegistries.ts create mode 100644 sdk/appplatform/arm-appplatform/src/operationsInterfaces/containerRegistries.ts create mode 100644 sdk/appplatform/arm-appplatform/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 476af22d75ed..b854df4be2df 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -731,6 +731,7 @@ packages: /@azure/ai-form-recognizer/3.1.0-beta.3: resolution: {integrity: sha512-+4QtFKNyxAmdqpcYjuAtmWKm/MuOe9kZsbpS9jA9h0YHzngNj5gc67AA4egV9BXOq9x+1phjYTNC/rxiOUr1uQ==} engines: {node: '>=8.0.0'} + deprecated: Please migrate to a supported (non-beta) version of this package dependencies: '@azure/core-auth': 1.4.0 '@azure/core-http': 1.2.6 @@ -10102,7 +10103,7 @@ packages: dev: false file:projects/arm-appplatform.tgz: - resolution: {integrity: sha512-Q3qzSnJmZf+x2pJgMVVgxy3oOWB848Bo+OZKDwA67+bgVcd2wcDExo+gC2V3ceZmcME9I11rJM2WTHV8hbxO7Q==, tarball: file:projects/arm-appplatform.tgz} + resolution: {integrity: sha512-oZNHbU6mvGe9NLoBOTDu7XYC2ob40q3V03IxpYGBD6/dbdXH8Zx+CxhzIitNnfsZux6M/pVkTp714XSjzDbgiA==, tarball: file:projects/arm-appplatform.tgz} name: '@rush-temp/arm-appplatform' version: 0.0.0 dependencies: @@ -10117,7 +10118,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 diff --git a/sdk/appplatform/arm-appplatform/CHANGELOG.md b/sdk/appplatform/arm-appplatform/CHANGELOG.md index 3d14145be6f7..1f5f49a9d45d 100644 --- a/sdk/appplatform/arm-appplatform/CHANGELOG.md +++ b/sdk/appplatform/arm-appplatform/CHANGELOG.md @@ -1,16 +1,6 @@ # Release History - -## 2.1.0-beta.6 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.1.0-beta.5 (2023-01-13) + +## 3.0.0-beta.1 (2023-03-22) **Features** @@ -18,6 +8,7 @@ - Added operation group ApiPortals - Added operation group ApplicationAccelerators - Added operation group ApplicationLiveViews + - Added operation group ContainerRegistries - Added operation group CustomizedAccelerators - Added operation group DevToolPortals - Added operation group GatewayCustomDomains @@ -25,7 +16,12 @@ - Added operation group Gateways - Added operation group PredefinedAccelerators - Added operation group Storages + - Added operation BuildpackBinding.listForCluster - Added operation BuildServiceBuilder.listDeployments + - Added operation BuildServiceOperations.beginCreateOrUpdate + - Added operation BuildServiceOperations.beginCreateOrUpdateAndWait + - Added operation BuildServiceOperations.beginDeleteBuild + - Added operation BuildServiceOperations.beginDeleteBuildAndWait - Added operation Deployments.beginDisableRemoteDebugging - Added operation Deployments.beginDisableRemoteDebuggingAndWait - Added operation Deployments.beginEnableRemoteDebugging @@ -87,6 +83,8 @@ - Added Interface BindingResource - Added Interface Build - Added Interface BuilderResource + - Added Interface BuildpackBindingListForClusterNextOptionalParams + - Added Interface BuildpackBindingListForClusterOptionalParams - Added Interface BuildpackBindingResource - Added Interface BuildResourceRequests - Added Interface BuildResult @@ -94,10 +92,22 @@ - Added Interface BuildService - Added Interface BuildServiceAgentPoolResource - Added Interface BuildServiceBuilderListDeploymentsOptionalParams + - Added Interface BuildServiceCreateOrUpdateOptionalParams + - Added Interface BuildServiceDeleteBuildHeaders + - Added Interface BuildServiceDeleteBuildOptionalParams - Added Interface CertificateResource - Added Interface ConfigServerResource - Added Interface ConfigurationServiceResource - Added Interface ContainerProbeSettings + - Added Interface ContainerRegistriesCreateOrUpdateOptionalParams + - Added Interface ContainerRegistriesGetOptionalParams + - Added Interface ContainerRegistriesListNextOptionalParams + - Added Interface ContainerRegistriesListOptionalParams + - Added Interface ContainerRegistryBasicCredentials + - Added Interface ContainerRegistryCredentials + - Added Interface ContainerRegistryProperties + - Added Interface ContainerRegistryResource + - Added Interface ContainerRegistryResourceCollection - Added Interface ContentCertificateProperties - Added Interface CustomContainer - Added Interface CustomContainerUserSourceInfo @@ -114,6 +124,7 @@ - Added Interface CustomizedAcceleratorValidateResult - Added Interface CustomPersistentDiskProperties - Added Interface CustomPersistentDiskResource + - Added Interface CustomScaleRule - Added Interface DeploymentList - Added Interface DeploymentResource - Added Interface DeploymentsDisableRemoteDebuggingOptionalParams @@ -148,6 +159,7 @@ - Added Interface GatewayOperatorProperties - Added Interface GatewayOperatorResourceRequests - Added Interface GatewayProperties + - Added Interface GatewayPropertiesClientAuth - Added Interface GatewayPropertiesEnvironmentVariables - Added Interface GatewayResource - Added Interface GatewayResourceCollection @@ -167,8 +179,13 @@ - Added Interface GatewaysListEnvSecretsOptionalParams - Added Interface GatewaysListNextOptionalParams - Added Interface GatewaysListOptionalParams + - Added Interface GatewaysRestartHeaders + - Added Interface GatewaysRestartOptionalParams + - Added Interface GatewaysUpdateCapacityHeaders + - Added Interface GatewaysUpdateCapacityOptionalParams - Added Interface GatewaysValidateDomainOptionalParams - Added Interface HttpGetAction + - Added Interface HttpScaleRule - Added Interface ImageRegistryCredential - Added Interface IngressConfig - Added Interface IngressSettings @@ -189,13 +206,19 @@ - Added Interface Probe - Added Interface ProbeAction - Added Interface ProxyResource + - Added Interface QueueScaleRule - Added Interface RemoteDebugging - Added Interface RemoteDebuggingPayload + - Added Interface Scale + - Added Interface ScaleRule + - Added Interface ScaleRuleAuth + - Added Interface Secret - Added Interface ServiceRegistryResource - Added Interface ServiceResource - Added Interface ServicesStartOptionalParams - Added Interface ServicesStopOptionalParams - Added Interface ServiceVNetAddons + - Added Interface SkuObject - Added Interface SourceUploadedUserSourceInfo - Added Interface SsoProperties - Added Interface StorageAccount @@ -209,6 +232,7 @@ - Added Interface StoragesListOptionalParams - Added Interface SupportedBuildpackResource - Added Interface SupportedStackResource + - Added Interface TcpScaleRule - Added Interface TCPSocketAction - Added Interface TrackedResource - Added Interface UploadedUserSourceInfo @@ -236,8 +260,17 @@ - Added Type Alias ApplicationLiveViewsListNextResponse - Added Type Alias ApplicationLiveViewsListResponse - Added Type Alias BackendProtocol + - Added Type Alias BuildpackBindingListForClusterNextResponse + - Added Type Alias BuildpackBindingListForClusterResponse - Added Type Alias BuildServiceBuilderListDeploymentsResponse + - Added Type Alias BuildServiceCreateOrUpdateResponse - Added Type Alias CertificateResourceProvisioningState + - Added Type Alias ContainerRegistriesCreateOrUpdateResponse + - Added Type Alias ContainerRegistriesGetResponse + - Added Type Alias ContainerRegistriesListNextResponse + - Added Type Alias ContainerRegistriesListResponse + - Added Type Alias ContainerRegistryCredentialsUnion + - Added Type Alias ContainerRegistryProvisioningState - Added Type Alias CustomDomainResourceProvisioningState - Added Type Alias CustomizedAcceleratorProvisioningState - Added Type Alias CustomizedAcceleratorsCreateOrUpdateResponse @@ -256,6 +289,7 @@ - Added Type Alias DevToolPortalsGetResponse - Added Type Alias DevToolPortalsListNextResponse - Added Type Alias DevToolPortalsListResponse + - Added Type Alias GatewayCertificateVerification - Added Type Alias GatewayCustomDomainsCreateOrUpdateResponse - Added Type Alias GatewayCustomDomainsGetResponse - Added Type Alias GatewayCustomDomainsListNextResponse @@ -271,6 +305,7 @@ - Added Type Alias GatewaysListEnvSecretsResponse - Added Type Alias GatewaysListNextResponse - Added Type Alias GatewaysListResponse + - Added Type Alias GatewaysUpdateCapacityResponse - Added Type Alias GatewaysValidateDomainResponse - Added Type Alias HttpSchemeType - Added Type Alias PowerState @@ -291,12 +326,17 @@ - Added Type Alias Type - Interface AppResourceProperties has a new optional parameter customPersistentDisks - Interface AppResourceProperties has a new optional parameter ingressSettings + - Interface AppResourceProperties has a new optional parameter secrets - Interface AppResourceProperties has a new optional parameter vnetAddons - Interface BuildProperties has a new optional parameter resourceRequests - Interface BuildResultProperties has a new optional parameter error + - Interface BuildResultProperties has a new optional parameter image + - Interface BuildServiceProperties has a new optional parameter containerRegistry - Interface BuildStageProperties has a new optional parameter exitCode - Interface BuildStageProperties has a new optional parameter reason - Interface CertificateProperties has a new optional parameter provisioningState + - Interface ClusterResourceProperties has a new optional parameter infraResourceGroup + - Interface ClusterResourceProperties has a new optional parameter managedEnvironmentId - Interface ClusterResourceProperties has a new optional parameter marketplaceResource - Interface ClusterResourceProperties has a new optional parameter powerState - Interface ClusterResourceProperties has a new optional parameter vnetAddons @@ -304,22 +344,26 @@ - Interface DeploymentSettings has a new optional parameter containerProbeSettings - Interface DeploymentSettings has a new optional parameter livenessProbe - Interface DeploymentSettings has a new optional parameter readinessProbe + - Interface DeploymentSettings has a new optional parameter scale - Interface DeploymentSettings has a new optional parameter startupProbe - Interface DeploymentSettings has a new optional parameter terminationGracePeriodSeconds - Interface ManagedIdentityProperties has a new optional parameter userAssignedIdentities - Interface NetworkProfile has a new optional parameter ingressConfig - Interface NetworkProfile has a new optional parameter outboundType + - Type of parameter type of interface UserSourceInfo is changed from "UploadedUserSourceInfo" | "Jar" | "Source" | "NetCoreZip" | "BuildResult" to "UploadedUserSourceInfo" | "Jar" | "Source" | "NetCoreZip" | "BuildResult" | "Container" - Added Enum KnownApiPortalProvisioningState - Added Enum KnownApmType - Added Enum KnownApplicationAcceleratorProvisioningState - Added Enum KnownApplicationLiveViewProvisioningState - Added Enum KnownBackendProtocol - Added Enum KnownCertificateResourceProvisioningState + - Added Enum KnownContainerRegistryProvisioningState - Added Enum KnownCustomDomainResourceProvisioningState - Added Enum KnownCustomizedAcceleratorProvisioningState - Added Enum KnownCustomizedAcceleratorValidateResultState - Added Enum KnownDevToolPortalFeatureState - Added Enum KnownDevToolPortalProvisioningState + - Added Enum KnownGatewayCertificateVerification - Added Enum KnownGatewayProvisioningState - Added Enum KnownGatewayRouteConfigProtocol - Added Enum KnownHttpSchemeType @@ -332,9 +376,30 @@ - Added Enum KnownType - Enum KnownBindingType has a new value CACertificates - Added function getContinuationToken + +**Breaking Changes** + - Interface DeploymentsListForClusterNextOptionalParams no longer has parameter version - Interface DeploymentsListNextOptionalParams no longer has parameter version - - Type of parameter type of interface UserSourceInfo is changed from "UploadedUserSourceInfo" | "Jar" | "Source" | "NetCoreZip" | "BuildResult" to "UploadedUserSourceInfo" | "Jar" | "Source" | "NetCoreZip" | "BuildResult" | "Container" + - Type of parameter addonConfigs of interface AppResourceProperties is changed from { + [propertyName: string]: { + [propertyName: string]: Record; + }; + } to { + [propertyName: string]: Record; + } + - Type of parameter bindingParameters of interface BindingResourceProperties is changed from { + [propertyName: string]: Record; + } to { + [propertyName: string]: string; + } + - Type of parameter addonConfigs of interface DeploymentSettings is changed from { + [propertyName: string]: { + [propertyName: string]: Record; + }; + } to { + [propertyName: string]: Record; + } ## 2.0.0 (2022-05-19) diff --git a/sdk/appplatform/arm-appplatform/_meta.json b/sdk/appplatform/arm-appplatform/_meta.json index 52e13413dba1..79a59a16e1fa 100644 --- a/sdk/appplatform/arm-appplatform/_meta.json +++ b/sdk/appplatform/arm-appplatform/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e7bf3adfa2d5e5cdbb804eec35279501794f461c", + "commit": "73881cbbcff381033ad6d2e576eb117c205e7e46", "readme": "specification/appplatform/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\appplatform\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/appplatform/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.7" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/appplatform/arm-appplatform/package.json b/sdk/appplatform/arm-appplatform/package.json index 14bff2256f0a..e14668909c2b 100644 --- a/sdk/appplatform/arm-appplatform/package.json +++ b/sdk/appplatform/arm-appplatform/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AppPlatformManagementClient.", - "version": "2.1.0-beta.6", + "version": "3.0.0-beta.1", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,7 +33,7 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appplatform/arm-appplatform", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appplatform?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appplatform/arm-appplatform" +} \ 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 b74108eb05e7..e6d4f151e6aa 100644 --- a/sdk/appplatform/arm-appplatform/review/arm-appplatform.api.md +++ b/sdk/appplatform/arm-appplatform/review/arm-appplatform.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface AcceleratorAuthSetting { @@ -21,6 +21,7 @@ export type AcceleratorAuthSettingUnion = AcceleratorAuthSetting | AcceleratorPu // @public export interface AcceleratorBasicAuthSetting extends AcceleratorAuthSetting { authType: "BasicAuth"; + caCertResourceId?: string; password?: string; username: string; } @@ -38,6 +39,7 @@ export interface AcceleratorGitRepository { // @public export interface AcceleratorPublicSetting extends AcceleratorAuthSetting { authType: "Public"; + caCertResourceId?: string; } // @public @@ -74,9 +76,9 @@ export interface ApiPortalCustomDomainResourceCollection { // @public export interface ApiPortalCustomDomains { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, apiPortalCustomDomainResource: ApiPortalCustomDomainResource, options?: ApiPortalCustomDomainsCreateOrUpdateOptionalParams): Promise, ApiPortalCustomDomainsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, apiPortalCustomDomainResource: ApiPortalCustomDomainResource, options?: ApiPortalCustomDomainsCreateOrUpdateOptionalParams): Promise, ApiPortalCustomDomainsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, apiPortalCustomDomainResource: ApiPortalCustomDomainResource, options?: ApiPortalCustomDomainsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, options?: ApiPortalCustomDomainsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, options?: ApiPortalCustomDomainsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, options?: ApiPortalCustomDomainsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, apiPortalName: string, domainName: string, options?: ApiPortalCustomDomainsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, apiPortalName: string, options?: ApiPortalCustomDomainsListOptionalParams): PagedAsyncIterableIterator; @@ -160,9 +162,9 @@ export interface ApiPortalResourceRequests { // @public export interface ApiPortals { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, apiPortalName: string, apiPortalResource: ApiPortalResource, options?: ApiPortalsCreateOrUpdateOptionalParams): Promise, ApiPortalsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, apiPortalName: string, apiPortalResource: ApiPortalResource, options?: ApiPortalsCreateOrUpdateOptionalParams): Promise, ApiPortalsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, apiPortalName: string, apiPortalResource: ApiPortalResource, options?: ApiPortalsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, apiPortalName: string, options?: ApiPortalsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, apiPortalName: string, options?: ApiPortalsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, apiPortalName: string, options?: ApiPortalsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, apiPortalName: string, options?: ApiPortalsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: ApiPortalsListOptionalParams): PagedAsyncIterableIterator; @@ -259,9 +261,9 @@ export interface ApplicationAcceleratorResourceRequests { // @public export interface ApplicationAccelerators { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, applicationAcceleratorResource: ApplicationAcceleratorResource, options?: ApplicationAcceleratorsCreateOrUpdateOptionalParams): Promise, ApplicationAcceleratorsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, applicationAcceleratorResource: ApplicationAcceleratorResource, options?: ApplicationAcceleratorsCreateOrUpdateOptionalParams): Promise, ApplicationAcceleratorsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, applicationAcceleratorResource: ApplicationAcceleratorResource, options?: ApplicationAcceleratorsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, options?: ApplicationAcceleratorsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, options?: ApplicationAcceleratorsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, options?: ApplicationAcceleratorsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, options?: ApplicationAcceleratorsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: ApplicationAcceleratorsListOptionalParams): PagedAsyncIterableIterator; @@ -350,9 +352,9 @@ export interface ApplicationLiveViewResourceRequests { // @public export interface ApplicationLiveViews { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, applicationLiveViewResource: ApplicationLiveViewResource, options?: ApplicationLiveViewsCreateOrUpdateOptionalParams): Promise, ApplicationLiveViewsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, applicationLiveViewResource: ApplicationLiveViewResource, options?: ApplicationLiveViewsCreateOrUpdateOptionalParams): Promise, ApplicationLiveViewsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, applicationLiveViewResource: ApplicationLiveViewResource, options?: ApplicationLiveViewsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, options?: ApplicationLiveViewsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, options?: ApplicationLiveViewsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, options?: ApplicationLiveViewsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, applicationLiveViewName: string, options?: ApplicationLiveViewsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: ApplicationLiveViewsListOptionalParams): PagedAsyncIterableIterator; @@ -428,6 +430,8 @@ export class AppPlatformManagementClient extends coreClient.ServiceClient { // (undocumented) configurationServices: ConfigurationServices; // (undocumented) + containerRegistries: ContainerRegistries; + // (undocumented) customDomains: CustomDomains; // (undocumented) customizedAccelerators: CustomizedAccelerators; @@ -484,9 +488,7 @@ export interface AppResourceCollection { // @public export interface AppResourceProperties { addonConfigs?: { - [propertyName: string]: { - [propertyName: string]: Record; - }; + [propertyName: string]: Record; }; customPersistentDisks?: CustomPersistentDiskResource[]; enableEndToEndTLS?: boolean; @@ -497,6 +499,7 @@ export interface AppResourceProperties { persistentDisk?: PersistentDisk; readonly provisioningState?: AppResourceProvisioningState; public?: boolean; + secrets?: Secret[]; temporaryDisk?: TemporaryDisk; readonly url?: string; vnetAddons?: AppVNetAddons; @@ -507,13 +510,13 @@ export type AppResourceProvisioningState = string; // @public export interface Apps { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, appResource: AppResource, options?: AppsCreateOrUpdateOptionalParams): Promise, AppsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, appResource: AppResource, options?: AppsCreateOrUpdateOptionalParams): Promise, AppsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, appResource: AppResource, options?: AppsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, appName: string, options?: AppsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, appName: string, options?: AppsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, appName: string, options?: AppsDeleteOptionalParams): Promise; - beginSetActiveDeployments(resourceGroupName: string, serviceName: string, appName: string, activeDeploymentCollection: ActiveDeploymentCollection, options?: AppsSetActiveDeploymentsOptionalParams): Promise, AppsSetActiveDeploymentsResponse>>; + beginSetActiveDeployments(resourceGroupName: string, serviceName: string, appName: string, activeDeploymentCollection: ActiveDeploymentCollection, options?: AppsSetActiveDeploymentsOptionalParams): Promise, AppsSetActiveDeploymentsResponse>>; beginSetActiveDeploymentsAndWait(resourceGroupName: string, serviceName: string, appName: string, activeDeploymentCollection: ActiveDeploymentCollection, options?: AppsSetActiveDeploymentsOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, appName: string, appResource: AppResource, options?: AppsUpdateOptionalParams): Promise, AppsUpdateResponse>>; + beginUpdate(resourceGroupName: string, serviceName: string, appName: string, appResource: AppResource, options?: AppsUpdateOptionalParams): Promise, AppsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, appResource: AppResource, options?: AppsUpdateOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, appName: string, options?: AppsGetOptionalParams): Promise; getResourceUploadUrl(resourceGroupName: string, serviceName: string, appName: string, options?: AppsGetResourceUploadUrlOptionalParams): Promise; @@ -609,7 +612,7 @@ export interface AvailableRuntimeVersions { // @public export interface AzureFileVolume extends CustomPersistentDiskProperties { - shareName: string; + shareName?: string; type: "AzureFileVolume"; } @@ -630,7 +633,7 @@ export interface BindingResourceCollection { // @public export interface BindingResourceProperties { bindingParameters?: { - [propertyName: string]: Record; + [propertyName: string]: string; }; readonly createdAt?: string; readonly generatedProperties?: string; @@ -643,11 +646,11 @@ export interface BindingResourceProperties { // @public export interface Bindings { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: BindingResource, options?: BindingsCreateOrUpdateOptionalParams): Promise, BindingsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: BindingResource, options?: BindingsCreateOrUpdateOptionalParams): Promise, BindingsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: BindingResource, options?: BindingsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: BindingsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: BindingsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: BindingsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: BindingResource, options?: BindingsUpdateOptionalParams): Promise, BindingsUpdateResponse>>; + beginUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: BindingResource, options?: BindingsUpdateOptionalParams): Promise, BindingsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: BindingResource, options?: BindingsUpdateOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: BindingsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, appName: string, options?: BindingsListOptionalParams): PagedAsyncIterableIterator; @@ -735,12 +738,13 @@ export interface BuilderResourceCollection { // @public export interface BuildpackBinding { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, buildpackBinding: BuildpackBindingResource, options?: BuildpackBindingCreateOrUpdateOptionalParams): Promise, BuildpackBindingCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, buildpackBinding: BuildpackBindingResource, options?: BuildpackBindingCreateOrUpdateOptionalParams): Promise, BuildpackBindingCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, buildpackBinding: BuildpackBindingResource, options?: BuildpackBindingCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, options?: BuildpackBindingDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, options?: BuildpackBindingDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, options?: BuildpackBindingDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, buildpackBindingName: string, options?: BuildpackBindingGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, options?: BuildpackBindingListOptionalParams): PagedAsyncIterableIterator; + listForCluster(resourceGroupName: string, serviceName: string, options?: BuildpackBindingListForClusterOptionalParams): PagedAsyncIterableIterator; } // @public @@ -775,6 +779,20 @@ export interface BuildpackBindingLaunchProperties { }; } +// @public +export interface BuildpackBindingListForClusterNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildpackBindingListForClusterNextResponse = BuildpackBindingResourceCollection; + +// @public +export interface BuildpackBindingListForClusterOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildpackBindingListForClusterResponse = BuildpackBindingResourceCollection; + // @public export interface BuildpackBindingListNextOptionalParams extends coreClient.OperationOptions { } @@ -864,6 +882,7 @@ export interface BuildResultProperties { buildPodName?: string; readonly buildStages?: BuildStageProperties[]; error?: ErrorModel; + readonly image?: string; name?: string; readonly provisioningState?: BuildResultProvisioningState; } @@ -884,7 +903,7 @@ export interface BuildService extends ProxyResource { // @public export interface BuildServiceAgentPool { - beginUpdatePut(resourceGroupName: string, serviceName: string, buildServiceName: string, agentPoolName: string, agentPoolResource: BuildServiceAgentPoolResource, options?: BuildServiceAgentPoolUpdatePutOptionalParams): Promise, BuildServiceAgentPoolUpdatePutResponse>>; + beginUpdatePut(resourceGroupName: string, serviceName: string, buildServiceName: string, agentPoolName: string, agentPoolResource: BuildServiceAgentPoolResource, options?: BuildServiceAgentPoolUpdatePutOptionalParams): Promise, BuildServiceAgentPoolUpdatePutResponse>>; beginUpdatePutAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, agentPoolName: string, agentPoolResource: BuildServiceAgentPoolResource, options?: BuildServiceAgentPoolUpdatePutOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, buildServiceName: string, agentPoolName: string, options?: BuildServiceAgentPoolGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, buildServiceName: string, options?: BuildServiceAgentPoolListOptionalParams): PagedAsyncIterableIterator; @@ -946,9 +965,9 @@ export type BuildServiceAgentPoolUpdatePutResponse = BuildServiceAgentPoolResour // @public export interface BuildServiceBuilder { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, builderResource: BuilderResource, options?: BuildServiceBuilderCreateOrUpdateOptionalParams): Promise, BuildServiceBuilderCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, builderResource: BuilderResource, options?: BuildServiceBuilderCreateOrUpdateOptionalParams): Promise, BuildServiceBuilderCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, builderResource: BuilderResource, options?: BuildServiceBuilderCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, options?: BuildServiceBuilderDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, options?: BuildServiceBuilderDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, options?: BuildServiceBuilderDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, buildServiceName: string, builderName: string, options?: BuildServiceBuilderGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, buildServiceName: string, options?: BuildServiceBuilderListOptionalParams): PagedAsyncIterableIterator; @@ -1011,6 +1030,27 @@ export interface BuildServiceCreateOrUpdateBuildOptionalParams extends coreClien // @public export type BuildServiceCreateOrUpdateBuildResponse = Build; +// @public +export interface BuildServiceCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildServiceCreateOrUpdateResponse = BuildService; + +// @public +export interface BuildServiceDeleteBuildHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildServiceDeleteBuildOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface BuildServiceGetBuildOptionalParams extends coreClient.OperationOptions { } @@ -1118,6 +1158,10 @@ export type BuildServiceListSupportedStacksResponse = SupportedStacksCollection; // @public export interface BuildServiceOperations { + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, buildServiceName: string, buildService: BuildService, options?: BuildServiceCreateOrUpdateOptionalParams): Promise, BuildServiceCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, buildService: BuildService, options?: BuildServiceCreateOrUpdateOptionalParams): Promise; + beginDeleteBuild(resourceGroupName: string, serviceName: string, buildServiceName: string, buildName: string, options?: BuildServiceDeleteBuildOptionalParams): Promise, void>>; + beginDeleteBuildAndWait(resourceGroupName: string, serviceName: string, buildServiceName: string, buildName: string, options?: BuildServiceDeleteBuildOptionalParams): Promise; createOrUpdateBuild(resourceGroupName: string, serviceName: string, buildServiceName: string, buildName: string, build: Build, options?: BuildServiceCreateOrUpdateBuildOptionalParams): Promise; getBuild(resourceGroupName: string, serviceName: string, buildServiceName: string, buildName: string, options?: BuildServiceGetBuildOptionalParams): Promise; getBuildResult(resourceGroupName: string, serviceName: string, buildServiceName: string, buildName: string, buildResultName: string, options?: BuildServiceGetBuildResultOptionalParams): Promise; @@ -1135,7 +1179,8 @@ export interface BuildServiceOperations { // @public export interface BuildServiceProperties { - kPackVersion?: string; + containerRegistry?: string; + readonly kPackVersion?: string; readonly provisioningState?: BuildServiceProvisioningState; resourceRequests?: BuildServicePropertiesResourceRequests; } @@ -1189,9 +1234,9 @@ export type CertificateResourceProvisioningState = string; // @public export interface Certificates { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: CertificateResource, options?: CertificatesCreateOrUpdateOptionalParams): Promise, CertificatesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: CertificateResource, options?: CertificatesCreateOrUpdateOptionalParams): Promise, CertificatesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: CertificateResource, options?: CertificatesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, certificateName: string, options?: CertificatesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, certificateName: string, options?: CertificatesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, certificateName: string, options?: CertificatesDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, certificateName: string, options?: CertificatesGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: CertificatesListOptionalParams): PagedAsyncIterableIterator; @@ -1249,6 +1294,8 @@ export interface CloudErrorBody { // @public export interface ClusterResourceProperties { readonly fqdn?: string; + infraResourceGroup?: string; + managedEnvironmentId?: string; marketplaceResource?: MarketplaceResource; networkProfile?: NetworkProfile; readonly powerState?: PowerState; @@ -1288,11 +1335,11 @@ export interface ConfigServerResource extends ProxyResource { // @public export interface ConfigServers { - beginUpdatePatch(resourceGroupName: string, serviceName: string, configServerResource: ConfigServerResource, options?: ConfigServersUpdatePatchOptionalParams): Promise, ConfigServersUpdatePatchResponse>>; + beginUpdatePatch(resourceGroupName: string, serviceName: string, configServerResource: ConfigServerResource, options?: ConfigServersUpdatePatchOptionalParams): Promise, ConfigServersUpdatePatchResponse>>; beginUpdatePatchAndWait(resourceGroupName: string, serviceName: string, configServerResource: ConfigServerResource, options?: ConfigServersUpdatePatchOptionalParams): Promise; - beginUpdatePut(resourceGroupName: string, serviceName: string, configServerResource: ConfigServerResource, options?: ConfigServersUpdatePutOptionalParams): Promise, ConfigServersUpdatePutResponse>>; + beginUpdatePut(resourceGroupName: string, serviceName: string, configServerResource: ConfigServerResource, options?: ConfigServersUpdatePutOptionalParams): Promise, ConfigServersUpdatePutResponse>>; beginUpdatePutAndWait(resourceGroupName: string, serviceName: string, configServerResource: ConfigServerResource, options?: ConfigServersUpdatePutOptionalParams): Promise; - beginValidate(resourceGroupName: string, serviceName: string, configServerSettings: ConfigServerSettings, options?: ConfigServersValidateOptionalParams): Promise, ConfigServersValidateResponse>>; + beginValidate(resourceGroupName: string, serviceName: string, configServerSettings: ConfigServerSettings, options?: ConfigServersValidateOptionalParams): Promise, ConfigServersValidateResponse>>; beginValidateAndWait(resourceGroupName: string, serviceName: string, configServerSettings: ConfigServerSettings, options?: ConfigServersValidateOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, options?: ConfigServersGetOptionalParams): Promise; } @@ -1415,11 +1462,11 @@ export interface ConfigurationServiceResourceRequests { // @public export interface ConfigurationServices { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, configurationServiceName: string, configurationServiceResource: ConfigurationServiceResource, options?: ConfigurationServicesCreateOrUpdateOptionalParams): Promise, ConfigurationServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, configurationServiceName: string, configurationServiceResource: ConfigurationServiceResource, options?: ConfigurationServicesCreateOrUpdateOptionalParams): Promise, ConfigurationServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, configurationServiceName: string, configurationServiceResource: ConfigurationServiceResource, options?: ConfigurationServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, configurationServiceName: string, options?: ConfigurationServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, configurationServiceName: string, options?: ConfigurationServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, configurationServiceName: string, options?: ConfigurationServicesDeleteOptionalParams): Promise; - beginValidate(resourceGroupName: string, serviceName: string, configurationServiceName: string, settings: ConfigurationServiceSettings, options?: ConfigurationServicesValidateOptionalParams): Promise, ConfigurationServicesValidateResponse>>; + beginValidate(resourceGroupName: string, serviceName: string, configurationServiceName: string, settings: ConfigurationServiceSettings, options?: ConfigurationServicesValidateOptionalParams): Promise, ConfigurationServicesValidateResponse>>; beginValidateAndWait(resourceGroupName: string, serviceName: string, configurationServiceName: string, settings: ConfigurationServiceSettings, options?: ConfigurationServicesValidateOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, configurationServiceName: string, options?: ConfigurationServicesGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: ConfigurationServicesListOptionalParams): PagedAsyncIterableIterator; @@ -1485,6 +1532,80 @@ export interface ContainerProbeSettings { disableProbe?: boolean; } +// @public +export interface ContainerRegistries { + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, containerRegistryName: string, containerRegistryResource: ContainerRegistryResource, options?: ContainerRegistriesCreateOrUpdateOptionalParams): Promise, ContainerRegistriesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, containerRegistryName: string, containerRegistryResource: ContainerRegistryResource, options?: ContainerRegistriesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serviceName: string, containerRegistryName: string, options?: ContainerRegistriesGetOptionalParams): Promise; + list(resourceGroupName: string, serviceName: string, options?: ContainerRegistriesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerRegistriesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerRegistriesCreateOrUpdateResponse = ContainerRegistryResource; + +// @public +export interface ContainerRegistriesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerRegistriesGetResponse = ContainerRegistryResource; + +// @public +export interface ContainerRegistriesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerRegistriesListNextResponse = ContainerRegistryResourceCollection; + +// @public +export interface ContainerRegistriesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerRegistriesListResponse = ContainerRegistryResourceCollection; + +// @public +export interface ContainerRegistryBasicCredentials extends ContainerRegistryCredentials { + password: string; + server: string; + type: "BasicAuth"; + username: string; +} + +// @public +export interface ContainerRegistryCredentials { + type: "BasicAuth"; +} + +// @public (undocumented) +export type ContainerRegistryCredentialsUnion = ContainerRegistryCredentials | ContainerRegistryBasicCredentials; + +// @public +export interface ContainerRegistryProperties { + credentials: ContainerRegistryCredentialsUnion; + readonly provisioningState?: ContainerRegistryProvisioningState; +} + +// @public +export type ContainerRegistryProvisioningState = string; + +// @public +export interface ContainerRegistryResource extends ProxyResource { + properties?: ContainerRegistryProperties; +} + +// @public +export interface ContainerRegistryResourceCollection { + nextLink?: string; + value?: ContainerRegistryResource[]; +} + // @public export interface ContentCertificateProperties extends CertificateProperties { content?: string; @@ -1534,11 +1655,11 @@ export type CustomDomainResourceProvisioningState = string; // @public export interface CustomDomains { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsCreateOrUpdateOptionalParams): Promise, CustomDomainsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsCreateOrUpdateOptionalParams): Promise, CustomDomainsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: CustomDomainsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: CustomDomainsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: CustomDomainsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsUpdateOptionalParams): Promise, CustomDomainsUpdateResponse>>; + beginUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsUpdateOptionalParams): Promise, CustomDomainsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: CustomDomainResource, options?: CustomDomainsUpdateOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: CustomDomainsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, appName: string, options?: CustomDomainsListOptionalParams): PagedAsyncIterableIterator; @@ -1634,9 +1755,9 @@ export interface CustomizedAcceleratorResourceCollection { // @public export interface CustomizedAccelerators { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, customizedAcceleratorResource: CustomizedAcceleratorResource, options?: CustomizedAcceleratorsCreateOrUpdateOptionalParams): Promise, CustomizedAcceleratorsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, customizedAcceleratorResource: CustomizedAcceleratorResource, options?: CustomizedAcceleratorsCreateOrUpdateOptionalParams): Promise, CustomizedAcceleratorsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, customizedAcceleratorResource: CustomizedAcceleratorResource, options?: CustomizedAcceleratorsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, options?: CustomizedAcceleratorsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, options?: CustomizedAcceleratorsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, options?: CustomizedAcceleratorsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, customizedAcceleratorName: string, options?: CustomizedAcceleratorsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, options?: CustomizedAcceleratorsListOptionalParams): PagedAsyncIterableIterator; @@ -1697,6 +1818,7 @@ export type CustomizedAcceleratorValidateResultState = string; // @public export interface CustomPersistentDiskProperties { + enableSubPath?: boolean; mountOptions?: string[]; mountPath: string; readOnly?: boolean; @@ -1712,6 +1834,15 @@ export interface CustomPersistentDiskResource { storageId: string; } +// @public +export interface CustomScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: { + [propertyName: string]: string; + }; + type?: string; +} + // @public export interface DeploymentInstance { readonly discoveryStatus?: string; @@ -1757,27 +1888,27 @@ export type DeploymentResourceStatus = string; // @public export interface Deployments { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, deploymentResource: DeploymentResource, options?: DeploymentsCreateOrUpdateOptionalParams): Promise, DeploymentsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, deploymentResource: DeploymentResource, options?: DeploymentsCreateOrUpdateOptionalParams): Promise, DeploymentsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, deploymentResource: DeploymentResource, options?: DeploymentsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams): Promise; - beginDisableRemoteDebugging(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsDisableRemoteDebuggingOptionalParams): Promise, DeploymentsDisableRemoteDebuggingResponse>>; + beginDisableRemoteDebugging(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsDisableRemoteDebuggingOptionalParams): Promise, DeploymentsDisableRemoteDebuggingResponse>>; beginDisableRemoteDebuggingAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsDisableRemoteDebuggingOptionalParams): Promise; - beginEnableRemoteDebugging(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsEnableRemoteDebuggingOptionalParams): Promise, DeploymentsEnableRemoteDebuggingResponse>>; + beginEnableRemoteDebugging(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsEnableRemoteDebuggingOptionalParams): Promise, DeploymentsEnableRemoteDebuggingResponse>>; beginEnableRemoteDebuggingAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsEnableRemoteDebuggingOptionalParams): Promise; - beginGenerateHeapDump(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateHeapDumpOptionalParams): Promise, void>>; + beginGenerateHeapDump(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateHeapDumpOptionalParams): Promise, void>>; beginGenerateHeapDumpAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateHeapDumpOptionalParams): Promise; - beginGenerateThreadDump(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateThreadDumpOptionalParams): Promise, void>>; + beginGenerateThreadDump(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateThreadDumpOptionalParams): Promise, void>>; beginGenerateThreadDumpAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateThreadDumpOptionalParams): Promise; - beginRestart(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsRestartOptionalParams): Promise, void>>; + beginRestart(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsRestartOptionalParams): Promise, void>>; beginRestartAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsRestartOptionalParams): Promise; - beginStart(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsStartOptionalParams): Promise; - beginStartJFR(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsStartJFROptionalParams): Promise, void>>; + beginStartJFR(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsStartJFROptionalParams): Promise, void>>; beginStartJFRAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsStartJFROptionalParams): Promise; - beginStop(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsStopOptionalParams): Promise, void>>; + beginStop(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsStopOptionalParams): Promise, void>>; beginStopAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, deploymentResource: DeploymentResource, options?: DeploymentsUpdateOptionalParams): Promise, DeploymentsUpdateResponse>>; + beginUpdate(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, deploymentResource: DeploymentResource, options?: DeploymentsUpdateOptionalParams): Promise, DeploymentsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, deploymentResource: DeploymentResource, options?: DeploymentsUpdateOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsGetOptionalParams): Promise; getLogFileUrl(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: DeploymentsGetLogFileUrlOptionalParams): Promise; @@ -1823,9 +1954,7 @@ export type DeploymentsEnableRemoteDebuggingResponse = RemoteDebugging; // @public export interface DeploymentSettings { addonConfigs?: { - [propertyName: string]: { - [propertyName: string]: Record; - }; + [propertyName: string]: Record; }; containerProbeSettings?: ContainerProbeSettings; environmentVariables?: { @@ -1834,6 +1963,7 @@ export interface DeploymentSettings { livenessProbe?: Probe; readinessProbe?: Probe; resourceRequests?: ResourceRequests; + scale?: Scale; startupProbe?: Probe; terminationGracePeriodSeconds?: number; } @@ -1989,9 +2119,9 @@ export interface DevToolPortalResourceRequests { // @public export interface DevToolPortals { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, devToolPortalName: string, devToolPortalResource: DevToolPortalResource, options?: DevToolPortalsCreateOrUpdateOptionalParams): Promise, DevToolPortalsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, devToolPortalName: string, devToolPortalResource: DevToolPortalResource, options?: DevToolPortalsCreateOrUpdateOptionalParams): Promise, DevToolPortalsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, devToolPortalName: string, devToolPortalResource: DevToolPortalResource, options?: DevToolPortalsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, devToolPortalName: string, options?: DevToolPortalsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, devToolPortalName: string, options?: DevToolPortalsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, devToolPortalName: string, options?: DevToolPortalsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, devToolPortalName: string, options?: DevToolPortalsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: DevToolPortalsListOptionalParams): PagedAsyncIterableIterator; @@ -2082,6 +2212,9 @@ export interface GatewayApiRoute { uri?: string; } +// @public +export type GatewayCertificateVerification = string; + // @public export interface GatewayCorsProperties { allowCredentials?: boolean; @@ -2110,9 +2243,9 @@ export interface GatewayCustomDomainResourceCollection { // @public export interface GatewayCustomDomains { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, gatewayCustomDomainResource: GatewayCustomDomainResource, options?: GatewayCustomDomainsCreateOrUpdateOptionalParams): Promise, GatewayCustomDomainsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, gatewayCustomDomainResource: GatewayCustomDomainResource, options?: GatewayCustomDomainsCreateOrUpdateOptionalParams): Promise, GatewayCustomDomainsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, gatewayCustomDomainResource: GatewayCustomDomainResource, options?: GatewayCustomDomainsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, options?: GatewayCustomDomainsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, options?: GatewayCustomDomainsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, options?: GatewayCustomDomainsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, gatewayName: string, domainName: string, options?: GatewayCustomDomainsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewayCustomDomainsListOptionalParams): PagedAsyncIterableIterator; @@ -2177,6 +2310,7 @@ export interface GatewayOperatorResourceRequests { export interface GatewayProperties { apiMetadataProperties?: GatewayApiMetadataProperties; apmTypes?: ApmType[]; + clientAuth?: GatewayPropertiesClientAuth; corsProperties?: GatewayCorsProperties; environmentVariables?: GatewayPropertiesEnvironmentVariables; httpsOnly?: boolean; @@ -2189,6 +2323,12 @@ export interface GatewayProperties { readonly url?: string; } +// @public +export interface GatewayPropertiesClientAuth { + certificates?: string[]; + certificateVerification?: GatewayCertificateVerification; +} + // @public export interface GatewayPropertiesEnvironmentVariables { properties?: { @@ -2253,9 +2393,9 @@ export interface GatewayRouteConfigResourceCollection { // @public export interface GatewayRouteConfigs { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, gatewayRouteConfigResource: GatewayRouteConfigResource, options?: GatewayRouteConfigsCreateOrUpdateOptionalParams): Promise, GatewayRouteConfigsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, gatewayRouteConfigResource: GatewayRouteConfigResource, options?: GatewayRouteConfigsCreateOrUpdateOptionalParams): Promise, GatewayRouteConfigsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, gatewayRouteConfigResource: GatewayRouteConfigResource, options?: GatewayRouteConfigsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, options?: GatewayRouteConfigsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, options?: GatewayRouteConfigsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, options?: GatewayRouteConfigsDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, gatewayName: string, routeConfigName: string, options?: GatewayRouteConfigsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewayRouteConfigsListOptionalParams): PagedAsyncIterableIterator; @@ -2299,10 +2439,14 @@ export type GatewayRouteConfigsListResponse = GatewayRouteConfigResourceCollecti // @public export interface Gateways { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, gatewayName: string, gatewayResource: GatewayResource, options?: GatewaysCreateOrUpdateOptionalParams): Promise, GatewaysCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, gatewayName: string, gatewayResource: GatewayResource, options?: GatewaysCreateOrUpdateOptionalParams): Promise, GatewaysCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, gatewayResource: GatewayResource, options?: GatewaysCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams): Promise; + beginRestart(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysRestartOptionalParams): Promise, void>>; + beginRestartAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysRestartOptionalParams): Promise; + beginUpdateCapacity(resourceGroupName: string, serviceName: string, gatewayName: string, gatewayCapacityResource: SkuObject, options?: GatewaysUpdateCapacityOptionalParams): Promise, GatewaysUpdateCapacityResponse>>; + beginUpdateCapacityAndWait(resourceGroupName: string, serviceName: string, gatewayName: string, gatewayCapacityResource: SkuObject, options?: GatewaysUpdateCapacityOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: GatewaysListOptionalParams): PagedAsyncIterableIterator; listEnvSecrets(resourceGroupName: string, serviceName: string, gatewayName: string, options?: GatewaysListEnvSecretsOptionalParams): Promise; @@ -2354,6 +2498,33 @@ export interface GatewaysListOptionalParams extends coreClient.OperationOptions // @public export type GatewaysListResponse = GatewayResourceCollection; +// @public +export interface GatewaysRestartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface GatewaysRestartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GatewaysUpdateCapacityHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface GatewaysUpdateCapacityOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GatewaysUpdateCapacityResponse = GatewayResource; + // @public export interface GatewaysValidateDomainOptionalParams extends coreClient.OperationOptions { } @@ -2386,6 +2557,14 @@ export interface HttpGetAction extends ProbeAction { type: "HTTPGetAction"; } +// @public +export interface HttpScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: { + [propertyName: string]: string; + }; +} + // @public export type HttpSchemeType = string; @@ -2571,6 +2750,15 @@ export enum KnownConfigurationServiceProvisioningState { Updating = "Updating" } +// @public +export enum KnownContainerRegistryProvisioningState { + Canceled = "Canceled", + Creating = "Creating", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -2633,6 +2821,12 @@ export enum KnownDevToolPortalProvisioningState { Updating = "Updating" } +// @public +export enum KnownGatewayCertificateVerification { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownGatewayProvisioningState { Creating = "Creating", @@ -2881,9 +3075,9 @@ export interface MonitoringSettingResource extends ProxyResource { // @public export interface MonitoringSettings { - beginUpdatePatch(resourceGroupName: string, serviceName: string, monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePatchOptionalParams): Promise, MonitoringSettingsUpdatePatchResponse>>; + beginUpdatePatch(resourceGroupName: string, serviceName: string, monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePatchOptionalParams): Promise, MonitoringSettingsUpdatePatchResponse>>; beginUpdatePatchAndWait(resourceGroupName: string, serviceName: string, monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePatchOptionalParams): Promise; - beginUpdatePut(resourceGroupName: string, serviceName: string, monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePutOptionalParams): Promise, MonitoringSettingsUpdatePutResponse>>; + beginUpdatePut(resourceGroupName: string, serviceName: string, monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePutOptionalParams): Promise, MonitoringSettingsUpdatePutResponse>>; beginUpdatePutAndWait(resourceGroupName: string, serviceName: string, monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePutOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, options?: MonitoringSettingsGetOptionalParams): Promise; } @@ -3035,9 +3229,9 @@ export interface PredefinedAcceleratorResourceCollection { // @public export interface PredefinedAccelerators { - beginDisable(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsDisableOptionalParams): Promise, void>>; + beginDisable(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsDisableOptionalParams): Promise, void>>; beginDisableAndWait(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsDisableOptionalParams): Promise; - beginEnable(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsEnableOptionalParams): Promise, void>>; + beginEnable(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsEnableOptionalParams): Promise, void>>; beginEnableAndWait(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsEnableOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, applicationAcceleratorName: string, options?: PredefinedAcceleratorsListOptionalParams): PagedAsyncIterableIterator; @@ -3108,6 +3302,13 @@ export type ProvisioningState = string; export interface ProxyResource extends Resource { } +// @public +export interface QueueScaleRule { + auth?: ScaleRuleAuth[]; + queueLength?: number; + queueName?: string; +} + // @public export interface RegenerateTestKeyRequestPayload { keyType: TestKeyType; @@ -3221,11 +3422,39 @@ export interface RuntimeVersionsListRuntimeVersionsOptionalParams extends coreCl // @public export type RuntimeVersionsListRuntimeVersionsResponse = AvailableRuntimeVersions; +// @public +export interface Scale { + maxReplicas?: number; + minReplicas?: number; + rules?: ScaleRule[]; +} + +// @public +export interface ScaleRule { + azureQueue?: QueueScaleRule; + custom?: CustomScaleRule; + http?: HttpScaleRule; + name?: string; + tcp?: TcpScaleRule; +} + +// @public +export interface ScaleRuleAuth { + secretRef?: string; + triggerParameter?: string; +} + +// @public +export interface Secret { + name?: string; + value?: string; +} + // @public export interface ServiceRegistries { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesCreateOrUpdateOptionalParams): Promise, ServiceRegistriesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesCreateOrUpdateOptionalParams): Promise, ServiceRegistriesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: ServiceRegistriesListOptionalParams): PagedAsyncIterableIterator; @@ -3315,15 +3544,15 @@ export interface ServiceResourceList { // @public export interface Services { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, resource: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, resource: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, resource: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, options?: ServicesDeleteOptionalParams): Promise; - beginStart(resourceGroupName: string, serviceName: string, options?: ServicesStartOptionalParams): Promise, void>>; + beginStart(resourceGroupName: string, serviceName: string, options?: ServicesStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, serviceName: string, options?: ServicesStartOptionalParams): Promise; - beginStop(resourceGroupName: string, serviceName: string, options?: ServicesStopOptionalParams): Promise, void>>; + beginStop(resourceGroupName: string, serviceName: string, options?: ServicesStopOptionalParams): Promise, void>>; beginStopAndWait(resourceGroupName: string, serviceName: string, options?: ServicesStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, serviceName: string, resource: ServiceResource, options?: ServicesUpdateOptionalParams): Promise, ServicesUpdateResponse>>; + beginUpdate(resourceGroupName: string, serviceName: string, resource: ServiceResource, options?: ServicesUpdateOptionalParams): Promise, ServicesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, serviceName: string, resource: ServiceResource, options?: ServicesUpdateOptionalParams): Promise; checkNameAvailability(location: string, availabilityParameters: NameAvailabilityParameters, options?: ServicesCheckNameAvailabilityOptionalParams): Promise; disableTestEndpoint(resourceGroupName: string, serviceName: string, options?: ServicesDisableTestEndpointOptionalParams): Promise; @@ -3446,6 +3675,7 @@ export type ServicesUpdateResponse = ServiceResource; // @public export interface ServiceVNetAddons { + dataPlanePublicEndpoint?: boolean; logStreamPublicEndpoint?: boolean; } @@ -3467,6 +3697,11 @@ export interface SkuCapacity { scaleType?: SkuScaleType; } +// @public +export interface SkuObject { + sku?: Sku; +} + // @public export interface Skus { list(options?: SkusListOptionalParams): PagedAsyncIterableIterator; @@ -3538,9 +3773,9 @@ export interface StorageResourceCollection { // @public export interface Storages { - beginCreateOrUpdate(resourceGroupName: string, serviceName: string, storageName: string, storageResource: StorageResource, options?: StoragesCreateOrUpdateOptionalParams): Promise, StoragesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, storageName: string, storageResource: StorageResource, options?: StoragesCreateOrUpdateOptionalParams): Promise, StoragesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, serviceName: string, storageName: string, storageResource: StorageResource, options?: StoragesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, serviceName: string, storageName: string, options?: StoragesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, serviceName: string, storageName: string, options?: StoragesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serviceName: string, storageName: string, options?: StoragesDeleteOptionalParams): Promise; get(resourceGroupName: string, serviceName: string, storageName: string, options?: StoragesGetOptionalParams): Promise; list(resourceGroupName: string, serviceName: string, options?: StoragesListOptionalParams): PagedAsyncIterableIterator; @@ -3641,6 +3876,14 @@ export interface SystemData { lastModifiedByType?: LastModifiedByType; } +// @public +export interface TcpScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: { + [propertyName: string]: string; + }; +} + // @public export interface TCPSocketAction extends ProbeAction { type: "TCPSocketAction"; diff --git a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts index 061667286602..89f03d7ef93b 100644 --- a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts +++ b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts @@ -21,6 +21,7 @@ import { ServiceRegistriesImpl, ApplicationLiveViewsImpl, DevToolPortalsImpl, + ContainerRegistriesImpl, BuildServiceOperationsImpl, BuildpackBindingImpl, BuildServiceBuilderImpl, @@ -51,6 +52,7 @@ import { ServiceRegistries, ApplicationLiveViews, DevToolPortals, + ContainerRegistries, BuildServiceOperations, BuildpackBinding, BuildServiceBuilder, @@ -109,7 +111,7 @@ export class AppPlatformManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-appplatform/2.1.0-beta.6`; + const packageDetails = `azsdk-js-arm-appplatform/3.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -162,13 +164,14 @@ export class AppPlatformManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-01-preview"; + this.apiVersion = options.apiVersion || "2023-03-01-preview"; this.services = new ServicesImpl(this); this.configServers = new ConfigServersImpl(this); this.configurationServices = new ConfigurationServicesImpl(this); this.serviceRegistries = new ServiceRegistriesImpl(this); this.applicationLiveViews = new ApplicationLiveViewsImpl(this); this.devToolPortals = new DevToolPortalsImpl(this); + this.containerRegistries = new ContainerRegistriesImpl(this); this.buildServiceOperations = new BuildServiceOperationsImpl(this); this.buildpackBinding = new BuildpackBindingImpl(this); this.buildServiceBuilder = new BuildServiceBuilderImpl(this); @@ -228,6 +231,7 @@ export class AppPlatformManagementClient extends coreClient.ServiceClient { serviceRegistries: ServiceRegistries; applicationLiveViews: ApplicationLiveViews; devToolPortals: DevToolPortals; + containerRegistries: ContainerRegistries; buildServiceOperations: BuildServiceOperations; buildpackBinding: BuildpackBinding; buildServiceBuilder: BuildServiceBuilder; diff --git a/sdk/appplatform/arm-appplatform/src/lroImpl.ts b/sdk/appplatform/arm-appplatform/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/appplatform/arm-appplatform/src/lroImpl.ts +++ b/sdk/appplatform/arm-appplatform/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/appplatform/arm-appplatform/src/models/index.ts b/sdk/appplatform/arm-appplatform/src/models/index.ts index 8190d0613ce9..2986ad5bb630 100644 --- a/sdk/appplatform/arm-appplatform/src/models/index.ts +++ b/sdk/appplatform/arm-appplatform/src/models/index.ts @@ -8,6 +8,9 @@ import * as coreClient from "@azure/core-client"; +export type ContainerRegistryCredentialsUnion = + | ContainerRegistryCredentials + | ContainerRegistryBasicCredentials; export type CustomPersistentDiskPropertiesUnion = | CustomPersistentDiskProperties | AzureFileVolume; @@ -58,6 +61,10 @@ export interface ClusterResourceProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serviceId?: string; + /** The resource Id of the Managed Environment that the Spring Apps instance builds on */ + managedEnvironmentId?: string; + /** The name of the resource group that contains the infrastructure resources */ + infraResourceGroup?: string; /** * Power state of the Service * NOTE: This property will not be serialized. It can only be populated by the server. @@ -149,6 +156,8 @@ export interface IngressConfig { export interface ServiceVNetAddons { /** Indicates whether the log stream in vnet injection instance could be accessed from internet. */ logStreamPublicEndpoint?: boolean; + /** Indicates whether the data plane components(log stream, app connect, remote debugging) in vnet injection instance could be accessed from internet. */ + dataPlanePublicEndpoint?: boolean; } /** Purchasing 3rd Party product for one Azure Spring Apps instance */ @@ -714,6 +723,31 @@ export interface DevToolPortalFeatureDetail { readonly route?: string; } +/** Collection compose of container registry resources list and a possible link for next page. */ +export interface ContainerRegistryResourceCollection { + /** The container registry resources list. */ + value?: ContainerRegistryResource[]; + /** The link to next page of storage list. */ + nextLink?: string; +} + +/** Container registry resource payload. */ +export interface ContainerRegistryProperties { + /** The credentials of the container registry resource. */ + credentials: ContainerRegistryCredentialsUnion; + /** + * State of the Container Registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ContainerRegistryProvisioningState; +} + +/** The credential for the container registry resource. */ +export interface ContainerRegistryCredentials { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "BasicAuth"; +} + /** Object that includes an array of Build service resources and a possible link for next set */ export interface BuildServiceCollection { /** Collection of Build service resources */ @@ -727,10 +761,15 @@ export interface BuildServiceCollection { /** Build service resource properties payload */ export interface BuildServiceProperties { - /** The installed KPack version in this build service. */ - kPackVersion?: string; + /** The resource id of the container registry used in this build service. */ + containerRegistry?: string; /** - * Provisioning state of the KPack build result + * The installed KPack version in this build service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly kPackVersion?: string; + /** + * Provisioning state of the KPack build service * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: BuildServiceProvisioningState; @@ -807,6 +846,17 @@ export interface BuildResourceRequests { memory?: string; } +/** Object that includes an array of BuildpackBinding resources and a possible link for next set */ +export interface BuildpackBindingResourceCollection { + /** Collection of BuildpackBinding resources */ + value?: BuildpackBindingResource[]; + /** + * URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + */ + nextLink?: string; +} + /** Properties of a buildpack binding */ export interface BuildpackBindingProperties { /** Buildpack Binding Type */ @@ -828,17 +878,6 @@ export interface BuildpackBindingLaunchProperties { secrets?: { [propertyName: string]: string }; } -/** Object that includes an array of BuildpackBinding resources and a possible link for next set */ -export interface BuildpackBindingResourceCollection { - /** Collection of BuildpackBinding resources */ - value?: BuildpackBindingResource[]; - /** - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - nextLink?: string; -} - /** Object that includes an array of Build result resources and a possible link for next set */ export interface BuildResultCollection { /** Collection of Build result resources */ @@ -868,6 +907,11 @@ export interface BuildResultProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly buildStages?: BuildStageProperties[]; + /** + * The container registry image of this build result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly image?: string; } /** The build stage (init-container and container) resources in build pod. */ @@ -1066,9 +1110,7 @@ export interface AppResourceProperties { */ readonly url?: string; /** Collection of addons */ - addonConfigs?: { - [propertyName: string]: { [propertyName: string]: Record }; - }; + addonConfigs?: { [propertyName: string]: Record }; /** * Provisioning state of the App * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1095,6 +1137,8 @@ export interface AppResourceProperties { vnetAddons?: AppVNetAddons; /** App ingress settings payload. */ ingressSettings?: IngressSettings; + /** Collection of auth secrets */ + secrets?: Secret[]; } /** Temporary disk payload */ @@ -1134,6 +1178,8 @@ export interface CustomPersistentDiskProperties { mountPath: string; /** Indicates whether the persistent disk is a readOnly one. */ readOnly?: boolean; + /** If set to true, it will create and mount a dedicated directory for every individual app instance. */ + enableSubPath?: boolean; /** These are the mount options for a persistent disk. */ mountOptions?: string[]; } @@ -1179,6 +1225,14 @@ export interface IngressSettingsClientAuth { certificates?: string[]; } +/** Secret definition. */ +export interface Secret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; +} + /** Managed identity properties retrieved from ARM request headers. */ export interface ManagedIdentityProperties { /** Type of the managed identity */ @@ -1241,7 +1295,7 @@ export interface BindingResourceProperties { /** The key of the bound resource */ key?: string; /** Binding parameters of the Binding resource */ - bindingParameters?: { [propertyName: string]: Record }; + bindingParameters?: { [propertyName: string]: string }; /** * The generated Spring Boot property file for this binding. The secret will be deducted. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1442,9 +1496,7 @@ export interface DeploymentSettings { /** Collection of environment variables */ environmentVariables?: { [propertyName: string]: string }; /** Collection of addons */ - addonConfigs?: { - [propertyName: string]: { [propertyName: string]: Record }; - }; + addonConfigs?: { [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 */ @@ -1453,6 +1505,8 @@ export interface DeploymentSettings { 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; + /** Scaling properties for the Azure Spring Apps App Instance. */ + scale?: Scale; /** Container liveness and readiness probe settings */ containerProbeSettings?: ContainerProbeSettings; } @@ -1489,6 +1543,77 @@ export interface ProbeAction { type: "HTTPGetAction" | "ExecAction" | "TCPSocketAction"; } +/** Azure Spring Apps scaling configurations. */ +export interface Scale { + /** Optional. Minimum number of container replicas. */ + minReplicas?: number; + /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ + maxReplicas?: number; + /** Scaling rules. */ + rules?: ScaleRule[]; +} + +/** Azure Spring Apps App Instance scaling rule. */ +export interface ScaleRule { + /** Scale Rule Name */ + name?: string; + /** Azure Queue based scaling. */ + azureQueue?: QueueScaleRule; + /** Custom scale rule. */ + custom?: CustomScaleRule; + /** HTTP requests based scaling. */ + http?: HttpScaleRule; + /** Tcp requests based scaling. */ + tcp?: TcpScaleRule; +} + +/** Azure Spring Apps App Instance Azure Queue based scaling rule. */ +export interface QueueScaleRule { + /** Queue name. */ + queueName?: string; + /** Queue length. */ + queueLength?: number; + /** Authentication secrets for the queue scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Auth Secrets for Azure Spring Apps App Instance Scale Rule */ +export interface ScaleRuleAuth { + /** Name of the Azure Spring Apps App Instance secret from which to pull the auth params. */ + secretRef?: string; + /** Trigger Parameter that uses the secret */ + triggerParameter?: string; +} + +/** Azure Spring Apps App Instance Custom scaling rule. */ +export interface CustomScaleRule { + /** + * Type of the custom scale rule + * eg: azure-servicebus, redis etc. + */ + type?: string; + /** Metadata properties to describe custom scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Azure Spring Apps App Instance Http scaling rule. */ +export interface HttpScaleRule { + /** Metadata properties to describe http scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the custom scale rule. */ + auth?: ScaleRuleAuth[]; +} + +/** Azure Spring Apps App Instance Tcp scaling rule. */ +export interface TcpScaleRule { + /** Metadata properties to describe tcp scale rule. */ + metadata?: { [propertyName: string]: string }; + /** Authentication secrets for the tcp scale rule. */ + auth?: ScaleRuleAuth[]; +} + /** Container liveness and readiness probe settings */ export interface ContainerProbeSettings { /** Indicates whether disable the liveness and readiness probe */ @@ -1827,6 +1952,8 @@ export interface GatewayProperties { apiMetadataProperties?: GatewayApiMetadataProperties; /** Cross-Origin Resource Sharing property */ corsProperties?: GatewayCorsProperties; + /** Client-Certification Authentication. */ + clientAuth?: GatewayPropertiesClientAuth; /** Collection of APM type used in Spring Cloud Gateway */ apmTypes?: ApmType[]; /** Environment variables of Spring Cloud Gateway */ @@ -1887,6 +2014,14 @@ export interface GatewayCorsProperties { exposedHeaders?: string[]; } +/** Client-Certification Authentication. */ +export interface GatewayPropertiesClientAuth { + /** Collection of certificate resource Ids in Azure Spring Apps. */ + certificates?: string[]; + /** Whether to enable certificate verification or not */ + certificateVerification?: GatewayCertificateVerification; +} + /** Environment variables of Spring Cloud Gateway */ export interface GatewayPropertiesEnvironmentVariables { /** Non-sensitive properties */ @@ -1950,6 +2085,12 @@ export interface GatewayOperatorResourceRequests { readonly instanceCount?: number; } +/** Resource Sku object used for scaling out and scaling in. */ +export interface SkuObject { + /** Sku of the Spring Cloud Gateway resource */ + sku?: Sku; +} + /** Object that includes an array of gateway resources and a possible link for next set */ export interface GatewayResourceCollection { /** Collection of gateway resources */ @@ -2301,12 +2442,25 @@ export interface TrackedResource extends Resource { /** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. */ export interface ProxyResource extends Resource {} +/** The basic authentication properties for the container registry resource. */ +export interface ContainerRegistryBasicCredentials + extends ContainerRegistryCredentials { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "BasicAuth"; + /** The login server of the Container Registry. */ + server: string; + /** The username of the Container Registry. */ + username: string; + /** The password of the Container Registry. */ + password: string; +} + /** The properties of the Azure File volume. Azure File shares are mounted as volumes. */ export interface AzureFileVolume extends CustomPersistentDiskProperties { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "AzureFileVolume"; /** The share name of the Azure File share. */ - shareName: string; + shareName?: string; } /** storage resource of type Azure Storage Account. */ @@ -2399,12 +2553,16 @@ export interface TCPSocketAction extends ProbeAction { export interface AcceleratorPublicSetting extends AcceleratorAuthSetting { /** Polymorphic discriminator, which specifies the different types this object can be */ authType: "Public"; + /** Resource Id of CA certificate for https URL of Git repository. */ + caCertResourceId?: string; } /** Auth setting for basic auth. */ export interface AcceleratorBasicAuthSetting extends AcceleratorAuthSetting { /** Polymorphic discriminator, which specifies the different types this object can be */ authType: "BasicAuth"; + /** Resource Id of CA certificate for https URL of Git repository. */ + caCertResourceId?: string; /** Username of git repository basic auth. */ username: string; /** Password of git repository basic auth. */ @@ -2461,6 +2619,12 @@ export interface DevToolPortalResource extends ProxyResource { properties?: DevToolPortalProperties; } +/** Container registry resource payload. */ +export interface ContainerRegistryResource extends ProxyResource { + /** Properties of the container registry resource payload. */ + properties?: ContainerRegistryProperties; +} + /** Build service resource payload */ export interface BuildService extends ProxyResource { /** Properties of the build resource */ @@ -2649,6 +2813,21 @@ export interface NetCoreZipUploadedUserSourceInfo runtimeVersion?: string; } +/** Defines headers for BuildService_deleteBuild operation. */ +export interface BuildServiceDeleteBuildHeaders { + location?: string; +} + +/** Defines headers for Gateways_updateCapacity operation. */ +export interface GatewaysUpdateCapacityHeaders { + location?: string; +} + +/** Defines headers for Gateways_restart operation. */ +export interface GatewaysRestartHeaders { + location?: string; +} + /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { /** Creating */ @@ -2955,6 +3134,33 @@ export enum KnownDevToolPortalFeatureState { */ export type DevToolPortalFeatureState = string; +/** Known values of {@link ContainerRegistryProvisioningState} that the service accepts. */ +export enum KnownContainerRegistryProvisioningState { + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for ContainerRegistryProvisioningState. \ + * {@link KnownContainerRegistryProvisioningState} can be used interchangeably with ContainerRegistryProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** + */ +export type ContainerRegistryProvisioningState = string; + /** Known values of {@link BuildServiceProvisioningState} that the service accepts. */ export enum KnownBuildServiceProvisioningState { /** Creating */ @@ -3546,6 +3752,24 @@ export enum KnownGatewayProvisioningState { */ export type GatewayProvisioningState = string; +/** Known values of {@link GatewayCertificateVerification} that the service accepts. */ +export enum KnownGatewayCertificateVerification { + /** Enable certificate verification in Spring Cloud Gateway. */ + Enabled = "Enabled", + /** Disable certificate verification in Spring Cloud Gateway. */ + Disabled = "Disabled" +} + +/** + * Defines values for GatewayCertificateVerification. \ + * {@link KnownGatewayCertificateVerification} can be used interchangeably with GatewayCertificateVerification, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled**: Enable certificate verification in Spring Cloud Gateway. \ + * **Disabled**: Disable certificate verification in Spring Cloud Gateway. + */ +export type GatewayCertificateVerification = string; + /** Known values of {@link ApmType} that the service accepts. */ export enum KnownApmType { /** ApplicationInsights */ @@ -4091,6 +4315,39 @@ export interface DevToolPortalsListNextOptionalParams /** Contains response data for the listNext operation. */ export type DevToolPortalsListNextResponse = DevToolPortalResourceCollection; +/** Optional parameters. */ +export interface ContainerRegistriesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ContainerRegistriesListResponse = ContainerRegistryResourceCollection; + +/** Optional parameters. */ +export interface ContainerRegistriesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerRegistriesGetResponse = ContainerRegistryResource; + +/** Optional parameters. */ +export interface ContainerRegistriesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerRegistriesCreateOrUpdateResponse = ContainerRegistryResource; + +/** Optional parameters. */ +export interface ContainerRegistriesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ContainerRegistriesListNextResponse = ContainerRegistryResourceCollection; + /** Optional parameters. */ export interface BuildServiceListBuildServicesOptionalParams extends coreClient.OperationOptions {} @@ -4105,6 +4362,18 @@ export interface BuildServiceGetBuildServiceOptionalParams /** Contains response data for the getBuildService operation. */ export type BuildServiceGetBuildServiceResponse = BuildService; +/** Optional parameters. */ +export interface BuildServiceCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type BuildServiceCreateOrUpdateResponse = BuildService; + /** Optional parameters. */ export interface BuildServiceListBuildsOptionalParams extends coreClient.OperationOptions {} @@ -4126,6 +4395,15 @@ export interface BuildServiceCreateOrUpdateBuildOptionalParams /** Contains response data for the createOrUpdateBuild operation. */ export type BuildServiceCreateOrUpdateBuildResponse = Build; +/** Optional parameters. */ +export interface BuildServiceDeleteBuildOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface BuildServiceListBuildResultsOptionalParams extends coreClient.OperationOptions {} @@ -4203,6 +4481,13 @@ export interface BuildServiceListBuildResultsNextOptionalParams /** Contains response data for the listBuildResultsNext operation. */ export type BuildServiceListBuildResultsNextResponse = BuildResultCollection; +/** Optional parameters. */ +export interface BuildpackBindingListForClusterOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listForCluster operation. */ +export type BuildpackBindingListForClusterResponse = BuildpackBindingResourceCollection; + /** Optional parameters. */ export interface BuildpackBindingGetOptionalParams extends coreClient.OperationOptions {} @@ -4238,6 +4523,13 @@ export interface BuildpackBindingListOptionalParams /** Contains response data for the list operation. */ export type BuildpackBindingListResponse = BuildpackBindingResourceCollection; +/** Optional parameters. */ +export interface BuildpackBindingListForClusterNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listForClusterNext operation. */ +export type BuildpackBindingListForClusterNextResponse = BuildpackBindingResourceCollection; + /** Optional parameters. */ export interface BuildpackBindingListNextOptionalParams extends coreClient.OperationOptions {} @@ -4850,6 +5142,18 @@ export interface GatewaysCreateOrUpdateOptionalParams /** Contains response data for the createOrUpdate operation. */ export type GatewaysCreateOrUpdateResponse = GatewayResource; +/** Optional parameters. */ +export interface GatewaysUpdateCapacityOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the updateCapacity operation. */ +export type GatewaysUpdateCapacityResponse = GatewayResource; + /** Optional parameters. */ export interface GatewaysDeleteOptionalParams extends coreClient.OperationOptions { @@ -4866,6 +5170,15 @@ export interface GatewaysListEnvSecretsOptionalParams /** Contains response data for the listEnvSecrets operation. */ export type GatewaysListEnvSecretsResponse = { [propertyName: string]: string }; +/** Optional parameters. */ +export interface GatewaysRestartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface GatewaysListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/appplatform/arm-appplatform/src/models/mappers.ts b/sdk/appplatform/arm-appplatform/src/models/mappers.ts index 848e27cff3a1..5ad9365a3060 100644 --- a/sdk/appplatform/arm-appplatform/src/models/mappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/mappers.ts @@ -48,6 +48,18 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { name: "String" } }, + managedEnvironmentId: { + serializedName: "managedEnvironmentId", + type: { + name: "String" + } + }, + infraResourceGroup: { + serializedName: "infraResourceGroup", + type: { + name: "String" + } + }, powerState: { serializedName: "powerState", readOnly: true, @@ -253,6 +265,13 @@ export const ServiceVNetAddons: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + dataPlanePublicEndpoint: { + defaultValue: false, + serializedName: "dataPlanePublicEndpoint", + type: { + name: "Boolean" + } } } } @@ -1607,6 +1626,77 @@ export const DevToolPortalFeatureDetail: coreClient.CompositeMapper = { } }; +export const ContainerRegistryResourceCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryResourceCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerRegistryResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryProperties", + modelProperties: { + credentials: { + serializedName: "credentials", + type: { + name: "Composite", + className: "ContainerRegistryCredentials" + } + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryCredentials", + uberParent: "ContainerRegistryCredentials", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const BuildServiceCollection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1639,8 +1729,15 @@ export const BuildServiceProperties: coreClient.CompositeMapper = { name: "Composite", className: "BuildServiceProperties", modelProperties: { + containerRegistry: { + serializedName: "containerRegistry", + type: { + name: "String" + } + }, kPackVersion: { serializedName: "kPackVersion", + readOnly: true, type: { name: "String" } @@ -1806,6 +1903,33 @@ export const BuildResourceRequests: coreClient.CompositeMapper = { } }; +export const BuildpackBindingResourceCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildpackBindingResourceCollection", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BuildpackBindingResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const BuildpackBindingProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1858,33 +1982,6 @@ export const BuildpackBindingLaunchProperties: coreClient.CompositeMapper = { } }; -export const BuildpackBindingResourceCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BuildpackBindingResourceCollection", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BuildpackBindingResource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - } - } - } -}; - export const BuildResultCollection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1955,6 +2052,13 @@ export const BuildResultProperties: coreClient.CompositeMapper = { } } } + }, + image: { + serializedName: "image", + readOnly: true, + type: { + name: "String" + } } } } @@ -2418,12 +2522,7 @@ export const AppResourceProperties: coreClient.CompositeMapper = { type: { name: "Dictionary", value: { - type: { - name: "Dictionary", - value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } } } } }, @@ -2506,6 +2605,18 @@ export const AppResourceProperties: coreClient.CompositeMapper = { name: "Composite", className: "IngressSettings" } + }, + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } } } } @@ -2626,6 +2737,13 @@ export const CustomPersistentDiskProperties: coreClient.CompositeMapper = { name: "Boolean" } }, + enableSubPath: { + defaultValue: false, + serializedName: "enableSubPath", + type: { + name: "Boolean" + } + }, mountOptions: { serializedName: "mountOptions", type: { @@ -2753,6 +2871,27 @@ export const IngressSettingsClientAuth: coreClient.CompositeMapper = { } }; +export const Secret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Secret", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + export const ManagedIdentityProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2897,9 +3036,7 @@ export const BindingResourceProperties: coreClient.CompositeMapper = { serializedName: "bindingParameters", type: { name: "Dictionary", - value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } + value: { type: { name: "String" } } } }, generatedProperties: { @@ -3367,12 +3504,7 @@ export const DeploymentSettings: coreClient.CompositeMapper = { type: { name: "Dictionary", value: { - type: { - name: "Dictionary", - value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } - } + type: { name: "Dictionary", value: { type: { name: "any" } } } } } }, @@ -3404,6 +3536,13 @@ export const DeploymentSettings: coreClient.CompositeMapper = { name: "Number" } }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "Scale" + } + }, containerProbeSettings: { serializedName: "containerProbeSettings", type: { @@ -3511,6 +3650,227 @@ export const ProbeAction: coreClient.CompositeMapper = { } }; +export const Scale: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Scale", + modelProperties: { + minReplicas: { + serializedName: "minReplicas", + type: { + name: "Number" + } + }, + maxReplicas: { + defaultValue: 10, + serializedName: "maxReplicas", + type: { + name: "Number" + } + }, + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRule" + } + } + } + } + } + } +}; + +export const ScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + azureQueue: { + serializedName: "azureQueue", + type: { + name: "Composite", + className: "QueueScaleRule" + } + }, + custom: { + serializedName: "custom", + type: { + name: "Composite", + className: "CustomScaleRule" + } + }, + http: { + serializedName: "http", + type: { + name: "Composite", + className: "HttpScaleRule" + } + }, + tcp: { + serializedName: "tcp", + type: { + name: "Composite", + className: "TcpScaleRule" + } + } + } + } +}; + +export const QueueScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "QueueScaleRule", + modelProperties: { + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + queueLength: { + serializedName: "queueLength", + type: { + name: "Number" + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const ScaleRuleAuth: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRuleAuth", + modelProperties: { + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + }, + triggerParameter: { + serializedName: "triggerParameter", + type: { + name: "String" + } + } + } + } +}; + +export const CustomScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomScaleRule", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const HttpScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpScaleRule", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + +export const TcpScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TcpScaleRule", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } + } + } + } + } +}; + export const ContainerProbeSettings: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4426,6 +4786,13 @@ export const GatewayProperties: coreClient.CompositeMapper = { className: "GatewayCorsProperties" } }, + clientAuth: { + serializedName: "clientAuth", + type: { + name: "Composite", + className: "GatewayPropertiesClientAuth" + } + }, apmTypes: { constraints: { UniqueItems: true @@ -4620,6 +4987,36 @@ export const GatewayCorsProperties: coreClient.CompositeMapper = { } }; +export const GatewayPropertiesClientAuth: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayPropertiesClientAuth", + modelProperties: { + certificates: { + constraints: { + UniqueItems: true + }, + serializedName: "certificates", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + certificateVerification: { + defaultValue: "Disabled", + serializedName: "certificateVerification", + type: { + name: "String" + } + } + } + } +}; + export const GatewayPropertiesEnvironmentVariables: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4748,6 +5145,22 @@ export const GatewayOperatorResourceRequests: coreClient.CompositeMapper = { } }; +export const SkuObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuObject", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + } + } + } +}; + export const GatewayResourceCollection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5721,6 +6134,41 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; +export const ContainerRegistryBasicCredentials: coreClient.CompositeMapper = { + serializedName: "BasicAuth", + type: { + name: "Composite", + className: "ContainerRegistryBasicCredentials", + uberParent: "ContainerRegistryCredentials", + polymorphicDiscriminator: + ContainerRegistryCredentials.type.polymorphicDiscriminator, + modelProperties: { + ...ContainerRegistryCredentials.type.modelProperties, + server: { + serializedName: "server", + required: true, + type: { + name: "String" + } + }, + username: { + serializedName: "username", + required: true, + type: { + name: "String" + } + }, + password: { + serializedName: "password", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const AzureFileVolume: coreClient.CompositeMapper = { serializedName: "AzureFileVolume", type: { @@ -5733,7 +6181,6 @@ export const AzureFileVolume: coreClient.CompositeMapper = { ...CustomPersistentDiskProperties.type.modelProperties, shareName: { serializedName: "shareName", - required: true, type: { name: "String" } @@ -5962,7 +6409,13 @@ export const AcceleratorPublicSetting: coreClient.CompositeMapper = { polymorphicDiscriminator: AcceleratorAuthSetting.type.polymorphicDiscriminator, modelProperties: { - ...AcceleratorAuthSetting.type.modelProperties + ...AcceleratorAuthSetting.type.modelProperties, + caCertResourceId: { + serializedName: "caCertResourceId", + type: { + name: "String" + } + } } } }; @@ -5977,6 +6430,12 @@ export const AcceleratorBasicAuthSetting: coreClient.CompositeMapper = { AcceleratorAuthSetting.type.polymorphicDiscriminator, modelProperties: { ...AcceleratorAuthSetting.type.modelProperties, + caCertResourceId: { + serializedName: "caCertResourceId", + type: { + name: "String" + } + }, username: { serializedName: "username", required: true, @@ -6135,6 +6594,23 @@ export const DevToolPortalResource: coreClient.CompositeMapper = { } }; +export const ContainerRegistryResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ContainerRegistryProperties" + } + } + } + } +}; + export const BuildService: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6659,13 +7135,60 @@ export const NetCoreZipUploadedUserSourceInfo: coreClient.CompositeMapper = { } }; +export const BuildServiceDeleteBuildHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildServiceDeleteBuildHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const GatewaysUpdateCapacityHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewaysUpdateCapacityHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const GatewaysRestartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewaysRestartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { + ContainerRegistryCredentials: ContainerRegistryCredentials, CustomPersistentDiskProperties: CustomPersistentDiskProperties, StorageProperties: StorageProperties, CertificateProperties: CertificateProperties, UserSourceInfo: UserSourceInfo, ProbeAction: ProbeAction, AcceleratorAuthSetting: AcceleratorAuthSetting, + "ContainerRegistryCredentials.BasicAuth": ContainerRegistryBasicCredentials, "CustomPersistentDiskProperties.AzureFileVolume": AzureFileVolume, "StorageProperties.StorageAccount": StorageAccount, "CertificateProperties.KeyVaultCertificate": KeyVaultCertificateProperties, diff --git a/sdk/appplatform/arm-appplatform/src/models/parameters.ts b/sdk/appplatform/arm-appplatform/src/models/parameters.ts index c87db12761d4..e5c87eb59e9c 100644 --- a/sdk/appplatform/arm-appplatform/src/models/parameters.ts +++ b/sdk/appplatform/arm-appplatform/src/models/parameters.ts @@ -21,6 +21,8 @@ import { ConfigurationServiceSettings as ConfigurationServiceSettingsMapper, ApplicationLiveViewResource as ApplicationLiveViewResourceMapper, DevToolPortalResource as DevToolPortalResourceMapper, + ContainerRegistryResource as ContainerRegistryResourceMapper, + BuildService as BuildServiceMapper, Build as BuildMapper, BuildpackBindingResource as BuildpackBindingResourceMapper, BuilderResource as BuilderResourceMapper, @@ -37,6 +39,7 @@ import { RemoteDebuggingPayload as RemoteDebuggingPayloadMapper, DiagnosticParameters as DiagnosticParametersMapper, GatewayResource as GatewayResourceMapper, + SkuObject as SkuObjectMapper, GatewayRouteConfigResource as GatewayRouteConfigResourceMapper, GatewayCustomDomainResource as GatewayCustomDomainResourceMapper, ApiPortalResource as ApiPortalResourceMapper, @@ -73,7 +76,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01-preview", + defaultValue: "2023-03-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -107,6 +110,9 @@ export const resourceGroupName: OperationURLParameter = { export const serviceName: OperationURLParameter = { parameterPath: "serviceName", mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9-]*[a-z0-9]$") + }, serializedName: "serviceName", required: true, type: { @@ -239,6 +245,25 @@ export const devToolPortalResource: OperationParameter = { mapper: DevToolPortalResourceMapper }; +export const containerRegistryName: OperationURLParameter = { + parameterPath: "containerRegistryName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9-]*[a-z0-9]$") + }, + serializedName: "containerRegistryName", + required: true, + type: { + name: "String" + } + } +}; + +export const containerRegistryResource: OperationParameter = { + parameterPath: "containerRegistryResource", + mapper: ContainerRegistryResourceMapper +}; + export const buildServiceName: OperationURLParameter = { parameterPath: "buildServiceName", mapper: { @@ -250,6 +275,11 @@ export const buildServiceName: OperationURLParameter = { } }; +export const buildService: OperationParameter = { + parameterPath: "buildService", + mapper: BuildServiceMapper +}; + export const buildName: OperationURLParameter = { parameterPath: "buildName", mapper: { @@ -497,6 +527,9 @@ export const diagnosticParameters: OperationParameter = { export const gatewayName: OperationURLParameter = { parameterPath: "gatewayName", mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9]*$") + }, serializedName: "gatewayName", required: true, type: { @@ -510,6 +543,11 @@ export const gatewayResource: OperationParameter = { mapper: GatewayResourceMapper }; +export const gatewayCapacityResource: OperationParameter = { + parameterPath: "gatewayCapacityResource", + mapper: SkuObjectMapper +}; + export const routeConfigName: OperationURLParameter = { parameterPath: "routeConfigName", mapper: { diff --git a/sdk/appplatform/arm-appplatform/src/operations/apiPortalCustomDomains.ts b/sdk/appplatform/arm-appplatform/src/operations/apiPortalCustomDomains.ts index 970f3306476a..fa75f88b4ed8 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/apiPortalCustomDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/apiPortalCustomDomains.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ApiPortalCustomDomainResource, ApiPortalCustomDomainsListNextOptionalParams, @@ -175,8 +179,8 @@ export class ApiPortalCustomDomainsImpl implements ApiPortalCustomDomains { apiPortalCustomDomainResource: ApiPortalCustomDomainResource, options?: ApiPortalCustomDomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApiPortalCustomDomainsCreateOrUpdateResponse > > { @@ -186,7 +190,7 @@ export class ApiPortalCustomDomainsImpl implements ApiPortalCustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -219,9 +223,9 @@ export class ApiPortalCustomDomainsImpl implements ApiPortalCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, apiPortalName, @@ -229,10 +233,13 @@ export class ApiPortalCustomDomainsImpl implements ApiPortalCustomDomains { apiPortalCustomDomainResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiPortalCustomDomainsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -283,14 +290,14 @@ export class ApiPortalCustomDomainsImpl implements ApiPortalCustomDomains { apiPortalName: string, domainName: string, options?: ApiPortalCustomDomainsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -323,13 +330,19 @@ export class ApiPortalCustomDomainsImpl implements ApiPortalCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, apiPortalName, domainName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + apiPortalName, + domainName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/apiPortals.ts b/sdk/appplatform/arm-appplatform/src/operations/apiPortals.ts index fb23dd3543e0..748e63b0e994 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/apiPortals.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/apiPortals.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ApiPortalResource, ApiPortalsListNextOptionalParams, @@ -157,8 +161,8 @@ export class ApiPortalsImpl implements ApiPortals { apiPortalResource: ApiPortalResource, options?: ApiPortalsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApiPortalsCreateOrUpdateResponse > > { @@ -168,7 +172,7 @@ export class ApiPortalsImpl implements ApiPortals { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -201,19 +205,22 @@ export class ApiPortalsImpl implements ApiPortals { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, apiPortalName, apiPortalResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApiPortalsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -259,14 +266,14 @@ export class ApiPortalsImpl implements ApiPortals { serviceName: string, apiPortalName: string, options?: ApiPortalsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -299,13 +306,13 @@ export class ApiPortalsImpl implements ApiPortals { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, apiPortalName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, apiPortalName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/applicationAccelerators.ts b/sdk/appplatform/arm-appplatform/src/operations/applicationAccelerators.ts index 2190b9ec764f..9518d607e2b7 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/applicationAccelerators.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/applicationAccelerators.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ApplicationAcceleratorResource, ApplicationAcceleratorsListNextOptionalParams, @@ -172,8 +176,8 @@ export class ApplicationAcceleratorsImpl implements ApplicationAccelerators { applicationAcceleratorResource: ApplicationAcceleratorResource, options?: ApplicationAcceleratorsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApplicationAcceleratorsCreateOrUpdateResponse > > { @@ -183,7 +187,7 @@ export class ApplicationAcceleratorsImpl implements ApplicationAccelerators { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -216,19 +220,22 @@ export class ApplicationAcceleratorsImpl implements ApplicationAccelerators { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, applicationAcceleratorName, applicationAcceleratorResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApplicationAcceleratorsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -274,14 +281,14 @@ export class ApplicationAcceleratorsImpl implements ApplicationAccelerators { serviceName: string, applicationAcceleratorName: string, options?: ApplicationAcceleratorsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -314,13 +321,18 @@ export class ApplicationAcceleratorsImpl implements ApplicationAccelerators { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, applicationAcceleratorName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + applicationAcceleratorName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/applicationLiveViews.ts b/sdk/appplatform/arm-appplatform/src/operations/applicationLiveViews.ts index 1890e6d1a053..fa9b43985b97 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/applicationLiveViews.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/applicationLiveViews.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ApplicationLiveViewResource, ApplicationLiveViewsListNextOptionalParams, @@ -172,8 +176,8 @@ export class ApplicationLiveViewsImpl implements ApplicationLiveViews { applicationLiveViewResource: ApplicationLiveViewResource, options?: ApplicationLiveViewsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApplicationLiveViewsCreateOrUpdateResponse > > { @@ -183,7 +187,7 @@ export class ApplicationLiveViewsImpl implements ApplicationLiveViews { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -216,19 +220,22 @@ export class ApplicationLiveViewsImpl implements ApplicationLiveViews { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, applicationLiveViewName, applicationLiveViewResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ApplicationLiveViewsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -274,14 +281,14 @@ export class ApplicationLiveViewsImpl implements ApplicationLiveViews { serviceName: string, applicationLiveViewName: string, options?: ApplicationLiveViewsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -314,13 +321,18 @@ export class ApplicationLiveViewsImpl implements ApplicationLiveViews { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, applicationLiveViewName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + applicationLiveViewName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/apps.ts b/sdk/appplatform/arm-appplatform/src/operations/apps.ts index dd4a6c42719d..57ce9317aa6e 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/apps.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/apps.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { AppResource, AppsListNextOptionalParams, @@ -164,8 +168,8 @@ export class AppsImpl implements Apps { appResource: AppResource, options?: AppsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AppsCreateOrUpdateResponse > > { @@ -175,7 +179,7 @@ export class AppsImpl implements Apps { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -208,13 +212,16 @@ export class AppsImpl implements Apps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, appResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, appResource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + AppsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -260,14 +267,14 @@ export class AppsImpl implements Apps { serviceName: string, appName: string, options?: AppsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -300,13 +307,13 @@ export class AppsImpl implements Apps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -352,7 +359,7 @@ export class AppsImpl implements Apps { appResource: AppResource, options?: AppsUpdateOptionalParams ): Promise< - PollerLike, AppsUpdateResponse> + SimplePollerLike, AppsUpdateResponse> > { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -360,7 +367,7 @@ export class AppsImpl implements Apps { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -393,13 +400,16 @@ export class AppsImpl implements Apps { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, appResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, appResource, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + AppsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -486,8 +496,8 @@ export class AppsImpl implements Apps { activeDeploymentCollection: ActiveDeploymentCollection, options?: AppsSetActiveDeploymentsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AppsSetActiveDeploymentsResponse > > { @@ -497,7 +507,7 @@ export class AppsImpl implements Apps { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -530,19 +540,22 @@ export class AppsImpl implements Apps { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, activeDeploymentCollection, options }, - setActiveDeploymentsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: setActiveDeploymentsOperationSpec + }); + const poller = await createHttpPoller< + AppsSetActiveDeploymentsResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/bindings.ts b/sdk/appplatform/arm-appplatform/src/operations/bindings.ts index 6a6dea663463..72136c4d05c1 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/bindings.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/bindings.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { BindingResource, BindingsListNextOptionalParams, @@ -177,8 +181,8 @@ export class BindingsImpl implements Bindings { bindingResource: BindingResource, options?: BindingsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BindingsCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class BindingsImpl implements Bindings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,9 +225,9 @@ export class BindingsImpl implements Bindings { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -231,10 +235,13 @@ export class BindingsImpl implements Bindings { bindingResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BindingsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -285,14 +292,14 @@ export class BindingsImpl implements Bindings { appName: string, bindingName: string, options?: BindingsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,13 +332,13 @@ export class BindingsImpl implements Bindings { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, bindingName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, bindingName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -382,8 +389,8 @@ export class BindingsImpl implements Bindings { bindingResource: BindingResource, options?: BindingsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BindingsUpdateResponse > > { @@ -393,7 +400,7 @@ export class BindingsImpl implements Bindings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -426,9 +433,9 @@ export class BindingsImpl implements Bindings { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -436,10 +443,13 @@ export class BindingsImpl implements Bindings { bindingResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + BindingsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/buildServiceAgentPool.ts b/sdk/appplatform/arm-appplatform/src/operations/buildServiceAgentPool.ts index 20a83c8364e5..03c281c03711 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/buildServiceAgentPool.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/buildServiceAgentPool.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { BuildServiceAgentPoolResource, BuildServiceAgentPoolListNextOptionalParams, @@ -200,8 +204,8 @@ export class BuildServiceAgentPoolImpl implements BuildServiceAgentPool { agentPoolResource: BuildServiceAgentPoolResource, options?: BuildServiceAgentPoolUpdatePutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BuildServiceAgentPoolUpdatePutResponse > > { @@ -211,7 +215,7 @@ export class BuildServiceAgentPoolImpl implements BuildServiceAgentPool { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -244,9 +248,9 @@ export class BuildServiceAgentPoolImpl implements BuildServiceAgentPool { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, buildServiceName, @@ -254,10 +258,13 @@ export class BuildServiceAgentPoolImpl implements BuildServiceAgentPool { agentPoolResource, options }, - updatePutOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updatePutOperationSpec + }); + const poller = await createHttpPoller< + BuildServiceAgentPoolUpdatePutResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/buildServiceBuilder.ts b/sdk/appplatform/arm-appplatform/src/operations/buildServiceBuilder.ts index f66d1cc2b8c7..7add0a5ec815 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/buildServiceBuilder.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/buildServiceBuilder.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { BuilderResource, BuildServiceBuilderListNextOptionalParams, @@ -183,8 +187,8 @@ export class BuildServiceBuilderImpl implements BuildServiceBuilder { builderResource: BuilderResource, options?: BuildServiceBuilderCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BuildServiceBuilderCreateOrUpdateResponse > > { @@ -194,7 +198,7 @@ export class BuildServiceBuilderImpl implements BuildServiceBuilder { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -227,9 +231,9 @@ export class BuildServiceBuilderImpl implements BuildServiceBuilder { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, buildServiceName, @@ -237,10 +241,13 @@ export class BuildServiceBuilderImpl implements BuildServiceBuilder { builderResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildServiceBuilderCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -291,14 +298,14 @@ export class BuildServiceBuilderImpl implements BuildServiceBuilder { buildServiceName: string, builderName: string, options?: BuildServiceBuilderDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -331,19 +338,19 @@ export class BuildServiceBuilderImpl implements BuildServiceBuilder { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, buildServiceName, builderName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/buildServiceOperations.ts b/sdk/appplatform/arm-appplatform/src/operations/buildServiceOperations.ts index 090d9a8d1dbd..c356e97d60a0 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/buildServiceOperations.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/buildServiceOperations.ts @@ -13,6 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { BuildService, BuildServiceListBuildServicesNextOptionalParams, @@ -28,10 +34,13 @@ import { BuildServiceListBuildResultsResponse, BuildServiceGetBuildServiceOptionalParams, BuildServiceGetBuildServiceResponse, + BuildServiceCreateOrUpdateOptionalParams, + BuildServiceCreateOrUpdateResponse, BuildServiceGetBuildOptionalParams, BuildServiceGetBuildResponse, BuildServiceCreateOrUpdateBuildOptionalParams, BuildServiceCreateOrUpdateBuildResponse, + BuildServiceDeleteBuildOptionalParams, BuildServiceGetBuildResultOptionalParams, BuildServiceGetBuildResultResponse, BuildServiceGetBuildResultLogOptionalParams, @@ -384,6 +393,115 @@ export class BuildServiceOperationsImpl implements BuildServiceOperations { ); } + /** + * Create a build service 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. + * @param buildServiceName The name of the build service resource. + * @param buildService Parameters for the create operation + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildService: BuildService, + options?: BuildServiceCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildServiceCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + buildServiceName, + buildService, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildServiceCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Create a build service 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. + * @param buildServiceName The name of the build service resource. + * @param buildService Parameters for the create operation + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildService: BuildService, + options?: BuildServiceCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + buildServiceName, + buildService, + options + ); + return poller.pollUntilDone(); + } + /** * List KPack builds. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -457,6 +575,107 @@ export class BuildServiceOperationsImpl implements BuildServiceOperations { ); } + /** + * delete a KPack build. + * @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. + * @param buildServiceName The name of the build service resource. + * @param buildName The name of the build resource. + * @param options The options parameters. + */ + async beginDeleteBuild( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildName: string, + options?: BuildServiceDeleteBuildOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + buildServiceName, + buildName, + options + }, + spec: deleteBuildOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * delete a KPack build. + * @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. + * @param buildServiceName The name of the build service resource. + * @param buildName The name of the build resource. + * @param options The options parameters. + */ + async beginDeleteBuildAndWait( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildName: string, + options?: BuildServiceDeleteBuildOptionalParams + ): Promise { + const poller = await this.beginDeleteBuild( + resourceGroupName, + serviceName, + buildServiceName, + buildName, + options + ); + return poller.pollUntilDone(); + } + /** * List KPack build results. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -772,6 +991,40 @@ const getBuildServiceOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuildService + }, + 201: { + bodyMapper: Mappers.BuildService + }, + 202: { + bodyMapper: Mappers.BuildService + }, + 204: { + bodyMapper: Mappers.BuildService + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.buildService, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.buildServiceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listBuildsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds", @@ -848,6 +1101,31 @@ const createOrUpdateBuildOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const deleteBuildOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.buildServiceName, + Parameters.buildName + ], + headerParameters: [Parameters.accept], + serializer +}; const listBuildResultsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builds/{buildName}/results", diff --git a/sdk/appplatform/arm-appplatform/src/operations/buildpackBinding.ts b/sdk/appplatform/arm-appplatform/src/operations/buildpackBinding.ts index 4f125de999e3..873277df6ccf 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/buildpackBinding.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/buildpackBinding.ts @@ -13,10 +13,17 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { BuildpackBindingResource, + BuildpackBindingListForClusterNextOptionalParams, + BuildpackBindingListForClusterOptionalParams, + BuildpackBindingListForClusterResponse, BuildpackBindingListNextOptionalParams, BuildpackBindingListOptionalParams, BuildpackBindingListResponse, @@ -25,6 +32,7 @@ import { BuildpackBindingCreateOrUpdateOptionalParams, BuildpackBindingCreateOrUpdateResponse, BuildpackBindingDeleteOptionalParams, + BuildpackBindingListForClusterNextResponse, BuildpackBindingListNextResponse } from "../models"; @@ -41,6 +49,91 @@ export class BuildpackBindingImpl implements BuildpackBinding { this.client = client; } + /** + * Get collection of buildpack bindings under all builders. + * @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. + * @param options The options parameters. + */ + public listForCluster( + resourceGroupName: string, + serviceName: string, + options?: BuildpackBindingListForClusterOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listForClusterPagingAll( + resourceGroupName, + serviceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listForClusterPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; + } + + private async *listForClusterPagingPage( + resourceGroupName: string, + serviceName: string, + options?: BuildpackBindingListForClusterOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildpackBindingListForClusterResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listForCluster( + resourceGroupName, + serviceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listForClusterNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listForClusterPagingAll( + resourceGroupName: string, + serviceName: string, + options?: BuildpackBindingListForClusterOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listForClusterPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } + } + /** * Handles requests to list all buildpack bindings in a builder. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -144,6 +237,24 @@ export class BuildpackBindingImpl implements BuildpackBinding { } } + /** + * Get collection of buildpack bindings under all builders. + * @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. + * @param options The options parameters. + */ + private _listForCluster( + resourceGroupName: string, + serviceName: string, + options?: BuildpackBindingListForClusterOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listForClusterOperationSpec + ); + } + /** * Get a buildpack binding by name. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -195,8 +306,8 @@ export class BuildpackBindingImpl implements BuildpackBinding { buildpackBinding: BuildpackBindingResource, options?: BuildpackBindingCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BuildpackBindingCreateOrUpdateResponse > > { @@ -206,7 +317,7 @@ export class BuildpackBindingImpl implements BuildpackBinding { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -239,9 +350,9 @@ export class BuildpackBindingImpl implements BuildpackBinding { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, buildServiceName, @@ -250,10 +361,13 @@ export class BuildpackBindingImpl implements BuildpackBinding { buildpackBinding, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + BuildpackBindingCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -309,14 +423,14 @@ export class BuildpackBindingImpl implements BuildpackBinding { builderName: string, buildpackBindingName: string, options?: BuildpackBindingDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -349,9 +463,9 @@ export class BuildpackBindingImpl implements BuildpackBinding { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, buildServiceName, @@ -359,10 +473,10 @@ export class BuildpackBindingImpl implements BuildpackBinding { buildpackBindingName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -426,6 +540,26 @@ export class BuildpackBindingImpl implements BuildpackBinding { ); } + /** + * ListForClusterNext + * @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. + * @param nextLink The nextLink from the previous successful call to the ListForCluster method. + * @param options The options parameters. + */ + private _listForClusterNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: BuildpackBindingListForClusterNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listForClusterNextOperationSpec + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -460,6 +594,28 @@ export class BuildpackBindingImpl implements BuildpackBinding { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listForClusterOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildpackBindings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildpackBindingResourceCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/buildServices/{buildServiceName}/builders/{builderName}/buildpackBindings/{buildpackBindingName}", @@ -571,6 +727,27 @@ const listOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listForClusterNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildpackBindingResourceCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/appplatform/arm-appplatform/src/operations/certificates.ts b/sdk/appplatform/arm-appplatform/src/operations/certificates.ts index f56a0f557801..2ccff07f6af3 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/certificates.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/certificates.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { CertificateResource, CertificatesListNextOptionalParams, @@ -154,8 +158,8 @@ export class CertificatesImpl implements Certificates { certificateResource: CertificateResource, options?: CertificatesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CertificatesCreateOrUpdateResponse > > { @@ -165,7 +169,7 @@ export class CertificatesImpl implements Certificates { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -198,19 +202,22 @@ export class CertificatesImpl implements Certificates { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, certificateName, certificateResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CertificatesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -256,14 +263,14 @@ export class CertificatesImpl implements Certificates { serviceName: string, certificateName: string, options?: CertificatesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -296,13 +303,13 @@ export class CertificatesImpl implements Certificates { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, certificateName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, certificateName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/configServers.ts b/sdk/appplatform/arm-appplatform/src/operations/configServers.ts index e8680612e46b..f97f2f4f7fb8 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/configServers.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/configServers.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ConfigServersGetOptionalParams, ConfigServersGetResponse, @@ -70,8 +74,8 @@ export class ConfigServersImpl implements ConfigServers { configServerResource: ConfigServerResource, options?: ConfigServersUpdatePutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigServersUpdatePutResponse > > { @@ -81,7 +85,7 @@ export class ConfigServersImpl implements ConfigServers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -114,13 +118,16 @@ export class ConfigServersImpl implements ConfigServers { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, configServerResource, options }, - updatePutOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, configServerResource, options }, + spec: updatePutOperationSpec + }); + const poller = await createHttpPoller< + ConfigServersUpdatePutResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -164,8 +171,8 @@ export class ConfigServersImpl implements ConfigServers { configServerResource: ConfigServerResource, options?: ConfigServersUpdatePatchOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigServersUpdatePatchResponse > > { @@ -175,7 +182,7 @@ export class ConfigServersImpl implements ConfigServers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -208,13 +215,16 @@ export class ConfigServersImpl implements ConfigServers { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, configServerResource, options }, - updatePatchOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, configServerResource, options }, + spec: updatePatchOperationSpec + }); + const poller = await createHttpPoller< + ConfigServersUpdatePatchResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -258,8 +268,8 @@ export class ConfigServersImpl implements ConfigServers { configServerSettings: ConfigServerSettings, options?: ConfigServersValidateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigServersValidateResponse > > { @@ -269,7 +279,7 @@ export class ConfigServersImpl implements ConfigServers { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -302,15 +312,18 @@ export class ConfigServersImpl implements ConfigServers { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, configServerSettings, options }, - validateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, configServerSettings, options }, + spec: validateOperationSpec + }); + const poller = await createHttpPoller< + ConfigServersValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/appplatform/arm-appplatform/src/operations/configurationServices.ts b/sdk/appplatform/arm-appplatform/src/operations/configurationServices.ts index 34fc13bfc10d..6d84f7ecfa52 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/configurationServices.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/configurationServices.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ConfigurationServiceResource, ConfigurationServicesListNextOptionalParams, @@ -158,8 +162,8 @@ export class ConfigurationServicesImpl implements ConfigurationServices { configurationServiceResource: ConfigurationServiceResource, options?: ConfigurationServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigurationServicesCreateOrUpdateResponse > > { @@ -169,7 +173,7 @@ export class ConfigurationServicesImpl implements ConfigurationServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -202,19 +206,22 @@ export class ConfigurationServicesImpl implements ConfigurationServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, configurationServiceName, configurationServiceResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ConfigurationServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -261,14 +268,14 @@ export class ConfigurationServicesImpl implements ConfigurationServices { serviceName: string, configurationServiceName: string, options?: ConfigurationServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -301,13 +308,18 @@ export class ConfigurationServicesImpl implements ConfigurationServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, configurationServiceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + configurationServiceName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -371,8 +383,8 @@ export class ConfigurationServicesImpl implements ConfigurationServices { settings: ConfigurationServiceSettings, options?: ConfigurationServicesValidateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigurationServicesValidateResponse > > { @@ -382,7 +394,7 @@ export class ConfigurationServicesImpl implements ConfigurationServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -415,21 +427,24 @@ export class ConfigurationServicesImpl implements ConfigurationServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, configurationServiceName, settings, options }, - validateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: validateOperationSpec + }); + const poller = await createHttpPoller< + ConfigurationServicesValidateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/appplatform/arm-appplatform/src/operations/containerRegistries.ts b/sdk/appplatform/arm-appplatform/src/operations/containerRegistries.ts new file mode 100644 index 000000000000..002170e1704a --- /dev/null +++ b/sdk/appplatform/arm-appplatform/src/operations/containerRegistries.ts @@ -0,0 +1,393 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerRegistries } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { AppPlatformManagementClient } from "../appPlatformManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ContainerRegistryResource, + ContainerRegistriesListNextOptionalParams, + ContainerRegistriesListOptionalParams, + ContainerRegistriesListResponse, + ContainerRegistriesGetOptionalParams, + ContainerRegistriesGetResponse, + ContainerRegistriesCreateOrUpdateOptionalParams, + ContainerRegistriesCreateOrUpdateResponse, + ContainerRegistriesListNextResponse +} from "../models"; + +/// +/** Class containing ContainerRegistries operations. */ +export class ContainerRegistriesImpl implements ContainerRegistries { + private readonly client: AppPlatformManagementClient; + + /** + * Initialize a new instance of the class ContainerRegistries class. + * @param client Reference to the service client + */ + constructor(client: AppPlatformManagementClient) { + this.client = client; + } + + /** + * List container registries 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. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + serviceName: string, + options?: ContainerRegistriesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, serviceName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + serviceName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + serviceName: string, + options?: ContainerRegistriesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ContainerRegistriesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, serviceName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serviceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + serviceName: string, + options?: ContainerRegistriesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + serviceName, + options + )) { + yield* page; + } + } + + /** + * List container registries 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. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + serviceName: string, + options?: ContainerRegistriesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, options }, + listOperationSpec + ); + } + + /** + * Get the container registries 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. + * @param containerRegistryName The name of the container registry. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + containerRegistryName: string, + options?: ContainerRegistriesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, containerRegistryName, options }, + getOperationSpec + ); + } + + /** + * Create or update container registry 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. + * @param containerRegistryName The name of the container registry. + * @param containerRegistryResource Parameters for the create or update operation + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + containerRegistryName: string, + containerRegistryResource: ContainerRegistryResource, + options?: ContainerRegistriesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerRegistriesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + containerRegistryName, + containerRegistryResource, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ContainerRegistriesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Create or update container registry 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. + * @param containerRegistryName The name of the container registry. + * @param containerRegistryResource Parameters for the create or update operation + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + containerRegistryName: string, + containerRegistryResource: ContainerRegistryResource, + options?: ContainerRegistriesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serviceName, + containerRegistryName, + containerRegistryResource, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @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. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + serviceName: string, + nextLink: string, + options?: ContainerRegistriesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serviceName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerRegistryResourceCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerRegistryResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.containerRegistryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContainerRegistryResource + }, + 201: { + bodyMapper: Mappers.ContainerRegistryResource + }, + 202: { + bodyMapper: Mappers.ContainerRegistryResource + }, + 204: { + bodyMapper: Mappers.ContainerRegistryResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.containerRegistryResource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.containerRegistryName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerRegistryResourceCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts b/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts index df785d7cdabb..c29415fa88d5 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { CustomDomainResource, CustomDomainsListNextOptionalParams, @@ -177,8 +181,8 @@ export class CustomDomainsImpl implements CustomDomains { domainResource: CustomDomainResource, options?: CustomDomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class CustomDomainsImpl implements CustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,9 +225,9 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -231,10 +235,13 @@ export class CustomDomainsImpl implements CustomDomains { domainResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CustomDomainsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -285,14 +292,14 @@ export class CustomDomainsImpl implements CustomDomains { appName: string, domainName: string, options?: CustomDomainsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,13 +332,13 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, domainName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, domainName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -382,8 +389,8 @@ export class CustomDomainsImpl implements CustomDomains { domainResource: CustomDomainResource, options?: CustomDomainsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsUpdateResponse > > { @@ -393,7 +400,7 @@ export class CustomDomainsImpl implements CustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -426,9 +433,9 @@ export class CustomDomainsImpl implements CustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -436,10 +443,13 @@ export class CustomDomainsImpl implements CustomDomains { domainResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CustomDomainsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/customizedAccelerators.ts b/sdk/appplatform/arm-appplatform/src/operations/customizedAccelerators.ts index 3e868f31908a..dab31ced8106 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/customizedAccelerators.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/customizedAccelerators.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { CustomizedAcceleratorResource, CustomizedAcceleratorsListNextOptionalParams, @@ -204,8 +208,8 @@ export class CustomizedAcceleratorsImpl implements CustomizedAccelerators { customizedAcceleratorResource: CustomizedAcceleratorResource, options?: CustomizedAcceleratorsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomizedAcceleratorsCreateOrUpdateResponse > > { @@ -215,7 +219,7 @@ export class CustomizedAcceleratorsImpl implements CustomizedAccelerators { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -248,9 +252,9 @@ export class CustomizedAcceleratorsImpl implements CustomizedAccelerators { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, applicationAcceleratorName, @@ -258,10 +262,13 @@ export class CustomizedAcceleratorsImpl implements CustomizedAccelerators { customizedAcceleratorResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + CustomizedAcceleratorsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -312,14 +319,14 @@ export class CustomizedAcceleratorsImpl implements CustomizedAccelerators { applicationAcceleratorName: string, customizedAcceleratorName: string, options?: CustomizedAcceleratorsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -352,19 +359,19 @@ export class CustomizedAcceleratorsImpl implements CustomizedAccelerators { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, applicationAcceleratorName, customizedAcceleratorName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/deployments.ts b/sdk/appplatform/arm-appplatform/src/operations/deployments.ts index 4fdeb5d53b00..36ec2d9dc9c8 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/deployments.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/deployments.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DeploymentResource, DeploymentsListNextOptionalParams, @@ -281,8 +285,8 @@ export class DeploymentsImpl implements Deployments { deploymentResource: DeploymentResource, options?: DeploymentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsCreateOrUpdateResponse > > { @@ -292,7 +296,7 @@ export class DeploymentsImpl implements Deployments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,9 +329,9 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -335,10 +339,13 @@ export class DeploymentsImpl implements Deployments { deploymentResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DeploymentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -389,14 +396,14 @@ export class DeploymentsImpl implements Deployments { appName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -429,13 +436,19 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, deploymentName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -486,8 +499,8 @@ export class DeploymentsImpl implements Deployments { deploymentResource: DeploymentResource, options?: DeploymentsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsUpdateResponse > > { @@ -497,7 +510,7 @@ export class DeploymentsImpl implements Deployments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -530,9 +543,9 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -540,10 +553,13 @@ export class DeploymentsImpl implements Deployments { deploymentResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DeploymentsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -632,14 +648,14 @@ export class DeploymentsImpl implements Deployments { appName: string, deploymentName: string, options?: DeploymentsStartOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -672,13 +688,19 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, deploymentName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -726,14 +748,14 @@ export class DeploymentsImpl implements Deployments { appName: string, deploymentName: string, options?: DeploymentsStopOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -766,13 +788,19 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, deploymentName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -820,14 +848,14 @@ export class DeploymentsImpl implements Deployments { appName: string, deploymentName: string, options?: DeploymentsRestartOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -860,13 +888,19 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, deploymentName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -915,8 +949,8 @@ export class DeploymentsImpl implements Deployments { deploymentName: string, options?: DeploymentsEnableRemoteDebuggingOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsEnableRemoteDebuggingResponse > > { @@ -926,7 +960,7 @@ export class DeploymentsImpl implements Deployments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -959,13 +993,22 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, deploymentName, options }, - enableRemoteDebuggingOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + spec: enableRemoteDebuggingOperationSpec + }); + const poller = await createHttpPoller< + DeploymentsEnableRemoteDebuggingResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1014,8 +1057,8 @@ export class DeploymentsImpl implements Deployments { deploymentName: string, options?: DeploymentsDisableRemoteDebuggingOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsDisableRemoteDebuggingResponse > > { @@ -1025,7 +1068,7 @@ export class DeploymentsImpl implements Deployments { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1058,13 +1101,22 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, appName, deploymentName, options }, - disableRemoteDebuggingOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + spec: disableRemoteDebuggingOperationSpec + }); + const poller = await createHttpPoller< + DeploymentsDisableRemoteDebuggingResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1158,14 +1210,14 @@ export class DeploymentsImpl implements Deployments { deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateHeapDumpOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1198,9 +1250,9 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -1208,10 +1260,10 @@ export class DeploymentsImpl implements Deployments { diagnosticParameters, options }, - generateHeapDumpOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: generateHeapDumpOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1264,14 +1316,14 @@ export class DeploymentsImpl implements Deployments { deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateThreadDumpOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1304,9 +1356,9 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -1314,10 +1366,10 @@ export class DeploymentsImpl implements Deployments { diagnosticParameters, options }, - generateThreadDumpOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: generateThreadDumpOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1370,14 +1422,14 @@ export class DeploymentsImpl implements Deployments { deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsStartJFROptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1410,9 +1462,9 @@ export class DeploymentsImpl implements Deployments { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, appName, @@ -1420,10 +1472,10 @@ export class DeploymentsImpl implements Deployments { diagnosticParameters, options }, - startJFROperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: startJFROperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/devToolPortals.ts b/sdk/appplatform/arm-appplatform/src/operations/devToolPortals.ts index a4101ccc51b9..2dc26baf457b 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/devToolPortals.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/devToolPortals.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DevToolPortalResource, DevToolPortalsListNextOptionalParams, @@ -172,8 +176,8 @@ export class DevToolPortalsImpl implements DevToolPortals { devToolPortalResource: DevToolPortalResource, options?: DevToolPortalsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevToolPortalsCreateOrUpdateResponse > > { @@ -183,7 +187,7 @@ export class DevToolPortalsImpl implements DevToolPortals { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -216,19 +220,22 @@ export class DevToolPortalsImpl implements DevToolPortals { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, devToolPortalName, devToolPortalResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DevToolPortalsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -274,14 +281,14 @@ export class DevToolPortalsImpl implements DevToolPortals { serviceName: string, devToolPortalName: string, options?: DevToolPortalsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -314,13 +321,13 @@ export class DevToolPortalsImpl implements DevToolPortals { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, devToolPortalName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, devToolPortalName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/gatewayCustomDomains.ts b/sdk/appplatform/arm-appplatform/src/operations/gatewayCustomDomains.ts index b47a25e328a4..cc8fef5b2e0f 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/gatewayCustomDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/gatewayCustomDomains.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { GatewayCustomDomainResource, GatewayCustomDomainsListNextOptionalParams, @@ -176,8 +180,8 @@ export class GatewayCustomDomainsImpl implements GatewayCustomDomains { gatewayCustomDomainResource: GatewayCustomDomainResource, options?: GatewayCustomDomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GatewayCustomDomainsCreateOrUpdateResponse > > { @@ -187,7 +191,7 @@ export class GatewayCustomDomainsImpl implements GatewayCustomDomains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,9 +224,9 @@ export class GatewayCustomDomainsImpl implements GatewayCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, gatewayName, @@ -230,10 +234,13 @@ export class GatewayCustomDomainsImpl implements GatewayCustomDomains { gatewayCustomDomainResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GatewayCustomDomainsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -285,14 +292,14 @@ export class GatewayCustomDomainsImpl implements GatewayCustomDomains { gatewayName: string, domainName: string, options?: GatewayCustomDomainsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -325,13 +332,19 @@ export class GatewayCustomDomainsImpl implements GatewayCustomDomains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, gatewayName, domainName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + gatewayName, + domainName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/gatewayRouteConfigs.ts b/sdk/appplatform/arm-appplatform/src/operations/gatewayRouteConfigs.ts index 1ee5dac339f0..914d3b31004d 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/gatewayRouteConfigs.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/gatewayRouteConfigs.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { GatewayRouteConfigResource, GatewayRouteConfigsListNextOptionalParams, @@ -177,8 +181,8 @@ export class GatewayRouteConfigsImpl implements GatewayRouteConfigs { gatewayRouteConfigResource: GatewayRouteConfigResource, options?: GatewayRouteConfigsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GatewayRouteConfigsCreateOrUpdateResponse > > { @@ -188,7 +192,7 @@ export class GatewayRouteConfigsImpl implements GatewayRouteConfigs { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,9 +225,9 @@ export class GatewayRouteConfigsImpl implements GatewayRouteConfigs { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, gatewayName, @@ -231,10 +235,13 @@ export class GatewayRouteConfigsImpl implements GatewayRouteConfigs { gatewayRouteConfigResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GatewayRouteConfigsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -287,14 +294,14 @@ export class GatewayRouteConfigsImpl implements GatewayRouteConfigs { gatewayName: string, routeConfigName: string, options?: GatewayRouteConfigsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -327,13 +334,19 @@ export class GatewayRouteConfigsImpl implements GatewayRouteConfigs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, gatewayName, routeConfigName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + gatewayName, + routeConfigName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/gateways.ts b/sdk/appplatform/arm-appplatform/src/operations/gateways.ts index d7be0cfd3150..c1beeeb2f74f 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/gateways.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/gateways.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { GatewayResource, GatewaysListNextOptionalParams, @@ -24,9 +28,13 @@ import { GatewaysGetResponse, GatewaysCreateOrUpdateOptionalParams, GatewaysCreateOrUpdateResponse, + SkuObject, + GatewaysUpdateCapacityOptionalParams, + GatewaysUpdateCapacityResponse, GatewaysDeleteOptionalParams, GatewaysListEnvSecretsOptionalParams, GatewaysListEnvSecretsResponse, + GatewaysRestartOptionalParams, CustomDomainValidatePayload, GatewaysValidateDomainOptionalParams, GatewaysValidateDomainResponse, @@ -159,8 +167,8 @@ export class GatewaysImpl implements Gateways { gatewayResource: GatewayResource, options?: GatewaysCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GatewaysCreateOrUpdateResponse > > { @@ -170,7 +178,7 @@ export class GatewaysImpl implements Gateways { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -203,13 +211,22 @@ export class GatewaysImpl implements Gateways { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, gatewayName, gatewayResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + gatewayName, + gatewayResource, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + GatewaysCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -242,6 +259,115 @@ export class GatewaysImpl implements Gateways { return poller.pollUntilDone(); } + /** + * Operation to update an exiting Spring Cloud Gateway capacity. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param gatewayCapacityResource The gateway capacity for the update operation + * @param options The options parameters. + */ + async beginUpdateCapacity( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + gatewayCapacityResource: SkuObject, + options?: GatewaysUpdateCapacityOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GatewaysUpdateCapacityResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + gatewayName, + gatewayCapacityResource, + options + }, + spec: updateCapacityOperationSpec + }); + const poller = await createHttpPoller< + GatewaysUpdateCapacityResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Operation to update an exiting Spring Cloud Gateway capacity. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param gatewayCapacityResource The gateway capacity for the update operation + * @param options The options parameters. + */ + async beginUpdateCapacityAndWait( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + gatewayCapacityResource: SkuObject, + options?: GatewaysUpdateCapacityOptionalParams + ): Promise { + const poller = await this.beginUpdateCapacity( + resourceGroupName, + serviceName, + gatewayName, + gatewayCapacityResource, + options + ); + return poller.pollUntilDone(); + } + /** * Disable the default Spring Cloud Gateway. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -255,14 +381,14 @@ export class GatewaysImpl implements Gateways { serviceName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -295,13 +421,13 @@ export class GatewaysImpl implements Gateways { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, gatewayName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, gatewayName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -351,6 +477,96 @@ export class GatewaysImpl implements Gateways { ); } + /** + * Restart the Spring Cloud Gateway. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param options The options parameters. + */ + async beginRestart( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + options?: GatewaysRestartOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, gatewayName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Restart the Spring Cloud Gateway. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param options The options parameters. + */ + async beginRestartAndWait( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + options?: GatewaysRestartOptionalParams + ): Promise { + const poller = await this.beginRestart( + resourceGroupName, + serviceName, + gatewayName, + options + ); + return poller.pollUntilDone(); + } + /** * Handles requests to list all resources in a Service. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -471,6 +687,40 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const updateCapacityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.GatewayResource + }, + 201: { + bodyMapper: Mappers.GatewayResource + }, + 202: { + bodyMapper: Mappers.GatewayResource + }, + 204: { + bodyMapper: Mappers.GatewayResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.gatewayCapacityResource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.gatewayName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const deleteOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}", @@ -520,6 +770,30 @@ const listEnvSecretsOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const restartOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways/{gatewayName}/restart", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.gatewayName + ], + headerParameters: [Parameters.accept], + serializer +}; const listOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/gateways", diff --git a/sdk/appplatform/arm-appplatform/src/operations/index.ts b/sdk/appplatform/arm-appplatform/src/operations/index.ts index c9b971fc027b..5ad18dc2229d 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/index.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/index.ts @@ -12,6 +12,7 @@ export * from "./configurationServices"; export * from "./serviceRegistries"; export * from "./applicationLiveViews"; export * from "./devToolPortals"; +export * from "./containerRegistries"; export * from "./buildServiceOperations"; export * from "./buildpackBinding"; export * from "./buildServiceBuilder"; diff --git a/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts b/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts index 3d0a32ba97a1..617cc508234f 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MonitoringSettingsGetOptionalParams, MonitoringSettingsGetResponse, @@ -67,8 +71,8 @@ export class MonitoringSettingsImpl implements MonitoringSettings { monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MonitoringSettingsUpdatePutResponse > > { @@ -78,7 +82,7 @@ export class MonitoringSettingsImpl implements MonitoringSettings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -111,13 +115,21 @@ export class MonitoringSettingsImpl implements MonitoringSettings { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, monitoringSettingResource, options }, - updatePutOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + monitoringSettingResource, + options + }, + spec: updatePutOperationSpec + }); + const poller = await createHttpPoller< + MonitoringSettingsUpdatePutResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -161,8 +173,8 @@ export class MonitoringSettingsImpl implements MonitoringSettings { monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePatchOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MonitoringSettingsUpdatePatchResponse > > { @@ -172,7 +184,7 @@ export class MonitoringSettingsImpl implements MonitoringSettings { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -205,13 +217,21 @@ export class MonitoringSettingsImpl implements MonitoringSettings { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, monitoringSettingResource, options }, - updatePatchOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + monitoringSettingResource, + options + }, + spec: updatePatchOperationSpec + }); + const poller = await createHttpPoller< + MonitoringSettingsUpdatePatchResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/predefinedAccelerators.ts b/sdk/appplatform/arm-appplatform/src/operations/predefinedAccelerators.ts index fe1df0e58911..aede8603928e 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/predefinedAccelerators.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/predefinedAccelerators.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PredefinedAcceleratorResource, PredefinedAcceleratorsListNextOptionalParams, @@ -197,14 +201,14 @@ export class PredefinedAcceleratorsImpl implements PredefinedAccelerators { applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsDisableOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -237,19 +241,19 @@ export class PredefinedAcceleratorsImpl implements PredefinedAccelerators { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options }, - disableOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: disableOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -297,14 +301,14 @@ export class PredefinedAcceleratorsImpl implements PredefinedAccelerators { applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsEnableOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -337,19 +341,19 @@ export class PredefinedAcceleratorsImpl implements PredefinedAccelerators { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, applicationAcceleratorName, predefinedAcceleratorName, options }, - enableOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: enableOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/serviceRegistries.ts b/sdk/appplatform/arm-appplatform/src/operations/serviceRegistries.ts index 1b3bade11cec..c438e5bbc349 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/serviceRegistries.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/serviceRegistries.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ServiceRegistryResource, ServiceRegistriesListNextOptionalParams, @@ -152,8 +156,8 @@ export class ServiceRegistriesImpl implements ServiceRegistries { serviceRegistryName: string, options?: ServiceRegistriesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServiceRegistriesCreateOrUpdateResponse > > { @@ -163,7 +167,7 @@ export class ServiceRegistriesImpl implements ServiceRegistries { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -196,13 +200,16 @@ export class ServiceRegistriesImpl implements ServiceRegistries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, serviceRegistryName, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, serviceRegistryName, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ServiceRegistriesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -245,14 +252,14 @@ export class ServiceRegistriesImpl implements ServiceRegistries { serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -285,13 +292,13 @@ export class ServiceRegistriesImpl implements ServiceRegistries { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, serviceRegistryName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, serviceRegistryName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/services.ts b/sdk/appplatform/arm-appplatform/src/operations/services.ts index efd3581e914f..3334218c70c8 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/services.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/services.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ServiceResource, ServicesListBySubscriptionNextOptionalParams, @@ -209,8 +213,8 @@ export class ServicesImpl implements Services { resource: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > > { @@ -220,7 +224,7 @@ export class ServicesImpl implements Services { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -253,13 +257,16 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, resource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, resource, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -300,14 +307,14 @@ export class ServicesImpl implements Services { resourceGroupName: string, serviceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -340,13 +347,13 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -387,8 +394,8 @@ export class ServicesImpl implements Services { resource: ServiceResource, options?: ServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesUpdateResponse > > { @@ -398,7 +405,7 @@ export class ServicesImpl implements Services { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -431,13 +438,16 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, resource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, resource, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ServicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -552,14 +562,14 @@ export class ServicesImpl implements Services { resourceGroupName: string, serviceName: string, options?: ServicesStopOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -592,13 +602,13 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, options }, - stopOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -636,14 +646,14 @@ export class ServicesImpl implements Services { resourceGroupName: string, serviceName: string, options?: ServicesStartOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -676,13 +686,13 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, options }, - startOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operations/storages.ts b/sdk/appplatform/arm-appplatform/src/operations/storages.ts index 80033effcf5d..d60dc52c4b0a 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/storages.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/storages.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClient } from "../appPlatformManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { StorageResource, StoragesListNextOptionalParams, @@ -154,8 +158,8 @@ export class StoragesImpl implements Storages { storageResource: StorageResource, options?: StoragesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StoragesCreateOrUpdateResponse > > { @@ -165,7 +169,7 @@ export class StoragesImpl implements Storages { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -198,13 +202,22 @@ export class StoragesImpl implements Storages { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, storageName, storageResource, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + serviceName, + storageName, + storageResource, + options + }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + StoragesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -250,14 +263,14 @@ export class StoragesImpl implements Storages { serviceName: string, storageName: string, options?: StoragesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -290,13 +303,13 @@ export class StoragesImpl implements Storages { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, serviceName, storageName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, serviceName, storageName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortalCustomDomains.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortalCustomDomains.ts index 28a46086f61a..9e680d05593d 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortalCustomDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortalCustomDomains.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ApiPortalCustomDomainResource, ApiPortalCustomDomainsListOptionalParams, @@ -69,8 +69,8 @@ export interface ApiPortalCustomDomains { apiPortalCustomDomainResource: ApiPortalCustomDomainResource, options?: ApiPortalCustomDomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApiPortalCustomDomainsCreateOrUpdateResponse > >; @@ -107,7 +107,7 @@ export interface ApiPortalCustomDomains { apiPortalName: string, domainName: string, options?: ApiPortalCustomDomainsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the API portal custom domain. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortals.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortals.ts index 0f5edd60121f..bf5f1584605d 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortals.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apiPortals.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ApiPortalResource, ApiPortalsListOptionalParams, @@ -66,8 +66,8 @@ export interface ApiPortals { apiPortalResource: ApiPortalResource, options?: ApiPortalsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApiPortalsCreateOrUpdateResponse > >; @@ -100,7 +100,7 @@ export interface ApiPortals { serviceName: string, apiPortalName: string, options?: ApiPortalsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the default API portal. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationAccelerators.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationAccelerators.ts index e214f09c687b..db9a56a1925b 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationAccelerators.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationAccelerators.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ApplicationAcceleratorResource, ApplicationAcceleratorsListOptionalParams, @@ -63,8 +63,8 @@ export interface ApplicationAccelerators { applicationAcceleratorResource: ApplicationAcceleratorResource, options?: ApplicationAcceleratorsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApplicationAcceleratorsCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface ApplicationAccelerators { serviceName: string, applicationAcceleratorName: string, options?: ApplicationAcceleratorsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the application accelerator. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationLiveViews.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationLiveViews.ts index 65a8cbcfcaac..3a3cb3355fcc 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationLiveViews.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/applicationLiveViews.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ApplicationLiveViewResource, ApplicationLiveViewsListOptionalParams, @@ -63,8 +63,8 @@ export interface ApplicationLiveViews { applicationLiveViewResource: ApplicationLiveViewResource, options?: ApplicationLiveViewsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ApplicationLiveViewsCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface ApplicationLiveViews { serviceName: string, applicationLiveViewName: string, options?: ApplicationLiveViewsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Disable the default Application Live View. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apps.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apps.ts index cc4e22f5b84e..5ac6340b3770 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apps.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/apps.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { AppResource, AppsListOptionalParams, @@ -73,8 +73,8 @@ export interface Apps { appResource: AppResource, options?: AppsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AppsCreateOrUpdateResponse > >; @@ -107,7 +107,7 @@ export interface Apps { serviceName: string, appName: string, options?: AppsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Operation to delete an App. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -138,7 +138,7 @@ export interface Apps { appResource: AppResource, options?: AppsUpdateOptionalParams ): Promise< - PollerLike, AppsUpdateResponse> + SimplePollerLike, AppsUpdateResponse> >; /** * Operation to update an exiting App. @@ -186,8 +186,8 @@ export interface Apps { activeDeploymentCollection: ActiveDeploymentCollection, options?: AppsSetActiveDeploymentsOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, AppsSetActiveDeploymentsResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/bindings.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/bindings.ts index 9e4e18de21c3..d1a6795dbbef 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/bindings.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/bindings.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { BindingResource, BindingsListOptionalParams, @@ -71,8 +71,8 @@ export interface Bindings { bindingResource: BindingResource, options?: BindingsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BindingsCreateOrUpdateResponse > >; @@ -109,7 +109,7 @@ export interface Bindings { appName: string, bindingName: string, options?: BindingsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Operation to delete a Binding. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -144,8 +144,8 @@ export interface Bindings { bindingResource: BindingResource, options?: BindingsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BindingsUpdateResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceAgentPool.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceAgentPool.ts index afd6bc929efc..ccc9f5e51dfb 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceAgentPool.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceAgentPool.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { BuildServiceAgentPoolResource, BuildServiceAgentPoolListOptionalParams, @@ -68,8 +68,8 @@ export interface BuildServiceAgentPool { agentPoolResource: BuildServiceAgentPoolResource, options?: BuildServiceAgentPoolUpdatePutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BuildServiceAgentPoolUpdatePutResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceBuilder.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceBuilder.ts index 023e36549a93..d1b0230ae6a0 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceBuilder.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceBuilder.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { BuilderResource, BuildServiceBuilderListOptionalParams, @@ -71,8 +71,8 @@ export interface BuildServiceBuilder { builderResource: BuilderResource, options?: BuildServiceBuilderCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BuildServiceBuilderCreateOrUpdateResponse > >; @@ -109,7 +109,7 @@ export interface BuildServiceBuilder { buildServiceName: string, builderName: string, options?: BuildServiceBuilderDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a KPack builder. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceOperations.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceOperations.ts index 190b4a5d14ba..a46cf428b363 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceOperations.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildServiceOperations.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { BuildService, BuildServiceListBuildServicesOptionalParams, @@ -16,10 +17,13 @@ import { BuildServiceListBuildResultsOptionalParams, BuildServiceGetBuildServiceOptionalParams, BuildServiceGetBuildServiceResponse, + BuildServiceCreateOrUpdateOptionalParams, + BuildServiceCreateOrUpdateResponse, BuildServiceGetBuildOptionalParams, BuildServiceGetBuildResponse, BuildServiceCreateOrUpdateBuildOptionalParams, BuildServiceCreateOrUpdateBuildResponse, + BuildServiceDeleteBuildOptionalParams, BuildServiceGetBuildResultOptionalParams, BuildServiceGetBuildResultResponse, BuildServiceGetBuildResultLogOptionalParams, @@ -95,6 +99,43 @@ export interface BuildServiceOperations { buildServiceName: string, options?: BuildServiceGetBuildServiceOptionalParams ): Promise; + /** + * Create a build service 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. + * @param buildServiceName The name of the build service resource. + * @param buildService Parameters for the create operation + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildService: BuildService, + options?: BuildServiceCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + BuildServiceCreateOrUpdateResponse + > + >; + /** + * Create a build service 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. + * @param buildServiceName The name of the build service resource. + * @param buildService Parameters for the create operation + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildService: BuildService, + options?: BuildServiceCreateOrUpdateOptionalParams + ): Promise; /** * Get a KPack build. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -129,6 +170,38 @@ export interface BuildServiceOperations { build: Build, options?: BuildServiceCreateOrUpdateBuildOptionalParams ): Promise; + /** + * delete a KPack build. + * @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. + * @param buildServiceName The name of the build service resource. + * @param buildName The name of the build resource. + * @param options The options parameters. + */ + beginDeleteBuild( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildName: string, + options?: BuildServiceDeleteBuildOptionalParams + ): Promise, void>>; + /** + * delete a KPack build. + * @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. + * @param buildServiceName The name of the build service resource. + * @param buildName The name of the build resource. + * @param options The options parameters. + */ + beginDeleteBuildAndWait( + resourceGroupName: string, + serviceName: string, + buildServiceName: string, + buildName: string, + options?: BuildServiceDeleteBuildOptionalParams + ): Promise; /** * Get a KPack build result. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildpackBinding.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildpackBinding.ts index 315328b4ad19..2cc7e7b5fb6d 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildpackBinding.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/buildpackBinding.ts @@ -7,9 +7,10 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { BuildpackBindingResource, + BuildpackBindingListForClusterOptionalParams, BuildpackBindingListOptionalParams, BuildpackBindingGetOptionalParams, BuildpackBindingGetResponse, @@ -21,6 +22,18 @@ import { /// /** Interface representing a BuildpackBinding. */ export interface BuildpackBinding { + /** + * Get collection of buildpack bindings under all builders. + * @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. + * @param options The options parameters. + */ + listForCluster( + resourceGroupName: string, + serviceName: string, + options?: BuildpackBindingListForClusterOptionalParams + ): PagedAsyncIterableIterator; /** * Handles requests to list all buildpack bindings in a builder. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -75,8 +88,8 @@ export interface BuildpackBinding { buildpackBinding: BuildpackBindingResource, options?: BuildpackBindingCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, BuildpackBindingCreateOrUpdateResponse > >; @@ -117,7 +130,7 @@ export interface BuildpackBinding { builderName: string, buildpackBindingName: string, options?: BuildpackBindingDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Operation to delete a Buildpack Binding * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/certificates.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/certificates.ts index dfde7f0bc7a1..28f9df258d2a 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/certificates.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/certificates.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { CertificateResource, CertificatesListOptionalParams, @@ -63,8 +63,8 @@ export interface Certificates { certificateResource: CertificateResource, options?: CertificatesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CertificatesCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface Certificates { serviceName: string, certificateName: string, options?: CertificatesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the certificate resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configServers.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configServers.ts index 49c5e01fc6ff..de4c5903e4c5 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configServers.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configServers.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ConfigServersGetOptionalParams, ConfigServersGetResponse, @@ -48,8 +48,8 @@ export interface ConfigServers { configServerResource: ConfigServerResource, options?: ConfigServersUpdatePutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigServersUpdatePutResponse > >; @@ -81,8 +81,8 @@ export interface ConfigServers { configServerResource: ConfigServerResource, options?: ConfigServersUpdatePatchOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigServersUpdatePatchResponse > >; @@ -114,8 +114,8 @@ export interface ConfigServers { configServerSettings: ConfigServerSettings, options?: ConfigServersValidateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigServersValidateResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configurationServices.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configurationServices.ts index efa5850cc5b4..1d03c4aebc44 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configurationServices.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/configurationServices.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ConfigurationServiceResource, ConfigurationServicesListOptionalParams, @@ -67,8 +67,8 @@ export interface ConfigurationServices { configurationServiceResource: ConfigurationServiceResource, options?: ConfigurationServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigurationServicesCreateOrUpdateResponse > >; @@ -102,7 +102,7 @@ export interface ConfigurationServices { serviceName: string, configurationServiceName: string, options?: ConfigurationServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Disable the default Application Configuration Service. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -133,8 +133,8 @@ export interface ConfigurationServices { settings: ConfigurationServiceSettings, options?: ConfigurationServicesValidateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ConfigurationServicesValidateResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/containerRegistries.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/containerRegistries.ts new file mode 100644 index 000000000000..eb0dda4b840e --- /dev/null +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/containerRegistries.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ContainerRegistryResource, + ContainerRegistriesListOptionalParams, + ContainerRegistriesGetOptionalParams, + ContainerRegistriesGetResponse, + ContainerRegistriesCreateOrUpdateOptionalParams, + ContainerRegistriesCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ContainerRegistries. */ +export interface ContainerRegistries { + /** + * List container registries 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. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + serviceName: string, + options?: ContainerRegistriesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get the container registries 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. + * @param containerRegistryName The name of the container registry. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serviceName: string, + containerRegistryName: string, + options?: ContainerRegistriesGetOptionalParams + ): Promise; + /** + * Create or update container registry 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. + * @param containerRegistryName The name of the container registry. + * @param containerRegistryResource Parameters for the create or update operation + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serviceName: string, + containerRegistryName: string, + containerRegistryResource: ContainerRegistryResource, + options?: ContainerRegistriesCreateOrUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerRegistriesCreateOrUpdateResponse + > + >; + /** + * Create or update container registry 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. + * @param containerRegistryName The name of the container registry. + * @param containerRegistryResource Parameters for the create or update operation + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serviceName: string, + containerRegistryName: string, + containerRegistryResource: ContainerRegistryResource, + options?: ContainerRegistriesCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customDomains.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customDomains.ts index d8d868c90647..ac16ed99f213 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customDomains.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { CustomDomainResource, CustomDomainsListOptionalParams, @@ -71,8 +71,8 @@ export interface CustomDomains { domainResource: CustomDomainResource, options?: CustomDomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsCreateOrUpdateResponse > >; @@ -109,7 +109,7 @@ export interface CustomDomains { appName: string, domainName: string, options?: CustomDomainsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the custom domain of one lifecycle application. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -144,8 +144,8 @@ export interface CustomDomains { domainResource: CustomDomainResource, options?: CustomDomainsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomDomainsUpdateResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customizedAccelerators.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customizedAccelerators.ts index d69cbc5a74b6..b500d641cbe5 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customizedAccelerators.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/customizedAccelerators.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { CustomizedAcceleratorResource, CustomizedAcceleratorsListOptionalParams, @@ -72,8 +72,8 @@ export interface CustomizedAccelerators { customizedAcceleratorResource: CustomizedAcceleratorResource, options?: CustomizedAcceleratorsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CustomizedAcceleratorsCreateOrUpdateResponse > >; @@ -110,7 +110,7 @@ export interface CustomizedAccelerators { applicationAcceleratorName: string, customizedAcceleratorName: string, options?: CustomizedAcceleratorsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the customized accelerator. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/deployments.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/deployments.ts index faff94d6821f..194c736f5b98 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/deployments.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/deployments.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DeploymentResource, DeploymentsListOptionalParams, @@ -99,8 +99,8 @@ export interface Deployments { deploymentResource: DeploymentResource, options?: DeploymentsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsCreateOrUpdateResponse > >; @@ -137,7 +137,7 @@ export interface Deployments { appName: string, deploymentName: string, options?: DeploymentsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Operation to delete a Deployment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -172,8 +172,8 @@ export interface Deployments { deploymentResource: DeploymentResource, options?: DeploymentsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsUpdateResponse > >; @@ -210,7 +210,7 @@ export interface Deployments { appName: string, deploymentName: string, options?: DeploymentsStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Start the deployment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -242,7 +242,7 @@ export interface Deployments { appName: string, deploymentName: string, options?: DeploymentsStopOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Stop the deployment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -274,7 +274,7 @@ export interface Deployments { appName: string, deploymentName: string, options?: DeploymentsRestartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Restart the deployment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -307,8 +307,8 @@ export interface Deployments { deploymentName: string, options?: DeploymentsEnableRemoteDebuggingOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsEnableRemoteDebuggingResponse > >; @@ -344,8 +344,8 @@ export interface Deployments { deploymentName: string, options?: DeploymentsDisableRemoteDebuggingOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DeploymentsDisableRemoteDebuggingResponse > >; @@ -414,7 +414,7 @@ export interface Deployments { deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateHeapDumpOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Generate Heap Dump * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -450,7 +450,7 @@ export interface Deployments { deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsGenerateThreadDumpOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Generate Thread Dump * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -486,7 +486,7 @@ export interface Deployments { deploymentName: string, diagnosticParameters: DiagnosticParameters, options?: DeploymentsStartJFROptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Start JFR * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/devToolPortals.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/devToolPortals.ts index 2864c8609244..073faf0a1a6a 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/devToolPortals.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/devToolPortals.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DevToolPortalResource, DevToolPortalsListOptionalParams, @@ -63,8 +63,8 @@ export interface DevToolPortals { devToolPortalResource: DevToolPortalResource, options?: DevToolPortalsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DevToolPortalsCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface DevToolPortals { serviceName: string, devToolPortalName: string, options?: DevToolPortalsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Disable the default Dev Tool Portal. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayCustomDomains.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayCustomDomains.ts index fd8cfb52a05f..a8d6f0142066 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayCustomDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayCustomDomains.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { GatewayCustomDomainResource, GatewayCustomDomainsListOptionalParams, @@ -70,8 +70,8 @@ export interface GatewayCustomDomains { gatewayCustomDomainResource: GatewayCustomDomainResource, options?: GatewayCustomDomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GatewayCustomDomainsCreateOrUpdateResponse > >; @@ -109,7 +109,7 @@ export interface GatewayCustomDomains { gatewayName: string, domainName: string, options?: GatewayCustomDomainsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the Spring Cloud Gateway custom domain. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayRouteConfigs.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayRouteConfigs.ts index a687db447dd2..cc5ef107f081 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayRouteConfigs.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gatewayRouteConfigs.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { GatewayRouteConfigResource, GatewayRouteConfigsListOptionalParams, @@ -71,8 +71,8 @@ export interface GatewayRouteConfigs { gatewayRouteConfigResource: GatewayRouteConfigResource, options?: GatewayRouteConfigsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GatewayRouteConfigsCreateOrUpdateResponse > >; @@ -111,7 +111,7 @@ export interface GatewayRouteConfigs { gatewayName: string, routeConfigName: string, options?: GatewayRouteConfigsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the Spring Cloud Gateway route config. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gateways.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gateways.ts index 977cdb00f61b..3c2344ed63e8 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gateways.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/gateways.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { GatewayResource, GatewaysListOptionalParams, @@ -15,9 +15,13 @@ import { GatewaysGetResponse, GatewaysCreateOrUpdateOptionalParams, GatewaysCreateOrUpdateResponse, + SkuObject, + GatewaysUpdateCapacityOptionalParams, + GatewaysUpdateCapacityResponse, GatewaysDeleteOptionalParams, GatewaysListEnvSecretsOptionalParams, GatewaysListEnvSecretsResponse, + GatewaysRestartOptionalParams, CustomDomainValidatePayload, GatewaysValidateDomainOptionalParams, GatewaysValidateDomainResponse @@ -68,8 +72,8 @@ export interface Gateways { gatewayResource: GatewayResource, options?: GatewaysCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, GatewaysCreateOrUpdateResponse > >; @@ -89,6 +93,43 @@ export interface Gateways { gatewayResource: GatewayResource, options?: GatewaysCreateOrUpdateOptionalParams ): Promise; + /** + * Operation to update an exiting Spring Cloud Gateway capacity. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param gatewayCapacityResource The gateway capacity for the update operation + * @param options The options parameters. + */ + beginUpdateCapacity( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + gatewayCapacityResource: SkuObject, + options?: GatewaysUpdateCapacityOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + GatewaysUpdateCapacityResponse + > + >; + /** + * Operation to update an exiting Spring Cloud Gateway capacity. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param gatewayCapacityResource The gateway capacity for the update operation + * @param options The options parameters. + */ + beginUpdateCapacityAndWait( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + gatewayCapacityResource: SkuObject, + options?: GatewaysUpdateCapacityOptionalParams + ): Promise; /** * Disable the default Spring Cloud Gateway. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -102,7 +143,7 @@ export interface Gateways { serviceName: string, gatewayName: string, options?: GatewaysDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Disable the default Spring Cloud Gateway. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -131,6 +172,34 @@ export interface Gateways { gatewayName: string, options?: GatewaysListEnvSecretsOptionalParams ): Promise; + /** + * Restart the Spring Cloud Gateway. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param options The options parameters. + */ + beginRestart( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + options?: GatewaysRestartOptionalParams + ): Promise, void>>; + /** + * Restart the Spring Cloud Gateway. + * @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. + * @param gatewayName The name of Spring Cloud Gateway. + * @param options The options parameters. + */ + beginRestartAndWait( + resourceGroupName: string, + serviceName: string, + gatewayName: string, + options?: GatewaysRestartOptionalParams + ): Promise; /** * Check the domains are valid as well as not in use. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/index.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/index.ts index c9b971fc027b..5ad18dc2229d 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/index.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/index.ts @@ -12,6 +12,7 @@ export * from "./configurationServices"; export * from "./serviceRegistries"; export * from "./applicationLiveViews"; export * from "./devToolPortals"; +export * from "./containerRegistries"; export * from "./buildServiceOperations"; export * from "./buildpackBinding"; export * from "./buildServiceBuilder"; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/monitoringSettings.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/monitoringSettings.ts index 7528543db115..dbc21c803ba7 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/monitoringSettings.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/monitoringSettings.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MonitoringSettingsGetOptionalParams, MonitoringSettingsGetResponse, @@ -45,8 +45,8 @@ export interface MonitoringSettings { monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MonitoringSettingsUpdatePutResponse > >; @@ -78,8 +78,8 @@ export interface MonitoringSettings { monitoringSettingResource: MonitoringSettingResource, options?: MonitoringSettingsUpdatePatchOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, MonitoringSettingsUpdatePatchResponse > >; diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/predefinedAccelerators.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/predefinedAccelerators.ts index 3a287e95feb1..1aaacedd49b6 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/predefinedAccelerators.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/predefinedAccelerators.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PredefinedAcceleratorResource, PredefinedAcceleratorsListOptionalParams, @@ -65,7 +65,7 @@ export interface PredefinedAccelerators { applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsDisableOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Disable predefined accelerator. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -97,7 +97,7 @@ export interface PredefinedAccelerators { applicationAcceleratorName: string, predefinedAcceleratorName: string, options?: PredefinedAcceleratorsEnableOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Enable predefined accelerator. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/serviceRegistries.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/serviceRegistries.ts index 80530d77793b..a8a1c5b99d19 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/serviceRegistries.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/serviceRegistries.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ServiceRegistryResource, ServiceRegistriesListOptionalParams, @@ -61,8 +61,8 @@ export interface ServiceRegistries { serviceRegistryName: string, options?: ServiceRegistriesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServiceRegistriesCreateOrUpdateResponse > >; @@ -93,7 +93,7 @@ export interface ServiceRegistries { serviceName: string, serviceRegistryName: string, options?: ServiceRegistriesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Disable the default Service Registry. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/services.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/services.ts index 39217aa14f9c..8f9afaa61dfa 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/services.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/services.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ServiceResource, ServicesListBySubscriptionOptionalParams, @@ -80,8 +80,8 @@ export interface Services { resource: ServiceResource, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > >; @@ -110,7 +110,7 @@ export interface Services { resourceGroupName: string, serviceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Operation to delete a Service. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -137,8 +137,8 @@ export interface Services { resource: ServiceResource, options?: ServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesUpdateResponse > >; @@ -217,7 +217,7 @@ export interface Services { resourceGroupName: string, serviceName: string, options?: ServicesStopOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Stop a Service. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -241,7 +241,7 @@ export interface Services { resourceGroupName: string, serviceName: string, options?: ServicesStartOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Start a Service. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts index 0eeb8fa2ba06..0c567cc50b2f 100644 --- a/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts +++ b/sdk/appplatform/arm-appplatform/src/operationsInterfaces/storages.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { StorageResource, StoragesListOptionalParams, @@ -63,8 +63,8 @@ export interface Storages { storageResource: StorageResource, options?: StoragesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StoragesCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface Storages { serviceName: string, storageName: string, options?: StoragesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete the storage resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain 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"