diff --git a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts index 10c8771771f4..d5530022c557 100644 --- a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts +++ b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClient.ts @@ -18,13 +18,15 @@ import { AppPlatformManagementClientContext } from "./appPlatformManagementClien class AppPlatformManagementClient extends AppPlatformManagementClientContext { // Operation groups services: operations.Services; + configServers: operations.ConfigServers; + monitoringSettings: operations.MonitoringSettings; apps: operations.Apps; bindings: operations.Bindings; certificates: operations.Certificates; customDomains: operations.CustomDomains; deployments: operations.Deployments; operations: operations.Operations; - sku: operations.SkuOperations; + skus: operations.Skus; /** * Initializes a new instance of the AppPlatformManagementClient class. @@ -36,13 +38,15 @@ class AppPlatformManagementClient extends AppPlatformManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AppPlatformManagementClientOptions) { super(credentials, subscriptionId, options); this.services = new operations.Services(this); + this.configServers = new operations.ConfigServers(this); + this.monitoringSettings = new operations.MonitoringSettings(this); this.apps = new operations.Apps(this); this.bindings = new operations.Bindings(this); this.certificates = new operations.Certificates(this); this.customDomains = new operations.CustomDomains(this); this.deployments = new operations.Deployments(this); this.operations = new operations.Operations(this); - this.sku = new operations.SkuOperations(this); + this.skus = new operations.Skus(this); } } diff --git a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts index abe07c221d56..7cd2d6db1f0a 100644 --- a/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts +++ b/sdk/appplatform/arm-appplatform/src/appPlatformManagementClientContext.ts @@ -45,7 +45,7 @@ export class AppPlatformManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2019-05-01-preview'; + this.apiVersion = '2020-07-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts index 6def4c93fa29..280954160683 100644 --- a/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/appsMappers.ts @@ -19,9 +19,12 @@ export { ClusterResourceProperties, ConfigServerGitProperty, ConfigServerProperties, + ConfigServerResource, ConfigServerSettings, CustomDomainProperties, CustomDomainResource, + CustomDomainValidatePayload, + CustomDomainValidateResult, DeploymentInstance, DeploymentResource, DeploymentResourceProperties, @@ -29,6 +32,8 @@ export { ErrorModel, GitPatternRepository, ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, NetworkProfile, PersistentDisk, ProxyResource, @@ -37,7 +42,6 @@ export { ServiceResource, Sku, TemporaryDisk, - TraceProperties, TrackedResource, UserSourceInfo } from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts index 1a467fa36fc7..6b95e4ff962d 100644 --- a/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/bindingsMappers.ts @@ -19,6 +19,7 @@ export { ClusterResourceProperties, ConfigServerGitProperty, ConfigServerProperties, + ConfigServerResource, ConfigServerSettings, CustomDomainProperties, CustomDomainResource, @@ -29,6 +30,8 @@ export { ErrorModel, GitPatternRepository, ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, NetworkProfile, PersistentDisk, ProxyResource, @@ -36,7 +39,6 @@ export { ServiceResource, Sku, TemporaryDisk, - TraceProperties, TrackedResource, UserSourceInfo } from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts b/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts index 50ab68d30024..fcbc47b646e9 100644 --- a/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/certificatesMappers.ts @@ -19,6 +19,7 @@ export { ClusterResourceProperties, ConfigServerGitProperty, ConfigServerProperties, + ConfigServerResource, ConfigServerSettings, CustomDomainProperties, CustomDomainResource, @@ -29,6 +30,8 @@ export { ErrorModel, GitPatternRepository, ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, NetworkProfile, PersistentDisk, ProxyResource, @@ -36,7 +39,6 @@ export { ServiceResource, Sku, TemporaryDisk, - TraceProperties, TrackedResource, UserSourceInfo } from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts b/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts new file mode 100644 index 000000000000..125c2ba459b5 --- /dev/null +++ b/sdk/appplatform/arm-appplatform/src/models/configServersMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AppResource, + AppResourceProperties, + BaseResource, + BindingResource, + BindingResourceProperties, + CertificateProperties, + CertificateResource, + CloudError, + ClusterResourceProperties, + ConfigServerGitProperty, + ConfigServerProperties, + ConfigServerResource, + ConfigServerSettings, + CustomDomainProperties, + CustomDomainResource, + DeploymentInstance, + DeploymentResource, + DeploymentResourceProperties, + DeploymentSettings, + ErrorModel, + GitPatternRepository, + ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, + NetworkProfile, + PersistentDisk, + ProxyResource, + Resource, + ServiceResource, + Sku, + TemporaryDisk, + TrackedResource, + UserSourceInfo +} from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts index 9133dde6d685..57b40b6a2bdd 100644 --- a/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/customDomainsMappers.ts @@ -18,12 +18,11 @@ export { ClusterResourceProperties, ConfigServerGitProperty, ConfigServerProperties, + ConfigServerResource, ConfigServerSettings, CustomDomainProperties, CustomDomainResource, CustomDomainResourceCollection, - CustomDomainValidatePayload, - CustomDomainValidateResult, DeploymentInstance, DeploymentResource, DeploymentResourceProperties, @@ -31,6 +30,8 @@ export { ErrorModel, GitPatternRepository, ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, NetworkProfile, PersistentDisk, ProxyResource, @@ -38,7 +39,6 @@ export { ServiceResource, Sku, TemporaryDisk, - TraceProperties, TrackedResource, UserSourceInfo } from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts index 68a16a67d14e..c41e51a9ca01 100644 --- a/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/deploymentsMappers.ts @@ -18,6 +18,7 @@ export { ClusterResourceProperties, ConfigServerGitProperty, ConfigServerProperties, + ConfigServerResource, ConfigServerSettings, CustomDomainProperties, CustomDomainResource, @@ -30,6 +31,8 @@ export { GitPatternRepository, LogFileUrlResponse, ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, NetworkProfile, PersistentDisk, ProxyResource, @@ -37,7 +40,6 @@ export { ServiceResource, Sku, TemporaryDisk, - TraceProperties, TrackedResource, UserSourceInfo } from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/index.ts b/sdk/appplatform/arm-appplatform/src/models/index.ts index 169c684205ab..c7bbcf68323f 100644 --- a/sdk/appplatform/arm-appplatform/src/models/index.ts +++ b/sdk/appplatform/arm-appplatform/src/models/index.ts @@ -11,6 +11,144 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Service network profile payload + */ +export interface NetworkProfile { + /** + * Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime + */ + serviceRuntimeSubnetId?: string; + /** + * Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps + */ + appSubnetId?: string; + /** + * Azure Spring Cloud service reserved CIDR + */ + serviceCidr?: string; + /** + * Name of the resource group containing network resources of Azure Spring Cloud Service Runtime + */ + serviceRuntimeNetworkResourceGroup?: string; + /** + * Name of the resource group containing network resources of Azure Spring Cloud Apps + */ + appNetworkResourceGroup?: string; +} + +/** + * Service properties payload + */ +export interface ClusterResourceProperties { + /** + * Provisioning state of the Service. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Deleted', 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Network profile of the Service + */ + networkProfile?: NetworkProfile; + /** + * Version of the Service + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly version?: number; + /** + * ServiceInstanceEntity GUID which uniquely identifies a created resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceId?: string; +} + +/** + * Sku of Azure Spring Cloud + */ +export interface Sku { + /** + * Name of the Sku + */ + name?: string; + /** + * Tier of the Sku + */ + tier?: string; + /** + * Current capacity of the target resource + */ + capacity?: number; +} + +/** + * The core properties of ARM resources. + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource Id for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a ARM tracked top level resource. + */ +export interface TrackedResource extends Resource { + /** + * The GEO location of the resource. + */ + location?: string; + /** + * Tags of the service which is a list of key value pairs that describe the resource. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Service resource + */ +export interface ServiceResource extends TrackedResource { + /** + * Properties of the Service resource + */ + properties?: ClusterResourceProperties; + /** + * Sku of the Service resource + */ + sku?: Sku; +} + +/** + * Managed identity properties retrieved from ARM request headers. + */ +export interface ManagedIdentityProperties { + /** + * Type of the managed identity. Possible values include: 'None', 'SystemAssigned', + * 'UserAssigned', 'SystemAssigned,UserAssigned' + */ + type?: ManagedIdentityType; + /** + * Principal Id + */ + principalId?: string; + /** + * Tenant Id + */ + tenantId?: string; +} + /** * The error code compose of code and message. */ @@ -140,7 +278,7 @@ export interface ConfigServerProperties { * 'Succeeded', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly state?: ConfigServerState; + readonly provisioningState?: ConfigServerState; /** * Error when apply config server settings. */ @@ -152,167 +290,54 @@ export interface ConfigServerProperties { } /** - * Trace properties payload - */ -export interface TraceProperties { - /** - * State of the trace proxy. Possible values include: 'NotAvailable', 'Failed', 'Succeeded', - * 'Updating' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly state?: TraceProxyState; - /** - * Error when apply trace proxy changes. - */ - error?: ErrorModel; - /** - * Indicates whether enable the tracing functionality - */ - enabled?: boolean; - /** - * Target application insight instrumentation key - */ - appInsightInstrumentationKey?: string; -} - -/** - * Service network profile payload - */ -export interface NetworkProfile { - /** - * Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime - */ - serviceRuntimeSubnetId?: string; - /** - * Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps - */ - appSubnetId?: string; - /** - * Azure Spring Cloud service reserved CIDR - */ - serviceCidr?: string; - /** - * Name of the resource group containing network resources of Azure Spring Cloud Service Runtime - */ - serviceRuntimeNetworkResourceGroup?: string; - /** - * Name of the resource group containing network resources of Azure Spring Cloud Apps - */ - appNetworkResourceGroup?: string; -} - -/** - * Service properties payload + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags. */ -export interface ClusterResourceProperties { - /** - * Provisioning state of the Service. Possible values include: 'Creating', 'Updating', - * 'Deleting', 'Deleted', 'Succeeded', 'Failed', 'Moving', 'Moved', 'MoveFailed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: ProvisioningState; - /** - * Config server git properties of the Service - */ - configServerProperties?: ConfigServerProperties; - /** - * Trace properties of the Service - */ - trace?: TraceProperties; - /** - * Network profile of the Service - */ - networkProfile?: NetworkProfile; - /** - * Version of the Service - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly version?: number; - /** - * ServiceInstanceEntity GUID which uniquely identifies a created resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serviceId?: string; +export interface ProxyResource extends Resource { } /** - * Sku of Azure Spring Cloud + * Config Server resource */ -export interface Sku { - /** - * Name of the Sku - */ - name?: string; +export interface ConfigServerResource extends ProxyResource { /** - * Tier of the Sku - */ - tier?: string; - /** - * Current capacity of the target resource + * Properties of the Config Server resource */ - capacity?: number; + properties?: ConfigServerProperties; } /** - * The core properties of ARM resources. + * Monitoring Setting properties payload */ -export interface Resource extends BaseResource { - /** - * Fully qualified resource Id for the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; +export interface MonitoringSettingProperties { /** - * The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The type of the resource. + * State of the Monitoring Setting. Possible values include: 'NotAvailable', 'Failed', + * 'Succeeded', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; -} - -/** - * The resource model definition for a ARM tracked top level resource. - */ -export interface TrackedResource extends Resource { + readonly provisioningState?: MonitoringSettingState; /** - * The GEO location of the resource. + * Error when apply Monitoring Setting changes. */ - location?: string; - /** - * Tags of the service which is a list of key value pairs that describe the resource. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Service resource - */ -export interface ServiceResource extends TrackedResource { + error?: ErrorModel; /** - * Properties of the Service resource + * Indicates whether enable the trace functionality */ - properties?: ClusterResourceProperties; + traceEnabled?: boolean; /** - * Sku of the Service resource + * Target application insight instrumentation key */ - sku?: Sku; + appInsightsInstrumentationKey?: string; } /** - * Managed identity properties retrieved from ARM request headers. + * Monitoring Setting resource */ -export interface ManagedIdentityProperties { +export interface MonitoringSettingResource extends ProxyResource { /** - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', - * 'SystemAssigned,UserAssigned' + * Properties of the Monitoring Setting resource */ - type?: ManagedIdentityType; - principalId?: string; - tenantId?: string; + properties?: MonitoringSettingProperties; } /** @@ -430,13 +455,6 @@ export interface AppResourceProperties { persistentDisk?: PersistentDisk; } -/** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags. - */ -export interface ProxyResource extends Resource { -} - /** * App resource payload */ @@ -712,11 +730,6 @@ export interface DeploymentSettings { * JVM parameter */ jvmOptions?: string; - /** - * Instance count, basic tier should be in range (1, 25), standard tier should be in range (1, - * 500). Default value: 1. - */ - instanceCount?: number; /** * Collection of environment variables */ @@ -807,6 +820,10 @@ export interface DeploymentResource extends ProxyResource { * Properties of the Deployment resource */ properties?: DeploymentResourceProperties; + /** + * Sku of the Deployment resource + */ + sku?: Sku; } /** @@ -1008,7 +1025,7 @@ export interface ResourceSkuCapabilities { } /** - * An interface representing ResourceSkuZoneDetails. + * Details of capabilities available to a SKU in specific zones */ export interface ResourceSkuZoneDetails { /** @@ -1024,7 +1041,7 @@ export interface ResourceSkuZoneDetails { } /** - * An interface representing ResourceSkuLocationInfo. + * Locations and availability zones where the SKU is available */ export interface ResourceSkuLocationInfo { /** @@ -1042,7 +1059,7 @@ export interface ResourceSkuLocationInfo { } /** - * An interface representing ResourceSkuRestrictionInfo. + * Information about the restriction where the SKU cannot be used */ export interface ResourceSkuRestrictionInfo { /** @@ -1056,7 +1073,7 @@ export interface ResourceSkuRestrictionInfo { } /** - * An interface representing ResourceSkuRestrictions. + * Restrictions where the SKU cannot be used */ export interface ResourceSkuRestrictions { /** @@ -1137,7 +1154,7 @@ export interface DeploymentsListOptionalParams extends msRest.RequestOptionsBase /** * Optional Parameters. */ -export interface DeploymentsListClusterAllDeploymentsOptionalParams extends msRest.RequestOptionsBase { +export interface DeploymentsListForClusterOptionalParams extends msRest.RequestOptionsBase { /** * Version of the deployments to be listed */ @@ -1242,7 +1259,7 @@ export interface AvailableOperations extends Array { /** * @interface - * An interface representing the ResourceSkuCollection. + * Object that includes an array of Azure Spring Cloud SKU and a possible link for next set * @extends Array */ export interface ResourceSkuCollection extends Array { @@ -1263,28 +1280,28 @@ export interface ResourceSkuCollection extends Array { export type ProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Deleted' | 'Succeeded' | 'Failed' | 'Moving' | 'Moved' | 'MoveFailed'; /** - * Defines values for ConfigServerState. - * Possible values include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' + * Defines values for ManagedIdentityType. + * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' * @readonly * @enum {string} */ -export type ConfigServerState = 'NotAvailable' | 'Deleted' | 'Failed' | 'Succeeded' | 'Updating'; +export type ManagedIdentityType = 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned,UserAssigned'; /** - * Defines values for TraceProxyState. - * Possible values include: 'NotAvailable', 'Failed', 'Succeeded', 'Updating' + * Defines values for ConfigServerState. + * Possible values include: 'NotAvailable', 'Deleted', 'Failed', 'Succeeded', 'Updating' * @readonly * @enum {string} */ -export type TraceProxyState = 'NotAvailable' | 'Failed' | 'Succeeded' | 'Updating'; +export type ConfigServerState = 'NotAvailable' | 'Deleted' | 'Failed' | 'Succeeded' | 'Updating'; /** - * Defines values for ManagedIdentityType. - * Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' + * Defines values for MonitoringSettingState. + * Possible values include: 'NotAvailable', 'Failed', 'Succeeded', 'Updating' * @readonly * @enum {string} */ -export type ManagedIdentityType = 'None' | 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned,UserAssigned'; +export type MonitoringSettingState = 'NotAvailable' | 'Failed' | 'Succeeded' | 'Updating'; /** * Defines values for TestKeyType. @@ -1303,66 +1320,266 @@ export type TestKeyType = 'Primary' | 'Secondary'; export type AppResourceProvisioningState = 'Succeeded' | 'Failed' | 'Creating' | 'Updating'; /** - * Defines values for UserSourceType. - * Possible values include: 'Jar', 'Source' - * @readonly - * @enum {string} + * Defines values for UserSourceType. + * Possible values include: 'Jar', 'Source' + * @readonly + * @enum {string} + */ +export type UserSourceType = 'Jar' | 'Source'; + +/** + * Defines values for RuntimeVersion. + * Possible values include: 'Java_8', 'Java_11' + * @readonly + * @enum {string} + */ +export type RuntimeVersion = 'Java_8' | 'Java_11'; + +/** + * Defines values for DeploymentResourceProvisioningState. + * Possible values include: 'Creating', 'Updating', 'Succeeded', 'Failed' + * @readonly + * @enum {string} + */ +export type DeploymentResourceProvisioningState = 'Creating' | 'Updating' | 'Succeeded' | 'Failed'; + +/** + * Defines values for DeploymentResourceStatus. + * Possible values include: 'Unknown', 'Stopped', 'Running', 'Failed', 'Allocating', 'Upgrading', + * 'Compiling' + * @readonly + * @enum {string} + */ +export type DeploymentResourceStatus = 'Unknown' | 'Stopped' | 'Running' | 'Failed' | 'Allocating' | 'Upgrading' | 'Compiling'; + +/** + * Defines values for SkuScaleType. + * Possible values include: 'None', 'Manual', 'Automatic' + * @readonly + * @enum {string} + */ +export type SkuScaleType = 'None' | 'Manual' | 'Automatic'; + +/** + * Defines values for ResourceSkuRestrictionsType. + * Possible values include: 'Location', 'Zone' + * @readonly + * @enum {string} + */ +export type ResourceSkuRestrictionsType = 'Location' | 'Zone'; + +/** + * Defines values for ResourceSkuRestrictionsReasonCode. + * Possible values include: 'QuotaId', 'NotAvailableForSubscription' + * @readonly + * @enum {string} + */ +export type ResourceSkuRestrictionsReasonCode = 'QuotaId' | 'NotAvailableForSubscription'; + +/** + * Contains response data for the get operation. + */ +export type ServicesGetResponse = ServiceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ServicesCreateOrUpdateResponse = ServiceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceResource; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ServicesUpdateResponse = ServiceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceResource; + }; +}; + +/** + * Contains response data for the listTestKeys operation. + */ +export type ServicesListTestKeysResponse = TestKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TestKeys; + }; +}; + +/** + * Contains response data for the regenerateTestKey operation. + */ +export type ServicesRegenerateTestKeyResponse = TestKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TestKeys; + }; +}; + +/** + * Contains response data for the enableTestEndpoint operation. + */ +export type ServicesEnableTestEndpointResponse = TestKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: TestKeys; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. */ -export type UserSourceType = 'Jar' | 'Source'; +export type ServicesCheckNameAvailabilityResponse = NameAvailability & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for RuntimeVersion. - * Possible values include: 'Java_8', 'Java_11' - * @readonly - * @enum {string} - */ -export type RuntimeVersion = 'Java_8' | 'Java_11'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: NameAvailability; + }; +}; /** - * Defines values for DeploymentResourceProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Succeeded', 'Failed' - * @readonly - * @enum {string} + * Contains response data for the listBySubscription operation. */ -export type DeploymentResourceProvisioningState = 'Creating' | 'Updating' | 'Succeeded' | 'Failed'; +export type ServicesListBySubscriptionResponse = ServiceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for DeploymentResourceStatus. - * Possible values include: 'Unknown', 'Stopped', 'Running', 'Failed', 'Allocating', 'Upgrading', - * 'Compiling' - * @readonly - * @enum {string} - */ -export type DeploymentResourceStatus = 'Unknown' | 'Stopped' | 'Running' | 'Failed' | 'Allocating' | 'Upgrading' | 'Compiling'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceResourceList; + }; +}; /** - * Defines values for SkuScaleType. - * Possible values include: 'None', 'Manual', 'Automatic' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type SkuScaleType = 'None' | 'Manual' | 'Automatic'; +export type ServicesListResponse = ServiceResourceList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for ResourceSkuRestrictionsType. - * Possible values include: 'Location', 'Zone' - * @readonly - * @enum {string} - */ -export type ResourceSkuRestrictionsType = 'Location' | 'Zone'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceResourceList; + }; +}; /** - * Defines values for ResourceSkuRestrictionsReasonCode. - * Possible values include: 'QuotaId', 'NotAvailableForSubscription' - * @readonly - * @enum {string} + * Contains response data for the beginCreateOrUpdate operation. */ -export type ResourceSkuRestrictionsReasonCode = 'QuotaId' | 'NotAvailableForSubscription'; +export type ServicesBeginCreateOrUpdateResponse = ServiceResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServiceResource; + }; +}; /** - * Contains response data for the get operation. + * Contains response data for the beginUpdate operation. */ -export type ServicesGetResponse = ServiceResource & { +export type ServicesBeginUpdateResponse = ServiceResource & { /** * The underlying HTTP response. */ @@ -1380,9 +1597,9 @@ export type ServicesGetResponse = ServiceResource & { }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type ServicesCreateOrUpdateResponse = ServiceResource & { +export type ServicesListBySubscriptionNextResponse = ServiceResourceList & { /** * The underlying HTTP response. */ @@ -1395,14 +1612,14 @@ export type ServicesCreateOrUpdateResponse = ServiceResource & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResource; + parsedBody: ServiceResourceList; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listNext operation. */ -export type ServicesUpdateResponse = ServiceResource & { +export type ServicesListNextResponse = ServiceResourceList & { /** * The underlying HTTP response. */ @@ -1415,14 +1632,14 @@ export type ServicesUpdateResponse = ServiceResource & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResource; + parsedBody: ServiceResourceList; }; }; /** - * Contains response data for the listTestKeys operation. + * Contains response data for the get operation. */ -export type ServicesListTestKeysResponse = TestKeys & { +export type ConfigServersGetResponse = ConfigServerResource & { /** * The underlying HTTP response. */ @@ -1435,14 +1652,14 @@ export type ServicesListTestKeysResponse = TestKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: TestKeys; + parsedBody: ConfigServerResource; }; }; /** - * Contains response data for the regenerateTestKey operation. + * Contains response data for the updatePut operation. */ -export type ServicesRegenerateTestKeyResponse = TestKeys & { +export type ConfigServersUpdatePutResponse = ConfigServerResource & { /** * The underlying HTTP response. */ @@ -1455,14 +1672,14 @@ export type ServicesRegenerateTestKeyResponse = TestKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: TestKeys; + parsedBody: ConfigServerResource; }; }; /** - * Contains response data for the enableTestEndpoint operation. + * Contains response data for the updatePatch operation. */ -export type ServicesEnableTestEndpointResponse = TestKeys & { +export type ConfigServersUpdatePatchResponse = ConfigServerResource & { /** * The underlying HTTP response. */ @@ -1475,14 +1692,14 @@ export type ServicesEnableTestEndpointResponse = TestKeys & { /** * The response body as parsed JSON or XML */ - parsedBody: TestKeys; + parsedBody: ConfigServerResource; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the beginUpdatePut operation. */ -export type ServicesCheckNameAvailabilityResponse = NameAvailability & { +export type ConfigServersBeginUpdatePutResponse = ConfigServerResource & { /** * The underlying HTTP response. */ @@ -1495,14 +1712,14 @@ export type ServicesCheckNameAvailabilityResponse = NameAvailability & { /** * The response body as parsed JSON or XML */ - parsedBody: NameAvailability; + parsedBody: ConfigServerResource; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the beginUpdatePatch operation. */ -export type ServicesListBySubscriptionResponse = ServiceResourceList & { +export type ConfigServersBeginUpdatePatchResponse = ConfigServerResource & { /** * The underlying HTTP response. */ @@ -1515,14 +1732,14 @@ export type ServicesListBySubscriptionResponse = ServiceResourceList & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResourceList; + parsedBody: ConfigServerResource; }; }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type ServicesListResponse = ServiceResourceList & { +export type MonitoringSettingsGetResponse = MonitoringSettingResource & { /** * The underlying HTTP response. */ @@ -1535,14 +1752,14 @@ export type ServicesListResponse = ServiceResourceList & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResourceList; + parsedBody: MonitoringSettingResource; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the updatePut operation. */ -export type ServicesBeginCreateOrUpdateResponse = ServiceResource & { +export type MonitoringSettingsUpdatePutResponse = MonitoringSettingResource & { /** * The underlying HTTP response. */ @@ -1555,14 +1772,14 @@ export type ServicesBeginCreateOrUpdateResponse = ServiceResource & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResource; + parsedBody: MonitoringSettingResource; }; }; /** - * Contains response data for the beginUpdate operation. + * Contains response data for the updatePatch operation. */ -export type ServicesBeginUpdateResponse = ServiceResource & { +export type MonitoringSettingsUpdatePatchResponse = MonitoringSettingResource & { /** * The underlying HTTP response. */ @@ -1575,14 +1792,14 @@ export type ServicesBeginUpdateResponse = ServiceResource & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResource; + parsedBody: MonitoringSettingResource; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the beginUpdatePut operation. */ -export type ServicesListBySubscriptionNextResponse = ServiceResourceList & { +export type MonitoringSettingsBeginUpdatePutResponse = MonitoringSettingResource & { /** * The underlying HTTP response. */ @@ -1595,14 +1812,14 @@ export type ServicesListBySubscriptionNextResponse = ServiceResourceList & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResourceList; + parsedBody: MonitoringSettingResource; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the beginUpdatePatch operation. */ -export type ServicesListNextResponse = ServiceResourceList & { +export type MonitoringSettingsBeginUpdatePatchResponse = MonitoringSettingResource & { /** * The underlying HTTP response. */ @@ -1615,7 +1832,7 @@ export type ServicesListNextResponse = ServiceResourceList & { /** * The response body as parsed JSON or XML */ - parsedBody: ServiceResourceList; + parsedBody: MonitoringSettingResource; }; }; @@ -1719,6 +1936,26 @@ export type AppsGetResourceUploadUrlResponse = ResourceUploadDefinition & { }; }; +/** + * Contains response data for the validateDomain operation. + */ +export type AppsValidateDomainResponse = CustomDomainValidateResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomDomainValidateResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -1859,6 +2096,46 @@ export type BindingsListResponse = BindingResourceCollection & { }; }; +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type BindingsBeginCreateOrUpdateResponse = BindingResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BindingResource; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type BindingsBeginUpdateResponse = BindingResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: BindingResource; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -1939,6 +2216,26 @@ export type CertificatesListResponse = CertificateResourceCollection & { }; }; +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type CertificatesBeginCreateOrUpdateResponse = CertificateResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CertificateResource; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -2000,9 +2297,9 @@ export type CustomDomainsCreateOrUpdateResponse = CustomDomainResource & { }; /** - * Contains response data for the patch operation. + * Contains response data for the update operation. */ -export type CustomDomainsPatchResponse = CustomDomainResource & { +export type CustomDomainsUpdateResponse = CustomDomainResource & { /** * The underlying HTTP response. */ @@ -2040,9 +2337,9 @@ export type CustomDomainsListResponse = CustomDomainResourceCollection & { }; /** - * Contains response data for the validate operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type CustomDomainsValidateResponse = CustomDomainValidateResult & { +export type CustomDomainsBeginCreateOrUpdateResponse = CustomDomainResource & { /** * The underlying HTTP response. */ @@ -2055,7 +2352,27 @@ export type CustomDomainsValidateResponse = CustomDomainValidateResult & { /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomainValidateResult; + parsedBody: CustomDomainResource; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type CustomDomainsBeginUpdateResponse = CustomDomainResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CustomDomainResource; }; }; @@ -2160,9 +2477,9 @@ export type DeploymentsListResponse = DeploymentResourceCollection & { }; /** - * Contains response data for the listClusterAllDeployments operation. + * Contains response data for the listForCluster operation. */ -export type DeploymentsListClusterAllDeploymentsResponse = DeploymentResourceCollection & { +export type DeploymentsListForClusterResponse = DeploymentResourceCollection & { /** * The underlying HTTP response. */ @@ -2260,9 +2577,9 @@ export type DeploymentsListNextResponse = DeploymentResourceCollection & { }; /** - * Contains response data for the listClusterAllDeploymentsNext operation. + * Contains response data for the listForClusterNext operation. */ -export type DeploymentsListClusterAllDeploymentsNextResponse = DeploymentResourceCollection & { +export type DeploymentsListForClusterNextResponse = DeploymentResourceCollection & { /** * The underlying HTTP response. */ @@ -2322,7 +2639,7 @@ export type OperationsListNextResponse = AvailableOperations & { /** * Contains response data for the list operation. */ -export type SkuListResponse = ResourceSkuCollection & { +export type SkusListResponse = ResourceSkuCollection & { /** * The underlying HTTP response. */ @@ -2342,7 +2659,7 @@ export type SkuListResponse = ResourceSkuCollection & { /** * Contains response data for the listNext operation. */ -export type SkuListNextResponse = ResourceSkuCollection & { +export type SkusListNextResponse = ResourceSkuCollection & { /** * The underlying HTTP response. */ diff --git a/sdk/appplatform/arm-appplatform/src/models/mappers.ts b/sdk/appplatform/arm-appplatform/src/models/mappers.ts index 9e0d0722dd07..8db4dd0e427f 100644 --- a/sdk/appplatform/arm-appplatform/src/models/mappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/mappers.ts @@ -12,6 +12,224 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const NetworkProfile: msRest.CompositeMapper = { + serializedName: "NetworkProfile", + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + serviceRuntimeSubnetId: { + serializedName: "serviceRuntimeSubnetId", + type: { + name: "String" + } + }, + appSubnetId: { + serializedName: "appSubnetId", + type: { + name: "String" + } + }, + serviceCidr: { + serializedName: "serviceCidr", + type: { + name: "String" + } + }, + serviceRuntimeNetworkResourceGroup: { + serializedName: "serviceRuntimeNetworkResourceGroup", + type: { + name: "String" + } + }, + appNetworkResourceGroup: { + serializedName: "appNetworkResourceGroup", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterResourceProperties: msRest.CompositeMapper = { + serializedName: "ClusterResourceProperties", + type: { + name: "Composite", + className: "ClusterResourceProperties", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + networkProfile: { + serializedName: "networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + }, + version: { + readOnly: true, + serializedName: "version", + type: { + name: "Number" + } + }, + serviceId: { + readOnly: true, + serializedName: "serviceId", + type: { + name: "String" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + }, + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ServiceResource: msRest.CompositeMapper = { + serializedName: "ServiceResource", + type: { + name: "Composite", + className: "ServiceResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClusterResourceProperties" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + } + } + } +}; + +export const ManagedIdentityProperties: msRest.CompositeMapper = { + serializedName: "ManagedIdentityProperties", + type: { + name: "Composite", + className: "ManagedIdentityProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + } + } + } +}; + export const ErrorModel: msRest.CompositeMapper = { serializedName: "Error", type: { @@ -227,9 +445,9 @@ export const ConfigServerProperties: msRest.CompositeMapper = { name: "Composite", className: "ConfigServerProperties", modelProperties: { - state: { + provisioningState: { readOnly: true, - serializedName: "state", + serializedName: "provisioningState", type: { name: "String" } @@ -252,87 +470,40 @@ export const ConfigServerProperties: msRest.CompositeMapper = { } }; -export const TraceProperties: msRest.CompositeMapper = { - serializedName: "TraceProperties", +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", type: { name: "Composite", - className: "TraceProperties", + className: "ProxyResource", modelProperties: { - state: { - readOnly: true, - serializedName: "state", - type: { - name: "String" - } - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorModel" - } - }, - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - appInsightInstrumentationKey: { - serializedName: "appInsightInstrumentationKey", - type: { - name: "String" - } - } + ...Resource.type.modelProperties } } }; -export const NetworkProfile: msRest.CompositeMapper = { - serializedName: "NetworkProfile", +export const ConfigServerResource: msRest.CompositeMapper = { + serializedName: "ConfigServerResource", type: { name: "Composite", - className: "NetworkProfile", + className: "ConfigServerResource", modelProperties: { - serviceRuntimeSubnetId: { - serializedName: "serviceRuntimeSubnetId", - type: { - name: "String" - } - }, - appSubnetId: { - serializedName: "appSubnetId", - type: { - name: "String" - } - }, - serviceCidr: { - serializedName: "serviceCidr", - type: { - name: "String" - } - }, - serviceRuntimeNetworkResourceGroup: { - serializedName: "serviceRuntimeNetworkResourceGroup", - type: { - name: "String" - } - }, - appNetworkResourceGroup: { - serializedName: "appNetworkResourceGroup", + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "ConfigServerProperties" } } } } }; -export const ClusterResourceProperties: msRest.CompositeMapper = { - serializedName: "ClusterResourceProperties", +export const MonitoringSettingProperties: msRest.CompositeMapper = { + serializedName: "MonitoringSettingProperties", type: { name: "Composite", - className: "ClusterResourceProperties", + className: "MonitoringSettingProperties", modelProperties: { provisioningState: { readOnly: true, @@ -341,96 +512,21 @@ export const ClusterResourceProperties: msRest.CompositeMapper = { name: "String" } }, - configServerProperties: { - serializedName: "configServerProperties", - type: { - name: "Composite", - className: "ConfigServerProperties" - } - }, - trace: { - serializedName: "trace", - type: { - name: "Composite", - className: "TraceProperties" - } - }, - networkProfile: { - serializedName: "networkProfile", + error: { + serializedName: "error", type: { name: "Composite", - className: "NetworkProfile" - } - }, - version: { - readOnly: true, - serializedName: "version", - type: { - name: "Number" - } - }, - serviceId: { - readOnly: true, - serializedName: "serviceId", - type: { - name: "String" - } - } - } - } -}; - -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - type: { - name: "String" - } - }, - capacity: { - serializedName: "capacity", - type: { - name: "Number" - } - } - } - } -}; - -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" + className: "ErrorModel" } }, - name: { - readOnly: true, - serializedName: "name", + traceEnabled: { + serializedName: "traceEnabled", type: { - name: "String" + name: "Boolean" } }, - type: { - readOnly: true, - serializedName: "type", + appInsightsInstrumentationKey: { + serializedName: "appInsightsInstrumentationKey", type: { name: "String" } @@ -439,81 +535,18 @@ export const Resource: msRest.CompositeMapper = { } }; -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", +export const MonitoringSettingResource: msRest.CompositeMapper = { + serializedName: "MonitoringSettingResource", type: { name: "Composite", - className: "TrackedResource", + className: "MonitoringSettingResource", modelProperties: { - ...Resource.type.modelProperties, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ServiceResource: msRest.CompositeMapper = { - serializedName: "ServiceResource", - type: { - name: "Composite", - className: "ServiceResource", - modelProperties: { - ...TrackedResource.type.modelProperties, + ...ProxyResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "ClusterResourceProperties" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - } - } - } -}; - -export const ManagedIdentityProperties: msRest.CompositeMapper = { - serializedName: "ManagedIdentityProperties", - type: { - name: "Composite", - className: "ManagedIdentityProperties", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" + className: "MonitoringSettingProperties" } } } @@ -709,17 +742,6 @@ export const AppResourceProperties: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - export const AppResource: msRest.CompositeMapper = { serializedName: "AppResource", type: { @@ -1159,13 +1181,6 @@ export const DeploymentSettings: msRest.CompositeMapper = { name: "String" } }, - instanceCount: { - serializedName: "instanceCount", - defaultValue: 1, - type: { - name: "Number" - } - }, environmentVariables: { serializedName: "environmentVariables", type: { @@ -1310,6 +1325,13 @@ export const DeploymentResource: msRest.CompositeMapper = { name: "Composite", className: "DeploymentResourceProperties" } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } } } } diff --git a/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts new file mode 100644 index 000000000000..125c2ba459b5 --- /dev/null +++ b/sdk/appplatform/arm-appplatform/src/models/monitoringSettingsMappers.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AppResource, + AppResourceProperties, + BaseResource, + BindingResource, + BindingResourceProperties, + CertificateProperties, + CertificateResource, + CloudError, + ClusterResourceProperties, + ConfigServerGitProperty, + ConfigServerProperties, + ConfigServerResource, + ConfigServerSettings, + CustomDomainProperties, + CustomDomainResource, + DeploymentInstance, + DeploymentResource, + DeploymentResourceProperties, + DeploymentSettings, + ErrorModel, + GitPatternRepository, + ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, + NetworkProfile, + PersistentDisk, + ProxyResource, + Resource, + ServiceResource, + Sku, + TemporaryDisk, + TrackedResource, + UserSourceInfo +} from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/parameters.ts b/sdk/appplatform/arm-appplatform/src/models/parameters.ts index 723207ebf057..a9b230427bbf 100644 --- a/sdk/appplatform/arm-appplatform/src/models/parameters.ts +++ b/sdk/appplatform/arm-appplatform/src/models/parameters.ts @@ -26,7 +26,7 @@ export const apiVersion: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2019-05-01-preview', + defaultValue: '2020-07-01', type: { name: "String" } diff --git a/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts b/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts index 2909bc6cbc55..70e4035a51cd 100644 --- a/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts +++ b/sdk/appplatform/arm-appplatform/src/models/servicesMappers.ts @@ -18,6 +18,7 @@ export { ClusterResourceProperties, ConfigServerGitProperty, ConfigServerProperties, + ConfigServerResource, ConfigServerSettings, CustomDomainProperties, CustomDomainResource, @@ -28,6 +29,8 @@ export { ErrorModel, GitPatternRepository, ManagedIdentityProperties, + MonitoringSettingProperties, + MonitoringSettingResource, NameAvailability, NameAvailabilityParameters, NetworkProfile, @@ -40,7 +43,6 @@ export { Sku, TemporaryDisk, TestKeys, - TraceProperties, TrackedResource, UserSourceInfo } from "../models/mappers"; diff --git a/sdk/appplatform/arm-appplatform/src/models/skuOperationsMappers.ts b/sdk/appplatform/arm-appplatform/src/models/skusMappers.ts similarity index 100% rename from sdk/appplatform/arm-appplatform/src/models/skuOperationsMappers.ts rename to sdk/appplatform/arm-appplatform/src/models/skusMappers.ts diff --git a/sdk/appplatform/arm-appplatform/src/operations/apps.ts b/sdk/appplatform/arm-appplatform/src/operations/apps.ts index e8243fd1d777..d7413a50ba84 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/apps.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/apps.ts @@ -90,34 +90,9 @@ export class Apps { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, callback: msRest.ServiceCallback): void; - /** - * @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 appName The name of the App resource. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - appName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serviceName,appName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -209,6 +184,49 @@ export class Apps { callback) as Promise; } + /** + * Check the resource name is valid as well as not in use. + * @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 appName The name of the App resource. + * @param validatePayload Custom domain payload to be validated + * @param [options] The optional parameters + * @returns Promise + */ + validateDomain(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, options?: msRest.RequestOptionsBase): Promise; + /** + * @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 appName The name of the App resource. + * @param validatePayload Custom domain payload to be validated + * @param callback The callback + */ + validateDomain(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, callback: msRest.ServiceCallback): void; + /** + * @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 appName The name of the App resource. + * @param validatePayload Custom domain payload to be validated + * @param options The optional parameters + * @param callback The callback + */ + validateDomain(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + validateDomain(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + appName, + validatePayload, + options + }, + validateDomainOperationSpec, + callback) as Promise; + } + /** * Create a new App or update an exiting App. * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -232,6 +250,27 @@ export class Apps { options); } + /** + * Operation to delete an App. + * @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 appName The name of the App resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + appName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** * Operation to update an exiting App. * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -313,14 +352,13 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}", +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.appName + Parameters.serviceName ], queryParameters: [ Parameters.apiVersion @@ -329,8 +367,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.AppResourceCollection + }, default: { bodyMapper: Mappers.CloudError } @@ -338,13 +377,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps", +const getResourceUploadUrlOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serviceName + Parameters.serviceName, + Parameters.appName ], queryParameters: [ Parameters.apiVersion @@ -354,7 +394,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.AppResourceCollection + bodyMapper: Mappers.ResourceUploadDefinition }, default: { bodyMapper: Mappers.CloudError @@ -363,9 +403,9 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const getResourceUploadUrlOperationSpec: msRest.OperationSpec = { +const validateDomainOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/getResourceUploadUrl", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/validateDomain", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -378,9 +418,16 @@ const getResourceUploadUrlOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "validatePayload", + mapper: { + ...Mappers.CustomDomainValidatePayload, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.ResourceUploadDefinition + bodyMapper: Mappers.CustomDomainValidateResult }, default: { bodyMapper: Mappers.CloudError @@ -418,6 +465,35 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.AppResource }, + 202: { + bodyMapper: Mappers.AppResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.appName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/appplatform/arm-appplatform/src/operations/bindings.ts b/sdk/appplatform/arm-appplatform/src/operations/bindings.ts index 4b64e8fd7de0..b0ade9e91153 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/bindings.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/bindings.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/bindingsMappers"; import * as Parameters from "../models/parameters"; @@ -80,120 +81,94 @@ export class Bindings { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serviceName,appName,bindingName,bindingResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** + * Operation to delete a Binding. * @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 appName The name of the App resource. * @param bindingName The name of the Binding resource. - * @param bindingResource Parameters for the create or update operation - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serviceName,appName,bindingName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Operation to update an exiting Binding. * @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 appName The name of the App resource. * @param bindingName The name of the Binding resource. - * @param bindingResource Parameters for the create or update operation - * @param options The optional parameters - * @param callback The callback + * @param bindingResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - appName, - bindingName, - bindingResource, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + update(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serviceName,appName,bindingName,bindingResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** - * Operation to delete a Binding. + * Handles requests to list all resources in an App. * @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 appName The name of the App resource. - * @param bindingName The name of the Binding resource. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise; /** * @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 appName The name of the App resource. - * @param bindingName The name of the Binding resource. * @param callback The callback */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serviceName: string, appName: string, callback: msRest.ServiceCallback): void; /** * @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 appName The name of the App resource. - * @param bindingName The name of the Binding resource. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, serviceName: string, appName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, serviceName, appName, - bindingName, options }, - deleteMethodOperationSpec, - callback); + listOperationSpec, + callback) as Promise; } /** - * Operation to update an exiting Binding. + * Create a new Binding or update an exiting Binding. * @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 appName The name of the App resource. * @param bindingName The name of the Binding resource. - * @param bindingResource Parameters for the update operation + * @param bindingResource Parameters for the create or update operation * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param bindingName The name of the Binding resource. - * @param bindingResource Parameters for the update operation - * @param callback The callback + * @returns Promise */ - update(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, callback: msRest.ServiceCallback): void; - /** - * @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 appName The name of the App resource. - * @param bindingName The name of the Binding resource. - * @param bindingResource Parameters for the update operation - * @param options The optional parameters - * @param callback The callback - */ - update(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, serviceName, @@ -202,47 +177,56 @@ export class Bindings { bindingResource, options }, - updateOperationSpec, - callback) as Promise; + beginCreateOrUpdateOperationSpec, + options); } /** - * Handles requests to list all resources in an App. + * Operation to delete a Binding. * @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 appName The name of the App resource. + * @param bindingName The name of the Binding resource. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param callback The callback - */ - list(resourceGroupName: string, serviceName: string, appName: string, callback: msRest.ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + appName, + bindingName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** + * Operation to update an exiting Binding. * @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 appName The name of the App resource. - * @param options The optional parameters - * @param callback The callback + * @param bindingName The name of the Binding resource. + * @param bindingResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise */ - list(resourceGroupName: string, serviceName: string, appName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginUpdate(resourceGroupName: string, serviceName: string, appName: string, bindingName: string, bindingResource: Models.BindingResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, serviceName, appName, + bindingName, + bindingResource, options }, - listOperationSpec, - callback) as Promise; + beginUpdateOperationSpec, + options); } /** @@ -303,7 +287,33 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.appName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BindingResourceCollection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}", urlParameters: [ @@ -330,6 +340,12 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.BindingResource }, + 201: { + bodyMapper: Mappers.BindingResource + }, + 202: { + bodyMapper: Mappers.BindingResource + }, default: { bodyMapper: Mappers.CloudError } @@ -337,7 +353,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}", urlParameters: [ @@ -355,6 +371,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { ], responses: { 200: {}, + 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError @@ -363,7 +380,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { +const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings/{bindingName}", urlParameters: [ @@ -390,31 +407,8 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.BindingResource }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/bindings", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.appName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BindingResourceCollection + 202: { + bodyMapper: Mappers.BindingResource }, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/appplatform/arm-appplatform/src/operations/certificates.ts b/sdk/appplatform/arm-appplatform/src/operations/certificates.ts index c03f4f8d1bd5..9fcdd833fcb9 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/certificates.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/certificates.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/certificatesMappers"; import * as Parameters from "../models/parameters"; @@ -75,111 +76,102 @@ export class Certificates { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: Models.CertificateResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 certificateName The name of the certificate resource. - * @param certificateResource Parameters for the create or update operation - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: Models.CertificateResource, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: Models.CertificateResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serviceName,certificateName,certificateResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** + * Delete the certificate 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 certificateName The name of the certificate resource. - * @param certificateResource Parameters for the create or update operation - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: Models.CertificateResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: Models.CertificateResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - certificateName, - certificateResource, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + deleteMethod(resourceGroupName: string, serviceName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serviceName,certificateName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** - * Delete the certificate resource. + * List all the certificates of one user. * @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 certificateName The name of the certificate resource. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, serviceName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; /** * @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 certificateName The name of the certificate resource. * @param callback The callback */ - deleteMethod(resourceGroupName: string, serviceName: string, certificateName: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serviceName: string, callback: msRest.ServiceCallback): void; /** * @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 certificateName The name of the certificate resource. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, serviceName: string, certificateName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, serviceName: string, certificateName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, serviceName, - certificateName, options }, - deleteMethodOperationSpec, - callback); + listOperationSpec, + callback) as Promise; } /** - * List all the certificates of one user. + * Create or update certificate 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 certificateName The name of the certificate resource. + * @param certificateResource Parameters for the create or update operation * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 callback The callback + * @returns Promise */ - list(resourceGroupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, certificateName: string, certificateResource: Models.CertificateResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + certificateName, + certificateResource, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + /** + * Delete the certificate 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 optional parameters - * @param callback The callback + * @param certificateName The name of the certificate resource. + * @param [options] The optional parameters + * @returns Promise */ - list(resourceGroupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod(resourceGroupName: string, serviceName: string, certificateName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, serviceName, + certificateName, options }, - listOperationSpec, - callback) as Promise; + beginDeleteMethodOperationSpec, + options); } /** @@ -239,14 +231,13 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}", +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.certificateName + Parameters.serviceName ], queryParameters: [ Parameters.apiVersion @@ -254,16 +245,9 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "certificateResource", - mapper: { - ...Mappers.CertificateResource, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CertificateResource + bodyMapper: Mappers.CertificateResourceCollection }, default: { bodyMapper: Mappers.CloudError @@ -272,8 +256,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}", urlParameters: [ Parameters.subscriptionId, @@ -287,9 +271,23 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "certificateResource", + mapper: { + ...Mappers.CertificateResource, + required: true + } + }, responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.CertificateResource + }, + 201: { + bodyMapper: Mappers.CertificateResource + }, + 202: { + bodyMapper: Mappers.CertificateResource + }, default: { bodyMapper: Mappers.CloudError } @@ -297,13 +295,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/certificates/{certificateName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serviceName + Parameters.serviceName, + Parameters.certificateName ], queryParameters: [ Parameters.apiVersion @@ -312,9 +311,9 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.CertificateResourceCollection - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/appplatform/arm-appplatform/src/operations/configServers.ts b/sdk/appplatform/arm-appplatform/src/operations/configServers.ts new file mode 100644 index 000000000000..97d1ae6a8171 --- /dev/null +++ b/sdk/appplatform/arm-appplatform/src/operations/configServers.ts @@ -0,0 +1,231 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/configServersMappers"; +import * as Parameters from "../models/parameters"; +import { AppPlatformManagementClientContext } from "../appPlatformManagementClientContext"; + +/** Class representing a ConfigServers. */ +export class ConfigServers { + private readonly client: AppPlatformManagementClientContext; + + /** + * Create a ConfigServers. + * @param {AppPlatformManagementClientContext} client Reference to the service client. + */ + constructor(client: AppPlatformManagementClientContext) { + this.client = client; + } + + /** + * Get the config server and its properties. + * @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 optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @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 callback The callback + */ + get(resourceGroupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @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 optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the config server. + * @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 configServerResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + updatePut(resourceGroupName: string, serviceName: string, configServerResource: Models.ConfigServerResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdatePut(resourceGroupName,serviceName,configServerResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update the config server. + * @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 configServerResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + updatePatch(resourceGroupName: string, serviceName: string, configServerResource: Models.ConfigServerResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdatePatch(resourceGroupName,serviceName,configServerResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update the config server. + * @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 configServerResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdatePut(resourceGroupName: string, serviceName: string, configServerResource: Models.ConfigServerResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + configServerResource, + options + }, + beginUpdatePutOperationSpec, + options); + } + + /** + * Update the config server. + * @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 configServerResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdatePatch(resourceGroupName: string, serviceName: string, configServerResource: Models.ConfigServerResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + configServerResource, + options + }, + beginUpdatePatchOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ConfigServerResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdatePutOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "configServerResource", + mapper: { + ...Mappers.ConfigServerResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ConfigServerResource + }, + 202: { + bodyMapper: Mappers.ConfigServerResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdatePatchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "configServerResource", + mapper: { + ...Mappers.ConfigServerResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ConfigServerResource + }, + 202: { + bodyMapper: Mappers.ConfigServerResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts b/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts index 679dcc6eb56b..8a2eb4a44765 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/customDomains.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/customDomainsMappers"; import * as Parameters from "../models/parameters"; @@ -80,87 +81,83 @@ export class CustomDomains { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,serviceName,appName,domainName,domainResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** + * Delete the custom domain of one lifecycle application. * @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 appName The name of the App resource. * @param domainName The name of the custom domain resource. - * @param domainResource Parameters for the create or update operation - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serviceName,appName,domainName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** + * Update custom domain of one lifecycle application. * @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 appName The name of the App resource. * @param domainName The name of the custom domain resource. * @param domainResource Parameters for the create or update operation - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - appName, - domainName, - domainResource, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + update(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,serviceName,appName,domainName,domainResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** - * Delete the custom domain of one lifecycle application. + * List the custom domains of one lifecycle application. * @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 appName The name of the App resource. - * @param domainName The name of the custom domain resource. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise; /** * @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 appName The name of the App resource. - * @param domainName The name of the custom domain resource. * @param callback The callback */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, domainName: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serviceName: string, appName: string, callback: msRest.ServiceCallback): void; /** * @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 appName The name of the App resource. - * @param domainName The name of the custom domain resource. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, serviceName: string, appName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, serviceName, appName, - domainName, options }, - deleteMethodOperationSpec, - callback); + listOperationSpec, + callback) as Promise; } /** - * Update custom domain of one lifecycle application. + * Create or update custom domain of one lifecycle application. * @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. @@ -168,32 +165,10 @@ export class CustomDomains { * @param domainName The name of the custom domain resource. * @param domainResource Parameters for the create or update operation * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - patch(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param domainName The name of the custom domain resource. - * @param domainResource Parameters for the create or update operation - * @param callback The callback - */ - patch(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, callback: msRest.ServiceCallback): void; - /** - * @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 appName The name of the App resource. - * @param domainName The name of the custom domain resource. - * @param domainResource Parameters for the create or update operation - * @param options The optional parameters - * @param callback The callback - */ - patch(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - patch(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginCreateOrUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, serviceName, @@ -202,90 +177,56 @@ export class CustomDomains { domainResource, options }, - patchOperationSpec, - callback) as Promise; + beginCreateOrUpdateOperationSpec, + options); } /** - * List the custom domains of one lifecycle application. + * Delete the custom domain of one lifecycle application. * @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 appName The name of the App resource. + * @param domainName The name of the custom domain resource. * @param [options] The optional parameters - * @returns Promise - */ - list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param callback The callback - */ - list(resourceGroupName: string, serviceName: string, appName: string, callback: msRest.ServiceCallback): void; - /** - * @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 appName The name of the App resource. - * @param options The optional parameters - * @param callback The callback + * @returns Promise */ - list(resourceGroupName: string, serviceName: string, appName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, serviceName: string, appName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginDeleteMethod(resourceGroupName: string, serviceName: string, appName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, serviceName, appName, + domainName, options }, - listOperationSpec, - callback) as Promise; + beginDeleteMethodOperationSpec, + options); } /** - * Check the resource name is valid as well as not in use. + * Update custom domain of one lifecycle application. * @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 appName The name of the App resource. - * @param validatePayload + * @param domainName The name of the custom domain resource. + * @param domainResource Parameters for the create or update operation * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - validate(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param validatePayload - * @param callback The callback - */ - validate(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, callback: msRest.ServiceCallback): void; - /** - * @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 appName The name of the App resource. - * @param validatePayload - * @param options The optional parameters - * @param callback The callback - */ - validate(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validate(resourceGroupName: string, serviceName: string, appName: string, validatePayload: Models.CustomDomainValidatePayload, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginUpdate(resourceGroupName: string, serviceName: string, appName: string, domainName: string, domainResource: Models.CustomDomainResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, serviceName, appName, - validatePayload, + domainName, + domainResource, options }, - validateOperationSpec, - callback) as Promise; + beginUpdateOperationSpec, + options); } /** @@ -346,15 +287,14 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}", +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serviceName, - Parameters.appName, - Parameters.domainName + Parameters.appName ], queryParameters: [ Parameters.apiVersion @@ -362,16 +302,9 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "domainResource", - mapper: { - ...Mappers.CustomDomainResource, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.CustomDomainResource + bodyMapper: Mappers.CustomDomainResourceCollection }, default: { bodyMapper: Mappers.CloudError @@ -380,34 +313,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.appName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const patchOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}", urlParameters: [ Parameters.subscriptionId, @@ -433,6 +340,12 @@ const patchOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.CustomDomainResource }, + 201: { + bodyMapper: Mappers.CustomDomainResource + }, + 202: { + bodyMapper: Mappers.CustomDomainResource + }, default: { bodyMapper: Mappers.CloudError } @@ -440,14 +353,15 @@ const patchOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serviceName, - Parameters.appName + Parameters.appName, + Parameters.domainName ], queryParameters: [ Parameters.apiVersion @@ -456,9 +370,9 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.CustomDomainResourceCollection - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -466,14 +380,15 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const validateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/validate", +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/domains/{domainName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serviceName, - Parameters.appName + Parameters.appName, + Parameters.domainName ], queryParameters: [ Parameters.apiVersion @@ -482,15 +397,18 @@ const validateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "validatePayload", + parameterPath: "domainResource", mapper: { - ...Mappers.CustomDomainValidatePayload, + ...Mappers.CustomDomainResource, required: true } }, responses: { 200: { - bodyMapper: Mappers.CustomDomainValidateResult + bodyMapper: Mappers.CustomDomainResource + }, + 202: { + bodyMapper: Mappers.CustomDomainResource }, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/appplatform/arm-appplatform/src/operations/deployments.ts b/sdk/appplatform/arm-appplatform/src/operations/deployments.ts index de97c2bf9309..22cd12d4d7f9 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/deployments.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/deployments.ts @@ -96,37 +96,9 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @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 appName The name of the App resource. - * @param deploymentName The name of the Deployment resource. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, callback: msRest.ServiceCallback): void; - /** - * @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 appName The name of the App resource. - * @param deploymentName The name of the Deployment resource. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serviceName, - appName, - deploymentName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,serviceName,appName,deploymentName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -190,16 +162,16 @@ export class Deployments { * obtain this value from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listClusterAllDeployments(resourceGroupName: string, serviceName: string, options?: Models.DeploymentsListClusterAllDeploymentsOptionalParams): Promise; + listForCluster(resourceGroupName: string, serviceName: string, options?: Models.DeploymentsListForClusterOptionalParams): Promise; /** * @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 callback The callback */ - listClusterAllDeployments(resourceGroupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + listForCluster(resourceGroupName: string, serviceName: string, callback: msRest.ServiceCallback): void; /** * @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. @@ -207,16 +179,16 @@ export class Deployments { * @param options The optional parameters * @param callback The callback */ - listClusterAllDeployments(resourceGroupName: string, serviceName: string, options: Models.DeploymentsListClusterAllDeploymentsOptionalParams, callback: msRest.ServiceCallback): void; - listClusterAllDeployments(resourceGroupName: string, serviceName: string, options?: Models.DeploymentsListClusterAllDeploymentsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForCluster(resourceGroupName: string, serviceName: string, options: Models.DeploymentsListForClusterOptionalParams, callback: msRest.ServiceCallback): void; + listForCluster(resourceGroupName: string, serviceName: string, options?: Models.DeploymentsListForClusterOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, serviceName, options }, - listClusterAllDeploymentsOperationSpec, - callback) as Promise; + listForClusterOperationSpec, + callback) as Promise; } /** @@ -332,6 +304,29 @@ export class Deployments { options); } + /** + * Operation to delete a Deployment. + * @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 appName The name of the App resource. + * @param deploymentName The name of the Deployment resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, serviceName: string, appName: string, deploymentName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + appName, + deploymentName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** * Operation to update an exiting Deployment. * @param resourceGroupName The name of the resource group that contains the resource. You can @@ -458,28 +453,28 @@ export class Deployments { * List deployments for a certain service * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listClusterAllDeploymentsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listForClusterNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listClusterAllDeploymentsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listForClusterNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listClusterAllDeploymentsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listClusterAllDeploymentsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listForClusterNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listForClusterNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listClusterAllDeploymentsNextOperationSpec, - callback) as Promise; + listForClusterNextOperationSpec, + callback) as Promise; } } @@ -512,32 +507,6 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serviceName, - Parameters.appName, - Parameters.deploymentName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments", @@ -565,7 +534,7 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listClusterAllDeploymentsOperationSpec: msRest.OperationSpec = { +const listForClusterOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/deployments", urlParameters: [ @@ -649,6 +618,36 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.DeploymentResource }, + 202: { + bodyMapper: Mappers.DeploymentResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName, + Parameters.appName, + Parameters.deploymentName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -792,7 +791,7 @@ const listNextOperationSpec: msRest.OperationSpec = { serializer }; -const listClusterAllDeploymentsNextOperationSpec: msRest.OperationSpec = { +const listForClusterNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", diff --git a/sdk/appplatform/arm-appplatform/src/operations/index.ts b/sdk/appplatform/arm-appplatform/src/operations/index.ts index a129c10cc035..a69d0e4a8dcf 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/index.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/index.ts @@ -9,10 +9,12 @@ */ export * from "./services"; +export * from "./configServers"; +export * from "./monitoringSettings"; export * from "./apps"; export * from "./bindings"; export * from "./certificates"; export * from "./customDomains"; export * from "./deployments"; export * from "./operations"; -export * from "./skuOperations"; +export * from "./skus"; diff --git a/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts b/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts new file mode 100644 index 000000000000..9e7f62e04593 --- /dev/null +++ b/sdk/appplatform/arm-appplatform/src/operations/monitoringSettings.ts @@ -0,0 +1,231 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/monitoringSettingsMappers"; +import * as Parameters from "../models/parameters"; +import { AppPlatformManagementClientContext } from "../appPlatformManagementClientContext"; + +/** Class representing a MonitoringSettings. */ +export class MonitoringSettings { + private readonly client: AppPlatformManagementClientContext; + + /** + * Create a MonitoringSettings. + * @param {AppPlatformManagementClientContext} client Reference to the service client. + */ + constructor(client: AppPlatformManagementClientContext) { + this.client = client; + } + + /** + * Get the Monitoring Setting and its properties. + * @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 optional parameters + * @returns Promise + */ + get(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @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 callback The callback + */ + get(resourceGroupName: string, serviceName: string, callback: msRest.ServiceCallback): void; + /** + * @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 optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, serviceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, serviceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serviceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the Monitoring Setting. + * @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 monitoringSettingResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + updatePut(resourceGroupName: string, serviceName: string, monitoringSettingResource: Models.MonitoringSettingResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdatePut(resourceGroupName,serviceName,monitoringSettingResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update the Monitoring Setting. + * @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 monitoringSettingResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + updatePatch(resourceGroupName: string, serviceName: string, monitoringSettingResource: Models.MonitoringSettingResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdatePatch(resourceGroupName,serviceName,monitoringSettingResource,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update the Monitoring Setting. + * @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 monitoringSettingResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdatePut(resourceGroupName: string, serviceName: string, monitoringSettingResource: Models.MonitoringSettingResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + monitoringSettingResource, + options + }, + beginUpdatePutOperationSpec, + options); + } + + /** + * Update the Monitoring Setting. + * @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 monitoringSettingResource Parameters for the update operation + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdatePatch(resourceGroupName: string, serviceName: string, monitoringSettingResource: Models.MonitoringSettingResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + serviceName, + monitoringSettingResource, + options + }, + beginUpdatePatchOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MonitoringSettingResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdatePutOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "monitoringSettingResource", + mapper: { + ...Mappers.MonitoringSettingResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MonitoringSettingResource + }, + 202: { + bodyMapper: Mappers.MonitoringSettingResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdatePatchOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/monitoringSettings/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.serviceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "monitoringSettingResource", + mapper: { + ...Mappers.MonitoringSettingResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MonitoringSettingResource + }, + 202: { + bodyMapper: Mappers.MonitoringSettingResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/appplatform/arm-appplatform/src/operations/services.ts b/sdk/appplatform/arm-appplatform/src/operations/services.ts index 2fb93aaf36af..c04bedce4d2f 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/services.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/services.ts @@ -178,6 +178,7 @@ export class Services { } /** + * Disable test endpoint functionality for a Service. * @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. @@ -212,6 +213,7 @@ export class Services { } /** + * Enable test endpoint functionality for a Service. * @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. @@ -688,6 +690,9 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.ServiceResource }, + 202: { + bodyMapper: Mappers.ServiceResource + }, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/appplatform/arm-appplatform/src/operations/skuOperations.ts b/sdk/appplatform/arm-appplatform/src/operations/skus.ts similarity index 82% rename from sdk/appplatform/arm-appplatform/src/operations/skuOperations.ts rename to sdk/appplatform/arm-appplatform/src/operations/skus.ts index a896aaded6ec..3c6671194dba 100644 --- a/sdk/appplatform/arm-appplatform/src/operations/skuOperations.ts +++ b/sdk/appplatform/arm-appplatform/src/operations/skus.ts @@ -10,16 +10,16 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; -import * as Mappers from "../models/skuOperationsMappers"; +import * as Mappers from "../models/skusMappers"; import * as Parameters from "../models/parameters"; import { AppPlatformManagementClientContext } from "../appPlatformManagementClientContext"; -/** Class representing a SkuOperations. */ -export class SkuOperations { +/** Class representing a Skus. */ +export class Skus { private readonly client: AppPlatformManagementClientContext; /** - * Create a SkuOperations. + * Create a Skus. * @param {AppPlatformManagementClientContext} client Reference to the service client. */ constructor(client: AppPlatformManagementClientContext) { @@ -27,10 +27,11 @@ export class SkuOperations { } /** + * Lists all of the available skus of the Microsoft.AppPlatform provider. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ @@ -40,21 +41,22 @@ export class SkuOperations { * @param callback The callback */ list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listOperationSpec, - callback) as Promise; + callback) as Promise; } /** + * Lists all of the available skus of the Microsoft.AppPlatform provider. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -66,14 +68,14 @@ export class SkuOperations { * @param callback The callback */ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, - callback) as Promise; + callback) as Promise; } }