From bf310b0783bf7207d89975a1f5916f75c4f4c1b7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 15 Oct 2018 07:44:03 -0700 Subject: [PATCH 1/2] Generated from 4e40c606f9da0b2bc4d5fc95cb7d6fe072cf2170 (#138) Adding OpenShiftManagedClusterBaseIdentityProvider and rename properties --- .../@azure/arm-containerservice/.npmignore | 35 + .../@azure/arm-containerservice/LICENSE.txt | 21 + .../@azure/arm-containerservice/README.md | 71 + .../lib/containerServiceClient.ts | 49 + .../lib/containerServiceClientContext.ts | 63 + .../lib/models/containerServicesMappers.ts | 51 + .../arm-containerservice/lib/models/index.ts | 2279 +++++++++++++++++ .../lib/models/managedClustersMappers.ts | 53 + .../lib/models/mappers.ts | 1663 ++++++++++++ .../models/openShiftManagedClustersMappers.ts | 48 + .../lib/models/operationsMappers.ts | 17 + .../lib/models/parameters.ts | 153 ++ .../lib/operations/containerServices.ts | 499 ++++ .../lib/operations/index.ts | 14 + .../lib/operations/managedClusters.ts | 728 ++++++ .../operations/openShiftManagedClusters.ts | 286 +++ .../lib/operations/operations.ts | 74 + .../@azure/arm-containerservice/package.json | 39 + .../arm-containerservice/tsconfig.esm.json | 8 + .../@azure/arm-containerservice/tsconfig.json | 18 + .../arm-containerservice/webpack.config.js | 30 + 21 files changed, 6199 insertions(+) create mode 100644 packages/@azure/arm-containerservice/.npmignore create mode 100644 packages/@azure/arm-containerservice/LICENSE.txt create mode 100644 packages/@azure/arm-containerservice/README.md create mode 100644 packages/@azure/arm-containerservice/lib/containerServiceClient.ts create mode 100644 packages/@azure/arm-containerservice/lib/containerServiceClientContext.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/containerServicesMappers.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/index.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/managedClustersMappers.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/mappers.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/openShiftManagedClustersMappers.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/operationsMappers.ts create mode 100644 packages/@azure/arm-containerservice/lib/models/parameters.ts create mode 100644 packages/@azure/arm-containerservice/lib/operations/containerServices.ts create mode 100644 packages/@azure/arm-containerservice/lib/operations/index.ts create mode 100644 packages/@azure/arm-containerservice/lib/operations/managedClusters.ts create mode 100644 packages/@azure/arm-containerservice/lib/operations/openShiftManagedClusters.ts create mode 100644 packages/@azure/arm-containerservice/lib/operations/operations.ts create mode 100644 packages/@azure/arm-containerservice/package.json create mode 100644 packages/@azure/arm-containerservice/tsconfig.esm.json create mode 100644 packages/@azure/arm-containerservice/tsconfig.json create mode 100644 packages/@azure/arm-containerservice/webpack.config.js diff --git a/packages/@azure/arm-containerservice/.npmignore b/packages/@azure/arm-containerservice/.npmignore new file mode 100644 index 000000000000..a07a455ac10c --- /dev/null +++ b/packages/@azure/arm-containerservice/.npmignore @@ -0,0 +1,35 @@ +#git +.git +.gitignore +#gulp +gulpfile.js +#documentation +doc/ +docs/ +#dependencies +node_modules/ +#samples +sample/ +samples/ +#tests +test/ +tests/ +coverage/ +#tools and scripts +tools/ +scripts/ +#IDE settings +*.sln +.vscode/ +.idea +.editorconfig +.ntvs_analysis.* +#build tools +.travis.yml +.jenkins.yml +.codeclimate.yml +appveyor.yml +# Nuget packages # +.nuget/ +packages/ +packages.config diff --git a/packages/@azure/arm-containerservice/LICENSE.txt b/packages/@azure/arm-containerservice/LICENSE.txt new file mode 100644 index 000000000000..5431ba98b936 --- /dev/null +++ b/packages/@azure/arm-containerservice/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-containerservice/README.md b/packages/@azure/arm-containerservice/README.md new file mode 100644 index 000000000000..d9eebb89adb6 --- /dev/null +++ b/packages/@azure/arm-containerservice/README.md @@ -0,0 +1,71 @@ +# Azure ContainerServiceClient SDK for JavaScript +This package contains an isomorphic SDK for ContainerServiceClient. + +## Currently supported environments +- Node.js version 6.x.x or higher +- Browser JavaScript + +## How to Install +``` +npm install @azure/arm-containerservice +``` + + +## How to use + +### nodejs - Authentication, client creation and get openShiftManagedClusters as an example written in TypeScript. + +```ts +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as msRestNodeAuth from "ms-rest-nodeauth"; +import { ContainerServiceClient, ContainerServiceModels, ContainerServiceMappers } from "@azure/arm-containerservice"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new ContainerServiceClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const resourceName = "testresourceName"; + client.openShiftManagedClusters.get(resourceGroupName, resourceName).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +### browser - Authentication, client creation and get openShiftManagedClusters as an example written in JavaScript. + +- index.html +```html + + + + @azure/arm-containerservice sample + + + + + + + + +``` + +# Related projects + - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-containerservice/lib/containerServiceClient.ts b/packages/@azure/arm-containerservice/lib/containerServiceClient.ts new file mode 100644 index 000000000000..f2ce52c96cd4 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/containerServiceClient.ts @@ -0,0 +1,49 @@ +/* + * 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 "ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { ContainerServiceClientContext } from "./containerServiceClientContext"; + + +class ContainerServiceClient extends ContainerServiceClientContext { + // Operation groups + openShiftManagedClusters: operations.OpenShiftManagedClusters; + containerServices: operations.ContainerServices; + operations: operations.Operations; + managedClusters: operations.ManagedClusters; + + /** + * Initializes a new instance of the ContainerServiceClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ContainerServiceClientOptions) { + super(credentials, subscriptionId, options); + this.openShiftManagedClusters = new operations.OpenShiftManagedClusters(this); + this.containerServices = new operations.ContainerServices(this); + this.operations = new operations.Operations(this); + this.managedClusters = new operations.ManagedClusters(this); + } +} + +// Operation Specifications + +export { + ContainerServiceClient, + ContainerServiceClientContext, + Models as ContainerServiceModels, + Mappers as ContainerServiceMappers +}; +export * from "./operations"; diff --git a/packages/@azure/arm-containerservice/lib/containerServiceClientContext.ts b/packages/@azure/arm-containerservice/lib/containerServiceClientContext.ts new file mode 100644 index 000000000000..029157e74293 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/containerServiceClientContext.ts @@ -0,0 +1,63 @@ +/* + * 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 Models from "./models"; +import * as msRest from "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; + +const packageName = "@azure/arm-containerservice"; +const packageVersion = "1.0.0-preview"; + +export class ContainerServiceClientContext extends msRestAzure.AzureServiceClient { + + credentials: msRest.ServiceClientCredentials; + + subscriptionId: string; + + acceptLanguage: string; + + longRunningOperationRetryTimeout: number; + + /** + * Initializes a new instance of the ContainerServiceClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure + * subscription. The subscription ID forms part of the URI for every service call. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ContainerServiceClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + super(credentials, options); + + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + this.addUserAgentInfo(`${packageName}/${packageVersion}`); + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/packages/@azure/arm-containerservice/lib/models/containerServicesMappers.ts b/packages/@azure/arm-containerservice/lib/models/containerServicesMappers.ts new file mode 100644 index 000000000000..77e3392bdf31 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/containerServicesMappers.ts @@ -0,0 +1,51 @@ +/* + * 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 { + discriminators, + ContainerServiceListResult, + ContainerService, + Resource, + BaseResource, + ContainerServiceOrchestratorProfile, + ContainerServiceCustomProfile, + ContainerServiceServicePrincipalProfile, + KeyVaultSecretRef, + ContainerServiceMasterProfile, + ContainerServiceAgentPoolProfile, + ContainerServiceWindowsProfile, + ContainerServiceLinuxProfile, + ContainerServiceSshConfiguration, + ContainerServiceSshPublicKey, + ContainerServiceDiagnosticsProfile, + ContainerServiceVMDiagnostics, + CloudError, + OrchestratorVersionProfileListResult, + OrchestratorVersionProfile, + OrchestratorProfile, + OpenShiftManagedCluster, + PurchasePlan, + NetworkProfile, + OpenShiftRouterProfile, + OpenShiftManagedClusterMasterPoolProfile, + OpenShiftManagedClusterAgentPoolProfile, + OpenShiftManagedClusterAuthProfile, + OpenShiftManagedClusterIdentityProvider, + OpenShiftManagedClusterBaseIdentityProvider, + OpenShiftManagedClusterAADIdentityProvider, + ManagedCluster, + ManagedClusterAgentPoolProfile, + ManagedClusterServicePrincipalProfile, + ManagedClusterAddonProfile, + ContainerServiceNetworkProfile, + ManagedClusterAADProfile, + ManagedClusterAccessProfile +} from "../models/mappers"; + diff --git a/packages/@azure/arm-containerservice/lib/models/index.ts b/packages/@azure/arm-containerservice/lib/models/index.ts new file mode 100644 index 000000000000..1506f85df7a3 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/index.ts @@ -0,0 +1,2279 @@ +/* + * 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 { BaseResource, CloudError, AzureServiceClientOptions } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing Resource. + * The Resource model definition. + * + * @extends BaseResource + */ +export interface Resource extends BaseResource { + /** + * @member {string} [id] Resource Id + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Resource name + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Resource type + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {string} location Resource location + */ + location: string; + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing PurchasePlan. + * Used for establishing the purchase context of any 3rd Party artifact through + * MarketPlace. + * + */ +export interface PurchasePlan { + /** + * @member {string} [name] The plan ID. + */ + name?: string; + /** + * @member {string} [product] Specifies the product of the image from the + * marketplace. This is the same value as Offer under the imageReference + * element. + */ + product?: string; + /** + * @member {string} [promotionCode] The promotion code. + */ + promotionCode?: string; + /** + * @member {string} [publisher] The plan ID. + */ + publisher?: string; +} + +/** + * @interface + * An interface representing OpenShiftRouterProfile. + * Represents an OpenShift router + * + */ +export interface OpenShiftRouterProfile { + /** + * @member {string} [name] Name of the router profile. + */ + name?: string; + /** + * @member {string} [publicSubdomain] DNS subdomain for openshift router. + */ + publicSubdomain?: string; + /** + * @member {string} [fqdn] Auto-allocated FQDN for the OpenShift router. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fqdn?: string; +} + +/** + * @interface + * An interface representing NetworkProfile. + * Represents the OpenShift networking configuration + * + */ +export interface NetworkProfile { + /** + * @member {string} [vnetCidr] CIDR for the OpenShift Vnet. Default value: + * '10.0.0.0/8' . + */ + vnetCidr?: string; + /** + * @member {string} [peerVnetId] CIDR of the Vnet to peer. + */ + peerVnetId?: string; +} + +/** + * @interface + * An interface representing OpenShiftManagedClusterMasterPoolProfile. + * OpenShiftManagedClusterMaterPoolProfile contains configuration for OpenShift + * master VMs. + * + */ +export interface OpenShiftManagedClusterMasterPoolProfile { + /** + * @member {string} [name] Unique name of the master pool profile in the + * context of the subscription and resource group. + */ + name?: string; + /** + * @member {number} count Number of masters (VMs) to host docker containers. + * The default value is 3. Default value: 3 . + */ + count: number; + /** + * @member {OpenShiftContainerServiceVMSize} vmSize Size of agent VMs. + * Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3' + */ + vmSize: OpenShiftContainerServiceVMSize; + /** + * @member {string} [subnetCidr] Subnet CIDR for the peering. + */ + subnetCidr?: string; + /** + * @member {OSType} [osType] OsType to be used to specify os type. Choose + * from Linux and Windows. Default to Linux. Possible values include: + * 'Linux', 'Windows'. Default value: 'Linux' . + */ + osType?: OSType; +} + +/** + * @interface + * An interface representing OpenShiftManagedClusterAgentPoolProfile. + * Defines the configuration of the OpenShift cluster VMs. + * + */ +export interface OpenShiftManagedClusterAgentPoolProfile { + /** + * @member {string} name Unique name of the pool profile in the context of + * the subscription and resource group. + */ + name: string; + /** + * @member {number} count Number of agents (VMs) to host docker containers. + * Allowed values must be in the range of 1 to 5 (inclusive). The default + * value is 2. . Default value: 2 . + */ + count: number; + /** + * @member {OpenShiftContainerServiceVMSize} vmSize Size of agent VMs. + * Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3' + */ + vmSize: OpenShiftContainerServiceVMSize; + /** + * @member {string} [subnetCidr] Subnet CIDR for the peering. Default value: + * '10.0.0.0/24' . + */ + subnetCidr?: string; + /** + * @member {OSType} [osType] OsType to be used to specify os type. Choose + * from Linux and Windows. Default to Linux. Possible values include: + * 'Linux', 'Windows'. Default value: 'Linux' . + */ + osType?: OSType; + /** + * @member {OpenShiftAgentPoolProfileRole} [role] Define the role of the + * AgentPoolProfile. Possible values include: 'compute', 'infra' + */ + role?: OpenShiftAgentPoolProfileRole; +} + +/** + * Contains the possible cases for OpenShiftManagedClusterBaseIdentityProvider. + */ +export type OpenShiftManagedClusterBaseIdentityProviderUnion = OpenShiftManagedClusterBaseIdentityProvider | OpenShiftManagedClusterAADIdentityProvider; + +/** + * @interface + * An interface representing OpenShiftManagedClusterBaseIdentityProvider. + * Structure for any Identity provider. + * + */ +export interface OpenShiftManagedClusterBaseIdentityProvider { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "OpenShiftManagedClusterBaseIdentityProvider"; +} + +/** + * @interface + * An interface representing OpenShiftManagedClusterIdentityProvider. + * Defines the configuration of the identity providers to be used in the + * OpenShift cluster. + * + */ +export interface OpenShiftManagedClusterIdentityProvider { + /** + * @member {string} [name] Name of the provider. + */ + name?: string; + /** + * @member {OpenShiftManagedClusterBaseIdentityProviderUnion} [provider] + * Configuration of the provider. + */ + provider?: OpenShiftManagedClusterBaseIdentityProviderUnion; +} + +/** + * @interface + * An interface representing OpenShiftManagedClusterAuthProfile. + * Defines all possible authentication profiles for the OpenShift cluster. + * + */ +export interface OpenShiftManagedClusterAuthProfile { + /** + * @member {OpenShiftManagedClusterIdentityProvider[]} [identityProviders] + * Type of authentication profile to use. + */ + identityProviders?: OpenShiftManagedClusterIdentityProvider[]; +} + +/** + * @interface + * An interface representing OpenShiftManagedCluster. + * OpenShift Managed cluster. + * + * @extends Resource + */ +export interface OpenShiftManagedCluster extends Resource { + /** + * @member {PurchasePlan} [plan] Define the resource plan as required by ARM + * for billing purposes + */ + plan?: PurchasePlan; + /** + * @member {string} [provisioningState] The current deployment or + * provisioning state, which only appears in the response. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {string} openShiftVersion Version of OpenShift specified when + * creating the cluster. + */ + openShiftVersion: string; + /** + * @member {string} [publicHostname] Optional user-specified FQDN for + * OpenShift API server. + */ + publicHostname?: string; + /** + * @member {string} [fqdn] User-specified FQDN for OpenShift API server + * loadbalancer internal hostname. + */ + fqdn?: string; + /** + * @member {NetworkProfile} [networkProfile] Configuration for OpenShift + * networking. + */ + networkProfile?: NetworkProfile; + /** + * @member {OpenShiftRouterProfile[]} [routerProfiles] Configuration for + * OpenShift router(s). + */ + routerProfiles?: OpenShiftRouterProfile[]; + /** + * @member {OpenShiftManagedClusterMasterPoolProfile} [masterPoolProfile] + * Configuration for OpenShift master VMs. + */ + masterPoolProfile?: OpenShiftManagedClusterMasterPoolProfile; + /** + * @member {OpenShiftManagedClusterAgentPoolProfile[]} [agentPoolProfiles] + * Configuration of OpenShift cluster VMs. + */ + agentPoolProfiles?: OpenShiftManagedClusterAgentPoolProfile[]; + /** + * @member {OpenShiftManagedClusterAuthProfile} [authProfile] Configures + * OpenShift authentication. + */ + authProfile?: OpenShiftManagedClusterAuthProfile; +} + +/** + * @interface + * An interface representing OpenShiftManagedClusterAADIdentityProvider. + * Defines the Identity provider for MS AAD. + * + */ +export interface OpenShiftManagedClusterAADIdentityProvider { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "AADIdentityProvider"; + /** + * @member {string} [clientId] The clientId password associated with the + * provider. + */ + clientId?: string; + /** + * @member {string} [secret] The secret password associated with the + * provider. + */ + secret?: string; + /** + * @member {string} [tenantId] The tenantId associated with the provider. + */ + tenantId?: string; +} + +/** + * @interface + * An interface representing TagsObject. + * Tags object for patch operations. + * + */ +export interface TagsObject { + /** + * @member {{ [propertyName: string]: string }} [tags] Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ContainerServiceCustomProfile. + * Properties to configure a custom container service cluster. + * + */ +export interface ContainerServiceCustomProfile { + /** + * @member {string} orchestrator The name of the custom orchestrator to use. + */ + orchestrator: string; +} + +/** + * @interface + * An interface representing KeyVaultSecretRef. + * Reference to a secret stored in Azure Key Vault. + * + */ +export interface KeyVaultSecretRef { + /** + * @member {string} vaultID Key vault identifier. + */ + vaultID: string; + /** + * @member {string} secretName The secret name. + */ + secretName: string; + /** + * @member {string} [version] The secret version. + */ + version?: string; +} + +/** + * @interface + * An interface representing ContainerServiceServicePrincipalProfile. + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. Either secret or keyVaultSecretRef must be + * specified. + * + */ +export interface ContainerServiceServicePrincipalProfile { + /** + * @member {string} clientId The ID for the service principal. + */ + clientId: string; + /** + * @member {string} [secret] The secret password associated with the service + * principal in plain text. + */ + secret?: string; + /** + * @member {KeyVaultSecretRef} [keyVaultSecretRef] Reference to a secret + * stored in Azure Key Vault. + */ + keyVaultSecretRef?: KeyVaultSecretRef; +} + +/** + * @interface + * An interface representing ContainerServiceOrchestratorProfile. + * Profile for the container service orchestrator. + * + */ +export interface ContainerServiceOrchestratorProfile { + /** + * @member {ContainerServiceOrchestratorTypes} orchestratorType The + * orchestrator to use to manage container service cluster resources. Valid + * values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values + * include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' + */ + orchestratorType: ContainerServiceOrchestratorTypes; + /** + * @member {string} [orchestratorVersion] The version of the orchestrator to + * use. You can specify the major.minor.patch part of the actual version.For + * example, you can specify version as "1.6.11". + */ + orchestratorVersion?: string; +} + +/** + * @interface + * An interface representing ContainerServiceMasterProfile. + * Profile for the container service master. + * + */ +export interface ContainerServiceMasterProfile { + /** + * @member {number} [count] Number of masters (VMs) in the container service + * cluster. Allowed values are 1, 3, and 5. The default value is 1. Default + * value: 1 . + */ + count?: number; + /** + * @member {string} dnsPrefix DNS prefix to be used to create the FQDN for + * the master pool. + */ + dnsPrefix: string; + /** + * @member {ContainerServiceVMSizeTypes} vmSize Size of agent VMs. Possible + * values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', + * 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', + * 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', + * 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', + * 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', + * 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', + * 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', + * 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', + * 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', + * 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', + * 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', + * 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', + * 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', + * 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', + * 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', + * 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', + * 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', + * 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', + * 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', + * 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', + * 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', + * 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', + * 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', + * 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', + * 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', + * 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', + * 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', + * 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', + * 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', + * 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', + * 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', + * 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', + * 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', + * 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', + * 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', + * 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', + * 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', + * 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', + * 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + * 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + * 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + * 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + * 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + */ + vmSize: ContainerServiceVMSizeTypes; + /** + * @member {number} [osDiskSizeGB] OS Disk Size in GB to be used to specify + * the disk size for every machine in this master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize + * specified. + */ + osDiskSizeGB?: number; + /** + * @member {string} [vnetSubnetID] VNet SubnetID specifies the vnet's subnet + * identifier. + */ + vnetSubnetID?: string; + /** + * @member {string} [firstConsecutiveStaticIP] FirstConsecutiveStaticIP used + * to specify the first static ip of masters. Default value: '10.240.255.5' . + */ + firstConsecutiveStaticIP?: string; + /** + * @member {ContainerServiceStorageProfileTypes} [storageProfile] Storage + * profile specifies what kind of storage used. Choose from StorageAccount + * and ManagedDisks. Leave it empty, we will choose for you based on the + * orchestrator choice. Possible values include: 'StorageAccount', + * 'ManagedDisks' + */ + storageProfile?: ContainerServiceStorageProfileTypes; + /** + * @member {string} [fqdn] FDQN for the master pool. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fqdn?: string; +} + +/** + * @interface + * An interface representing ContainerServiceAgentPoolProfile. + * Profile for the container service agent pool. + * + */ +export interface ContainerServiceAgentPoolProfile { + /** + * @member {string} name Unique name of the agent pool profile in the context + * of the subscription and resource group. + */ + name: string; + /** + * @member {number} [count] Number of agents (VMs) to host docker containers. + * Allowed values must be in the range of 1 to 100 (inclusive). The default + * value is 1. . Default value: 1 . + */ + count?: number; + /** + * @member {ContainerServiceVMSizeTypes} vmSize Size of agent VMs. Possible + * values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', + * 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', + * 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', + * 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', + * 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', + * 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', + * 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', + * 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', + * 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', + * 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', + * 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', + * 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', + * 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', + * 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', + * 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', + * 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', + * 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', + * 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', + * 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', + * 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', + * 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', + * 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', + * 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', + * 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', + * 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', + * 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', + * 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', + * 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', + * 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', + * 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', + * 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', + * 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', + * 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', + * 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', + * 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', + * 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', + * 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', + * 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', + * 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + * 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + * 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + * 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + * 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + */ + vmSize: ContainerServiceVMSizeTypes; + /** + * @member {number} [osDiskSizeGB] OS Disk Size in GB to be used to specify + * the disk size for every machine in this master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize + * specified. + */ + osDiskSizeGB?: number; + /** + * @member {string} [dnsPrefix] DNS prefix to be used to create the FQDN for + * the agent pool. + */ + dnsPrefix?: string; + /** + * @member {string} [fqdn] FDQN for the agent pool. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fqdn?: string; + /** + * @member {number[]} [ports] Ports number array used to expose on this agent + * pool. The default opened ports are different based on your choice of + * orchestrator. + */ + ports?: number[]; + /** + * @member {ContainerServiceStorageProfileTypes} [storageProfile] Storage + * profile specifies what kind of storage used. Choose from StorageAccount + * and ManagedDisks. Leave it empty, we will choose for you based on the + * orchestrator choice. Possible values include: 'StorageAccount', + * 'ManagedDisks' + */ + storageProfile?: ContainerServiceStorageProfileTypes; + /** + * @member {string} [vnetSubnetID] VNet SubnetID specifies the vnet's subnet + * identifier. + */ + vnetSubnetID?: string; + /** + * @member {OSType} [osType] OsType to be used to specify os type. Choose + * from Linux and Windows. Default to Linux. Possible values include: + * 'Linux', 'Windows'. Default value: 'Linux' . + */ + osType?: OSType; +} + +/** + * @interface + * An interface representing ContainerServiceWindowsProfile. + * Profile for Windows VMs in the container service cluster. + * + */ +export interface ContainerServiceWindowsProfile { + /** + * @member {string} adminUsername The administrator username to use for + * Windows VMs. + */ + adminUsername: string; + /** + * @member {string} adminPassword The administrator password to use for + * Windows VMs. + */ + adminPassword: string; +} + +/** + * @interface + * An interface representing ContainerServiceSshPublicKey. + * Contains information about SSH certificate public key data. + * + */ +export interface ContainerServiceSshPublicKey { + /** + * @member {string} keyData Certificate public key used to authenticate with + * VMs through SSH. The certificate must be in PEM format with or without + * headers. + */ + keyData: string; +} + +/** + * @interface + * An interface representing ContainerServiceSshConfiguration. + * SSH configuration for Linux-based VMs running on Azure. + * + */ +export interface ContainerServiceSshConfiguration { + /** + * @member {ContainerServiceSshPublicKey[]} publicKeys The list of SSH public + * keys used to authenticate with Linux-based VMs. Only expect one key + * specified. + */ + publicKeys: ContainerServiceSshPublicKey[]; +} + +/** + * @interface + * An interface representing ContainerServiceLinuxProfile. + * Profile for Linux VMs in the container service cluster. + * + */ +export interface ContainerServiceLinuxProfile { + /** + * @member {string} adminUsername The administrator username to use for Linux + * VMs. + */ + adminUsername: string; + /** + * @member {ContainerServiceSshConfiguration} ssh SSH configuration for + * Linux-based VMs running on Azure. + */ + ssh: ContainerServiceSshConfiguration; +} + +/** + * @interface + * An interface representing ContainerServiceVMDiagnostics. + * Profile for diagnostics on the container service VMs. + * + */ +export interface ContainerServiceVMDiagnostics { + /** + * @member {boolean} enabled Whether the VM diagnostic agent is provisioned + * on the VM. + */ + enabled: boolean; + /** + * @member {string} [storageUri] The URI of the storage account where + * diagnostics are stored. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly storageUri?: string; +} + +/** + * @interface + * An interface representing ContainerServiceDiagnosticsProfile. + * Profile for diagnostics on the container service cluster. + * + */ +export interface ContainerServiceDiagnosticsProfile { + /** + * @member {ContainerServiceVMDiagnostics} vmDiagnostics Profile for + * diagnostics on the container service VMs. + */ + vmDiagnostics: ContainerServiceVMDiagnostics; +} + +/** + * @interface + * An interface representing ContainerService. + * Container service. + * + * @extends Resource + */ +export interface ContainerService extends Resource { + /** + * @member {string} [provisioningState] The current deployment or + * provisioning state, which only appears in the response. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {ContainerServiceOrchestratorProfile} orchestratorProfile Profile + * for the container service orchestrator. + */ + orchestratorProfile: ContainerServiceOrchestratorProfile; + /** + * @member {ContainerServiceCustomProfile} [customProfile] Properties to + * configure a custom container service cluster. + */ + customProfile?: ContainerServiceCustomProfile; + /** + * @member {ContainerServiceServicePrincipalProfile} + * [servicePrincipalProfile] Information about a service principal identity + * for the cluster to use for manipulating Azure APIs. Exact one of secret or + * keyVaultSecretRef need to be specified. + */ + servicePrincipalProfile?: ContainerServiceServicePrincipalProfile; + /** + * @member {ContainerServiceMasterProfile} masterProfile Profile for the + * container service master. + */ + masterProfile: ContainerServiceMasterProfile; + /** + * @member {ContainerServiceAgentPoolProfile[]} [agentPoolProfiles] + * Properties of the agent pool. + */ + agentPoolProfiles?: ContainerServiceAgentPoolProfile[]; + /** + * @member {ContainerServiceWindowsProfile} [windowsProfile] Profile for + * Windows VMs in the container service cluster. + */ + windowsProfile?: ContainerServiceWindowsProfile; + /** + * @member {ContainerServiceLinuxProfile} linuxProfile Profile for Linux VMs + * in the container service cluster. + */ + linuxProfile: ContainerServiceLinuxProfile; + /** + * @member {ContainerServiceDiagnosticsProfile} [diagnosticsProfile] Profile + * for diagnostics in the container service cluster. + */ + diagnosticsProfile?: ContainerServiceDiagnosticsProfile; +} + +/** + * @interface + * An interface representing OperationValue. + * Describes the properties of a Compute Operation value. + * + */ +export interface OperationValue { + /** + * @member {string} [origin] The origin of the compute operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly origin?: string; + /** + * @member {string} [name] The name of the compute operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [operation] The display name of the compute operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly operation?: string; + /** + * @member {string} [resource] The display name of the resource the operation + * applies to. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resource?: string; + /** + * @member {string} [description] The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly description?: string; + /** + * @member {string} [provider] The resource provider for the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provider?: string; +} + +/** + * @interface + * An interface representing ManagedClusterServicePrincipalProfile. + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + * + */ +export interface ManagedClusterServicePrincipalProfile { + /** + * @member {string} clientId The ID for the service principal. + */ + clientId: string; + /** + * @member {string} [secret] The secret password associated with the service + * principal in plain text. + */ + secret?: string; +} + +/** + * @interface + * An interface representing ManagedClusterAgentPoolProfile. + * Profile for the container service agent pool. + * + */ +export interface ManagedClusterAgentPoolProfile { + /** + * @member {string} name Unique name of the agent pool profile in the context + * of the subscription and resource group. + */ + name: string; + /** + * @member {number} [count] Number of agents (VMs) to host docker containers. + * Allowed values must be in the range of 1 to 100 (inclusive). The default + * value is 1. . Default value: 1 . + */ + count?: number; + /** + * @member {ContainerServiceVMSizeTypes} vmSize Size of agent VMs. Possible + * values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', + * 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', + * 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', + * 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', + * 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', + * 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', + * 'Standard_D12', 'Standard_D12_v2', 'Standard_D12_v2_Promo', + * 'Standard_D13', 'Standard_D13_v2', 'Standard_D13_v2_Promo', + * 'Standard_D14', 'Standard_D14_v2', 'Standard_D14_v2_Promo', + * 'Standard_D15_v2', 'Standard_D16_v3', 'Standard_D16s_v3', + * 'Standard_D1_v2', 'Standard_D2', 'Standard_D2_v2', 'Standard_D2_v2_Promo', + * 'Standard_D2_v3', 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', + * 'Standard_D32s_v3', 'Standard_D3_v2', 'Standard_D3_v2_Promo', + * 'Standard_D4', 'Standard_D4_v2', 'Standard_D4_v2_Promo', 'Standard_D4_v3', + * 'Standard_D4s_v3', 'Standard_D5_v2', 'Standard_D5_v2_Promo', + * 'Standard_D64_v3', 'Standard_D64s_v3', 'Standard_D8_v3', + * 'Standard_D8s_v3', 'Standard_DS1', 'Standard_DS11', 'Standard_DS11_v2', + * 'Standard_DS11_v2_Promo', 'Standard_DS12', 'Standard_DS12_v2', + * 'Standard_DS12_v2_Promo', 'Standard_DS13', 'Standard_DS13-2_v2', + * 'Standard_DS13-4_v2', 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', + * 'Standard_DS14', 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', + * 'Standard_DS14_v2', 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', + * 'Standard_DS1_v2', 'Standard_DS2', 'Standard_DS2_v2', + * 'Standard_DS2_v2_Promo', 'Standard_DS3', 'Standard_DS3_v2', + * 'Standard_DS3_v2_Promo', 'Standard_DS4', 'Standard_DS4_v2', + * 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', 'Standard_DS5_v2_Promo', + * 'Standard_E16_v3', 'Standard_E16s_v3', 'Standard_E2_v3', + * 'Standard_E2s_v3', 'Standard_E32-16s_v3', 'Standard_E32-8s_v3', + * 'Standard_E32_v3', 'Standard_E32s_v3', 'Standard_E4_v3', + * 'Standard_E4s_v3', 'Standard_E64-16s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64_v3', 'Standard_E64s_v3', 'Standard_E8_v3', + * 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', 'Standard_F16s', + * 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', 'Standard_F2s', + * 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', 'Standard_F4s', + * 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_F8', + * 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', 'Standard_G2', + * 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', + * 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', + * 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', + * 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', + * 'Standard_M128-64ms', 'Standard_M128ms', 'Standard_M128s', + * 'Standard_M64-16ms', 'Standard_M64-32ms', 'Standard_M64ms', + * 'Standard_M64s', 'Standard_NC12', 'Standard_NC12s_v2', + * 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', + * 'Standard_NC6s_v3', 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', + * 'Standard_ND6s', 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + */ + vmSize: ContainerServiceVMSizeTypes; + /** + * @member {number} [osDiskSizeGB] OS Disk Size in GB to be used to specify + * the disk size for every machine in this master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize + * specified. + */ + osDiskSizeGB?: number; + /** + * @member {ContainerServiceStorageProfileTypes} [storageProfile] Storage + * profile specifies what kind of storage used. Defaults to ManagedDisks. + * Possible values include: 'StorageAccount', 'ManagedDisks' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly storageProfile?: ContainerServiceStorageProfileTypes; + /** + * @member {string} [vnetSubnetID] VNet SubnetID specifies the vnet's subnet + * identifier. + */ + vnetSubnetID?: string; + /** + * @member {number} [maxPods] Maximum number of pods that can run on a node. + */ + maxPods?: number; + /** + * @member {OSType} [osType] OsType to be used to specify os type. Choose + * from Linux and Windows. Default to Linux. Possible values include: + * 'Linux', 'Windows'. Default value: 'Linux' . + */ + osType?: OSType; +} + +/** + * @interface + * An interface representing ContainerServiceNetworkProfile. + * Profile of network configuration. + * + */ +export interface ContainerServiceNetworkProfile { + /** + * @member {NetworkPlugin} [networkPlugin] Network plugin used for building + * Kubernetes network. Possible values include: 'azure', 'kubenet'. Default + * value: 'kubenet' . + */ + networkPlugin?: NetworkPlugin; + /** + * @member {NetworkPolicy} [networkPolicy] Network policy used for building + * Kubernetes network. Possible values include: 'calico' + */ + networkPolicy?: NetworkPolicy; + /** + * @member {string} [podCidr] A CIDR notation IP range from which to assign + * pod IPs when kubenet is used. Default value: '10.244.0.0/16' . + */ + podCidr?: string; + /** + * @member {string} [serviceCidr] A CIDR notation IP range from which to + * assign service cluster IPs. It must not overlap with any Subnet IP ranges. + * Default value: '10.0.0.0/16' . + */ + serviceCidr?: string; + /** + * @member {string} [dnsServiceIP] An IP address assigned to the Kubernetes + * DNS service. It must be within the Kubernetes service address range + * specified in serviceCidr. Default value: '10.0.0.10' . + */ + dnsServiceIP?: string; + /** + * @member {string} [dockerBridgeCidr] A CIDR notation IP range assigned to + * the Docker bridge network. It must not overlap with any Subnet IP ranges + * or the Kubernetes service address range. Default value: '172.17.0.1/16' . + */ + dockerBridgeCidr?: string; +} + +/** + * @interface + * An interface representing ManagedClusterAddonProfile. + * A Kubernetes add-on profile for a managed cluster. + * + */ +export interface ManagedClusterAddonProfile { + /** + * @member {boolean} enabled Whether the add-on is enabled or not. + */ + enabled: boolean; + /** + * @member {{ [propertyName: string]: string }} [config] Key-value pairs for + * configuring an add-on. + */ + config?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing ManagedClusterAADProfile. + * AADProfile specifies attributes for Azure Active Directory integration. + * + */ +export interface ManagedClusterAADProfile { + /** + * @member {string} clientAppID The client AAD application ID. + */ + clientAppID: string; + /** + * @member {string} serverAppID The server AAD application ID. + */ + serverAppID: string; + /** + * @member {string} [serverAppSecret] The server AAD application secret. + */ + serverAppSecret?: string; + /** + * @member {string} [tenantID] The AAD tenant ID to use for authentication. + * If not specified, will use the tenant of the deployment subscription. + */ + tenantID?: string; +} + +/** + * @interface + * An interface representing ManagedCluster. + * Managed cluster. + * + * @extends Resource + */ +export interface ManagedCluster extends Resource { + /** + * @member {string} [provisioningState] The current deployment or + * provisioning state, which only appears in the response. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {string} [kubernetesVersion] Version of Kubernetes specified when + * creating the managed cluster. + */ + kubernetesVersion?: string; + /** + * @member {string} [dnsPrefix] DNS prefix specified when creating the + * managed cluster. + */ + dnsPrefix?: string; + /** + * @member {string} [fqdn] FDQN for the master pool. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly fqdn?: string; + /** + * @member {ManagedClusterAgentPoolProfile[]} [agentPoolProfiles] Properties + * of the agent pool. Currently only one agent pool can exist. + */ + agentPoolProfiles?: ManagedClusterAgentPoolProfile[]; + /** + * @member {ContainerServiceLinuxProfile} [linuxProfile] Profile for Linux + * VMs in the container service cluster. + */ + linuxProfile?: ContainerServiceLinuxProfile; + /** + * @member {ManagedClusterServicePrincipalProfile} [servicePrincipalProfile] + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + */ + servicePrincipalProfile?: ManagedClusterServicePrincipalProfile; + /** + * @member {{ [propertyName: string]: ManagedClusterAddonProfile }} + * [addonProfiles] Profile of managed cluster add-on. + */ + addonProfiles?: { [propertyName: string]: ManagedClusterAddonProfile }; + /** + * @member {string} [nodeResourceGroup] Name of the resource group containing + * agent pool nodes. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nodeResourceGroup?: string; + /** + * @member {boolean} [enableRBAC] Whether to enable Kubernetes Role-Based + * Access Control. + */ + enableRBAC?: boolean; + /** + * @member {ContainerServiceNetworkProfile} [networkProfile] Profile of + * network configuration. + */ + networkProfile?: ContainerServiceNetworkProfile; + /** + * @member {ManagedClusterAADProfile} [aadProfile] Profile of Azure Active + * Directory configuration. + */ + aadProfile?: ManagedClusterAADProfile; +} + +/** + * @interface + * An interface representing OrchestratorProfile. + * Contains information about orchestrator. + * + */ +export interface OrchestratorProfile { + /** + * @member {string} orchestratorType Orchestrator type. + */ + orchestratorType: string; + /** + * @member {string} orchestratorVersion Orchestrator version (major, minor, + * patch). + */ + orchestratorVersion: string; +} + +/** + * @interface + * An interface representing ManagedClusterAccessProfile. + * Managed cluster Access Profile. + * + * @extends Resource + */ +export interface ManagedClusterAccessProfile extends Resource { + /** + * @member {Uint8Array} [kubeConfig] Base64-encoded Kubernetes configuration + * file. + */ + kubeConfig?: Uint8Array; +} + +/** + * @interface + * An interface representing ManagedClusterPoolUpgradeProfile. + * The list of available upgrade versions. + * + */ +export interface ManagedClusterPoolUpgradeProfile { + /** + * @member {string} kubernetesVersion Kubernetes version (major, minor, + * patch). + */ + kubernetesVersion: string; + /** + * @member {string} [name] Pool name. + */ + name?: string; + /** + * @member {OSType} osType OsType to be used to specify os type. Choose from + * Linux and Windows. Default to Linux. Possible values include: 'Linux', + * 'Windows'. Default value: 'Linux' . + */ + osType: OSType; + /** + * @member {string[]} [upgrades] List of orchestrator types and versions + * available for upgrade. + */ + upgrades?: string[]; +} + +/** + * @interface + * An interface representing ManagedClusterUpgradeProfile. + * The list of available upgrades for compute pools. + * + */ +export interface ManagedClusterUpgradeProfile { + /** + * @member {string} [id] Id of upgrade profile. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Name of upgrade profile. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Type of upgrade profile. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {ManagedClusterPoolUpgradeProfile} controlPlaneProfile The list of + * available upgrade versions for the control plane. + */ + controlPlaneProfile: ManagedClusterPoolUpgradeProfile; + /** + * @member {ManagedClusterPoolUpgradeProfile[]} agentPoolProfiles The list of + * available upgrade versions for agent pools. + */ + agentPoolProfiles: ManagedClusterPoolUpgradeProfile[]; +} + +/** + * @interface + * An interface representing CredentialResult. + * The credential result response. + * + */ +export interface CredentialResult { + /** + * @member {string} [name] The name of the credential. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {Uint8Array} [value] Base64-encoded Kubernetes configuration file. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly value?: Uint8Array; +} + +/** + * @interface + * An interface representing CredentialResults. + * The list of credential result response. + * + */ +export interface CredentialResults { + /** + * @member {CredentialResult[]} [kubeconfigs] **NOTE: This property will not + * be serialized. It can only be populated by the server.** + */ + readonly kubeconfigs?: CredentialResult[]; +} + +/** + * @interface + * An interface representing OrchestratorVersionProfile. + * The profile of an orchestrator and its available versions. + * + */ +export interface OrchestratorVersionProfile { + /** + * @member {string} orchestratorType Orchestrator type. + */ + orchestratorType: string; + /** + * @member {string} orchestratorVersion Orchestrator version (major, minor, + * patch). + */ + orchestratorVersion: string; + /** + * @member {boolean} default Installed by default if version is not + * specified. + */ + default: boolean; + /** + * @member {OrchestratorProfile[]} upgrades The list of available upgrade + * versions. + */ + upgrades: OrchestratorProfile[]; +} + +/** + * @interface + * An interface representing OrchestratorVersionProfileListResult. + * The list of versions for supported orchestrators. + * + */ +export interface OrchestratorVersionProfileListResult { + /** + * @member {string} [id] Id of the orchestrator version profile list result. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] Name of the orchestrator version profile list + * result. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] Type of the orchestrator version profile list + * result. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {OrchestratorVersionProfile[]} orchestrators List of orchestrator + * version profiles. + */ + orchestrators: OrchestratorVersionProfile[]; +} + +/** + * @interface + * An interface representing ContainerServicesListOrchestratorsOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface ContainerServicesListOrchestratorsOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [resourceType] resource type for which the list of + * orchestrators needs to be returned + */ + resourceType?: string; +} + +/** + * @interface + * An interface representing ContainerServiceClientOptions. + * @extends AzureServiceClientOptions + */ +export interface ContainerServiceClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the ContainerServiceListResult. + * The response from the List Container Services operation. + * + * @extends Array + */ +export interface ContainerServiceListResult extends Array { + /** + * @member {string} [nextLink] The URL to get the next set of container + * service results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the OperationListResult. + * The List Compute Operation operation response. + * + * @extends Array + */ +export interface OperationListResult extends Array { +} + +/** + * @interface + * An interface representing the ManagedClusterListResult. + * The response from the List Managed Clusters operation. + * + * @extends Array + */ +export interface ManagedClusterListResult extends Array { + /** + * @member {string} [nextLink] The URL to get the next set of managed cluster + * results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for OSType. + * Possible values include: 'Linux', 'Windows' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: OSType = "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum OSType { + Linux = 'Linux', + Windows = 'Windows', +} + +/** + * Defines values for OpenShiftContainerServiceVMSize. + * Possible values include: 'Standard_D2s_v3', 'Standard_D4s_v3' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: OpenShiftContainerServiceVMSize = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum OpenShiftContainerServiceVMSize { + StandardD2sV3 = 'Standard_D2s_v3', + StandardD4sV3 = 'Standard_D4s_v3', +} + +/** + * Defines values for OpenShiftAgentPoolProfileRole. + * Possible values include: 'compute', 'infra' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: OpenShiftAgentPoolProfileRole = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum OpenShiftAgentPoolProfileRole { + Compute = 'compute', + Infra = 'infra', +} + +/** + * Defines values for ContainerServiceStorageProfileTypes. + * Possible values include: 'StorageAccount', 'ManagedDisks' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ContainerServiceStorageProfileTypes = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ContainerServiceStorageProfileTypes { + StorageAccount = 'StorageAccount', + ManagedDisks = 'ManagedDisks', +} + +/** + * Defines values for ContainerServiceVMSizeTypes. + * Possible values include: 'Standard_A1', 'Standard_A10', 'Standard_A11', + * 'Standard_A1_v2', 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', + * 'Standard_A3', 'Standard_A4', 'Standard_A4_v2', 'Standard_A4m_v2', + * 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A8_v2', 'Standard_A8m_v2', 'Standard_A9', 'Standard_B2ms', + * 'Standard_B2s', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', + * 'Standard_D11', 'Standard_D11_v2', 'Standard_D11_v2_Promo', 'Standard_D12', + * 'Standard_D12_v2', 'Standard_D12_v2_Promo', 'Standard_D13', + * 'Standard_D13_v2', 'Standard_D13_v2_Promo', 'Standard_D14', + * 'Standard_D14_v2', 'Standard_D14_v2_Promo', 'Standard_D15_v2', + * 'Standard_D16_v3', 'Standard_D16s_v3', 'Standard_D1_v2', 'Standard_D2', + * 'Standard_D2_v2', 'Standard_D2_v2_Promo', 'Standard_D2_v3', + * 'Standard_D2s_v3', 'Standard_D3', 'Standard_D32_v3', 'Standard_D32s_v3', + * 'Standard_D3_v2', 'Standard_D3_v2_Promo', 'Standard_D4', 'Standard_D4_v2', + * 'Standard_D4_v2_Promo', 'Standard_D4_v3', 'Standard_D4s_v3', + * 'Standard_D5_v2', 'Standard_D5_v2_Promo', 'Standard_D64_v3', + * 'Standard_D64s_v3', 'Standard_D8_v3', 'Standard_D8s_v3', 'Standard_DS1', + * 'Standard_DS11', 'Standard_DS11_v2', 'Standard_DS11_v2_Promo', + * 'Standard_DS12', 'Standard_DS12_v2', 'Standard_DS12_v2_Promo', + * 'Standard_DS13', 'Standard_DS13-2_v2', 'Standard_DS13-4_v2', + * 'Standard_DS13_v2', 'Standard_DS13_v2_Promo', 'Standard_DS14', + * 'Standard_DS14-4_v2', 'Standard_DS14-8_v2', 'Standard_DS14_v2', + * 'Standard_DS14_v2_Promo', 'Standard_DS15_v2', 'Standard_DS1_v2', + * 'Standard_DS2', 'Standard_DS2_v2', 'Standard_DS2_v2_Promo', 'Standard_DS3', + * 'Standard_DS3_v2', 'Standard_DS3_v2_Promo', 'Standard_DS4', + * 'Standard_DS4_v2', 'Standard_DS4_v2_Promo', 'Standard_DS5_v2', + * 'Standard_DS5_v2_Promo', 'Standard_E16_v3', 'Standard_E16s_v3', + * 'Standard_E2_v3', 'Standard_E2s_v3', 'Standard_E32-16s_v3', + * 'Standard_E32-8s_v3', 'Standard_E32_v3', 'Standard_E32s_v3', + * 'Standard_E4_v3', 'Standard_E4s_v3', 'Standard_E64-16s_v3', + * 'Standard_E64-32s_v3', 'Standard_E64_v3', 'Standard_E64s_v3', + * 'Standard_E8_v3', 'Standard_E8s_v3', 'Standard_F1', 'Standard_F16', + * 'Standard_F16s', 'Standard_F16s_v2', 'Standard_F1s', 'Standard_F2', + * 'Standard_F2s', 'Standard_F2s_v2', 'Standard_F32s_v2', 'Standard_F4', + * 'Standard_F4s', 'Standard_F4s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', + * 'Standard_F8', 'Standard_F8s', 'Standard_F8s_v2', 'Standard_G1', + * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS4-4', + * 'Standard_GS4-8', 'Standard_GS5', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H16', 'Standard_H16m', 'Standard_H16mr', 'Standard_H16r', + * 'Standard_H8', 'Standard_H8m', 'Standard_L16s', 'Standard_L32s', + * 'Standard_L4s', 'Standard_L8s', 'Standard_M128-32ms', 'Standard_M128-64ms', + * 'Standard_M128ms', 'Standard_M128s', 'Standard_M64-16ms', + * 'Standard_M64-32ms', 'Standard_M64ms', 'Standard_M64s', 'Standard_NC12', + * 'Standard_NC12s_v2', 'Standard_NC12s_v3', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC24rs_v2', 'Standard_NC24rs_v3', 'Standard_NC24s_v2', + * 'Standard_NC24s_v3', 'Standard_NC6', 'Standard_NC6s_v2', 'Standard_NC6s_v3', + * 'Standard_ND12s', 'Standard_ND24rs', 'Standard_ND24s', 'Standard_ND6s', + * 'Standard_NV12', 'Standard_NV24', 'Standard_NV6' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ContainerServiceVMSizeTypes = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ContainerServiceVMSizeTypes { + StandardA1 = 'Standard_A1', + StandardA10 = 'Standard_A10', + StandardA11 = 'Standard_A11', + StandardA1V2 = 'Standard_A1_v2', + StandardA2 = 'Standard_A2', + StandardA2V2 = 'Standard_A2_v2', + StandardA2mV2 = 'Standard_A2m_v2', + StandardA3 = 'Standard_A3', + StandardA4 = 'Standard_A4', + StandardA4V2 = 'Standard_A4_v2', + StandardA4mV2 = 'Standard_A4m_v2', + StandardA5 = 'Standard_A5', + StandardA6 = 'Standard_A6', + StandardA7 = 'Standard_A7', + StandardA8 = 'Standard_A8', + StandardA8V2 = 'Standard_A8_v2', + StandardA8mV2 = 'Standard_A8m_v2', + StandardA9 = 'Standard_A9', + StandardB2ms = 'Standard_B2ms', + StandardB2s = 'Standard_B2s', + StandardB4ms = 'Standard_B4ms', + StandardB8ms = 'Standard_B8ms', + StandardD1 = 'Standard_D1', + StandardD11 = 'Standard_D11', + StandardD11V2 = 'Standard_D11_v2', + StandardD11V2Promo = 'Standard_D11_v2_Promo', + StandardD12 = 'Standard_D12', + StandardD12V2 = 'Standard_D12_v2', + StandardD12V2Promo = 'Standard_D12_v2_Promo', + StandardD13 = 'Standard_D13', + StandardD13V2 = 'Standard_D13_v2', + StandardD13V2Promo = 'Standard_D13_v2_Promo', + StandardD14 = 'Standard_D14', + StandardD14V2 = 'Standard_D14_v2', + StandardD14V2Promo = 'Standard_D14_v2_Promo', + StandardD15V2 = 'Standard_D15_v2', + StandardD16V3 = 'Standard_D16_v3', + StandardD16sV3 = 'Standard_D16s_v3', + StandardD1V2 = 'Standard_D1_v2', + StandardD2 = 'Standard_D2', + StandardD2V2 = 'Standard_D2_v2', + StandardD2V2Promo = 'Standard_D2_v2_Promo', + StandardD2V3 = 'Standard_D2_v3', + StandardD2sV3 = 'Standard_D2s_v3', + StandardD3 = 'Standard_D3', + StandardD32V3 = 'Standard_D32_v3', + StandardD32sV3 = 'Standard_D32s_v3', + StandardD3V2 = 'Standard_D3_v2', + StandardD3V2Promo = 'Standard_D3_v2_Promo', + StandardD4 = 'Standard_D4', + StandardD4V2 = 'Standard_D4_v2', + StandardD4V2Promo = 'Standard_D4_v2_Promo', + StandardD4V3 = 'Standard_D4_v3', + StandardD4sV3 = 'Standard_D4s_v3', + StandardD5V2 = 'Standard_D5_v2', + StandardD5V2Promo = 'Standard_D5_v2_Promo', + StandardD64V3 = 'Standard_D64_v3', + StandardD64sV3 = 'Standard_D64s_v3', + StandardD8V3 = 'Standard_D8_v3', + StandardD8sV3 = 'Standard_D8s_v3', + StandardDS1 = 'Standard_DS1', + StandardDS11 = 'Standard_DS11', + StandardDS11V2 = 'Standard_DS11_v2', + StandardDS11V2Promo = 'Standard_DS11_v2_Promo', + StandardDS12 = 'Standard_DS12', + StandardDS12V2 = 'Standard_DS12_v2', + StandardDS12V2Promo = 'Standard_DS12_v2_Promo', + StandardDS13 = 'Standard_DS13', + StandardDS132V2 = 'Standard_DS13-2_v2', + StandardDS134V2 = 'Standard_DS13-4_v2', + StandardDS13V2 = 'Standard_DS13_v2', + StandardDS13V2Promo = 'Standard_DS13_v2_Promo', + StandardDS14 = 'Standard_DS14', + StandardDS144V2 = 'Standard_DS14-4_v2', + StandardDS148V2 = 'Standard_DS14-8_v2', + StandardDS14V2 = 'Standard_DS14_v2', + StandardDS14V2Promo = 'Standard_DS14_v2_Promo', + StandardDS15V2 = 'Standard_DS15_v2', + StandardDS1V2 = 'Standard_DS1_v2', + StandardDS2 = 'Standard_DS2', + StandardDS2V2 = 'Standard_DS2_v2', + StandardDS2V2Promo = 'Standard_DS2_v2_Promo', + StandardDS3 = 'Standard_DS3', + StandardDS3V2 = 'Standard_DS3_v2', + StandardDS3V2Promo = 'Standard_DS3_v2_Promo', + StandardDS4 = 'Standard_DS4', + StandardDS4V2 = 'Standard_DS4_v2', + StandardDS4V2Promo = 'Standard_DS4_v2_Promo', + StandardDS5V2 = 'Standard_DS5_v2', + StandardDS5V2Promo = 'Standard_DS5_v2_Promo', + StandardE16V3 = 'Standard_E16_v3', + StandardE16sV3 = 'Standard_E16s_v3', + StandardE2V3 = 'Standard_E2_v3', + StandardE2sV3 = 'Standard_E2s_v3', + StandardE3216sV3 = 'Standard_E32-16s_v3', + StandardE328sV3 = 'Standard_E32-8s_v3', + StandardE32V3 = 'Standard_E32_v3', + StandardE32sV3 = 'Standard_E32s_v3', + StandardE4V3 = 'Standard_E4_v3', + StandardE4sV3 = 'Standard_E4s_v3', + StandardE6416sV3 = 'Standard_E64-16s_v3', + StandardE6432sV3 = 'Standard_E64-32s_v3', + StandardE64V3 = 'Standard_E64_v3', + StandardE64sV3 = 'Standard_E64s_v3', + StandardE8V3 = 'Standard_E8_v3', + StandardE8sV3 = 'Standard_E8s_v3', + StandardF1 = 'Standard_F1', + StandardF16 = 'Standard_F16', + StandardF16s = 'Standard_F16s', + StandardF16sV2 = 'Standard_F16s_v2', + StandardF1s = 'Standard_F1s', + StandardF2 = 'Standard_F2', + StandardF2s = 'Standard_F2s', + StandardF2sV2 = 'Standard_F2s_v2', + StandardF32sV2 = 'Standard_F32s_v2', + StandardF4 = 'Standard_F4', + StandardF4s = 'Standard_F4s', + StandardF4sV2 = 'Standard_F4s_v2', + StandardF64sV2 = 'Standard_F64s_v2', + StandardF72sV2 = 'Standard_F72s_v2', + StandardF8 = 'Standard_F8', + StandardF8s = 'Standard_F8s', + StandardF8sV2 = 'Standard_F8s_v2', + StandardG1 = 'Standard_G1', + StandardG2 = 'Standard_G2', + StandardG3 = 'Standard_G3', + StandardG4 = 'Standard_G4', + StandardG5 = 'Standard_G5', + StandardGS1 = 'Standard_GS1', + StandardGS2 = 'Standard_GS2', + StandardGS3 = 'Standard_GS3', + StandardGS4 = 'Standard_GS4', + StandardGS44 = 'Standard_GS4-4', + StandardGS48 = 'Standard_GS4-8', + StandardGS5 = 'Standard_GS5', + StandardGS516 = 'Standard_GS5-16', + StandardGS58 = 'Standard_GS5-8', + StandardH16 = 'Standard_H16', + StandardH16m = 'Standard_H16m', + StandardH16mr = 'Standard_H16mr', + StandardH16r = 'Standard_H16r', + StandardH8 = 'Standard_H8', + StandardH8m = 'Standard_H8m', + StandardL16s = 'Standard_L16s', + StandardL32s = 'Standard_L32s', + StandardL4s = 'Standard_L4s', + StandardL8s = 'Standard_L8s', + StandardM12832ms = 'Standard_M128-32ms', + StandardM12864ms = 'Standard_M128-64ms', + StandardM128ms = 'Standard_M128ms', + StandardM128s = 'Standard_M128s', + StandardM6416ms = 'Standard_M64-16ms', + StandardM6432ms = 'Standard_M64-32ms', + StandardM64ms = 'Standard_M64ms', + StandardM64s = 'Standard_M64s', + StandardNC12 = 'Standard_NC12', + StandardNC12sV2 = 'Standard_NC12s_v2', + StandardNC12sV3 = 'Standard_NC12s_v3', + StandardNC24 = 'Standard_NC24', + StandardNC24r = 'Standard_NC24r', + StandardNC24rsV2 = 'Standard_NC24rs_v2', + StandardNC24rsV3 = 'Standard_NC24rs_v3', + StandardNC24sV2 = 'Standard_NC24s_v2', + StandardNC24sV3 = 'Standard_NC24s_v3', + StandardNC6 = 'Standard_NC6', + StandardNC6sV2 = 'Standard_NC6s_v2', + StandardNC6sV3 = 'Standard_NC6s_v3', + StandardND12s = 'Standard_ND12s', + StandardND24rs = 'Standard_ND24rs', + StandardND24s = 'Standard_ND24s', + StandardND6s = 'Standard_ND6s', + StandardNV12 = 'Standard_NV12', + StandardNV24 = 'Standard_NV24', + StandardNV6 = 'Standard_NV6', +} + +/** + * Defines values for ContainerServiceOrchestratorTypes. + * Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: ContainerServiceOrchestratorTypes = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum ContainerServiceOrchestratorTypes { + Kubernetes = 'Kubernetes', + Swarm = 'Swarm', + DCOS = 'DCOS', + DockerCE = 'DockerCE', + Custom = 'Custom', +} + +/** + * Defines values for NetworkPlugin. + * Possible values include: 'azure', 'kubenet' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: NetworkPlugin = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum NetworkPlugin { + Azure = 'azure', + Kubenet = 'kubenet', +} + +/** + * Defines values for NetworkPolicy. + * Possible values include: 'calico' + * There could be more values for this enum apart from the ones defined here.If + * you want to set a value that is not from the known values then you can do + * the following: + * let param: NetworkPolicy = + * "someUnknownValueThatWillStillBeValid"; + * @readonly + * @enum {string} + */ +export enum NetworkPolicy { + Calico = 'calico', +} + +/** + * Contains response data for the get operation. + */ +export type OpenShiftManagedClustersGetResponse = OpenShiftManagedCluster & { + /** + * 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: OpenShiftManagedCluster; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type OpenShiftManagedClustersCreateOrUpdateResponse = OpenShiftManagedCluster & { + /** + * 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: OpenShiftManagedCluster; + }; +}; + +/** + * Contains response data for the updateTags operation. + */ +export type OpenShiftManagedClustersUpdateTagsResponse = OpenShiftManagedCluster & { + /** + * 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: OpenShiftManagedCluster; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type OpenShiftManagedClustersBeginCreateOrUpdateResponse = OpenShiftManagedCluster & { + /** + * 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: OpenShiftManagedCluster; + }; +}; + +/** + * Contains response data for the beginUpdateTags operation. + */ +export type OpenShiftManagedClustersBeginUpdateTagsResponse = OpenShiftManagedCluster & { + /** + * 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: OpenShiftManagedCluster; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ContainerServicesListResponse = ContainerServiceListResult & { + /** + * 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: ContainerServiceListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ContainerServicesCreateOrUpdateResponse = ContainerService & { + /** + * 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: ContainerService; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ContainerServicesGetResponse = ContainerService & { + /** + * 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: ContainerService; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ContainerServicesListByResourceGroupResponse = ContainerServiceListResult & { + /** + * 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: ContainerServiceListResult; + }; +}; + +/** + * Contains response data for the listOrchestrators operation. + */ +export type ContainerServicesListOrchestratorsResponse = OrchestratorVersionProfileListResult & { + /** + * 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: OrchestratorVersionProfileListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ContainerServicesBeginCreateOrUpdateResponse = ContainerService & { + /** + * 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: ContainerService; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ContainerServicesListNextResponse = ContainerServiceListResult & { + /** + * 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: ContainerServiceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ContainerServicesListByResourceGroupNextResponse = ContainerServiceListResult & { + /** + * 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: ContainerServiceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * 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: OperationListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagedClustersListResponse = ManagedClusterListResult & { + /** + * 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: ManagedClusterListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ManagedClustersListByResourceGroupResponse = ManagedClusterListResult & { + /** + * 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: ManagedClusterListResult; + }; +}; + +/** + * Contains response data for the getUpgradeProfile operation. + */ +export type ManagedClustersGetUpgradeProfileResponse = ManagedClusterUpgradeProfile & { + /** + * 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: ManagedClusterUpgradeProfile; + }; +}; + +/** + * Contains response data for the getAccessProfile operation. + */ +export type ManagedClustersGetAccessProfileResponse = ManagedClusterAccessProfile & { + /** + * 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: ManagedClusterAccessProfile; + }; +}; + +/** + * Contains response data for the listClusterAdminCredentials operation. + */ +export type ManagedClustersListClusterAdminCredentialsResponse = CredentialResults & { + /** + * 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: CredentialResults; + }; +}; + +/** + * Contains response data for the listClusterUserCredentials operation. + */ +export type ManagedClustersListClusterUserCredentialsResponse = CredentialResults & { + /** + * 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: CredentialResults; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ManagedClustersGetResponse = ManagedCluster & { + /** + * 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: ManagedCluster; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type ManagedClustersCreateOrUpdateResponse = ManagedCluster & { + /** + * 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: ManagedCluster; + }; +}; + +/** + * Contains response data for the updateTags operation. + */ +export type ManagedClustersUpdateTagsResponse = ManagedCluster & { + /** + * 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: ManagedCluster; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type ManagedClustersBeginCreateOrUpdateResponse = ManagedCluster & { + /** + * 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: ManagedCluster; + }; +}; + +/** + * Contains response data for the beginUpdateTags operation. + */ +export type ManagedClustersBeginUpdateTagsResponse = ManagedCluster & { + /** + * 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: ManagedCluster; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ManagedClustersListNextResponse = ManagedClusterListResult & { + /** + * 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: ManagedClusterListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ManagedClustersListByResourceGroupNextResponse = ManagedClusterListResult & { + /** + * 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: ManagedClusterListResult; + }; +}; diff --git a/packages/@azure/arm-containerservice/lib/models/managedClustersMappers.ts b/packages/@azure/arm-containerservice/lib/models/managedClustersMappers.ts new file mode 100644 index 000000000000..acc4e6eff1fb --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/managedClustersMappers.ts @@ -0,0 +1,53 @@ +/* + * 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 { + discriminators, + ManagedClusterListResult, + ManagedCluster, + Resource, + BaseResource, + ManagedClusterAgentPoolProfile, + ContainerServiceLinuxProfile, + ContainerServiceSshConfiguration, + ContainerServiceSshPublicKey, + ManagedClusterServicePrincipalProfile, + ManagedClusterAddonProfile, + ContainerServiceNetworkProfile, + ManagedClusterAADProfile, + CloudError, + ManagedClusterUpgradeProfile, + ManagedClusterPoolUpgradeProfile, + ManagedClusterAccessProfile, + CredentialResults, + CredentialResult, + TagsObject, + OpenShiftManagedCluster, + PurchasePlan, + NetworkProfile, + OpenShiftRouterProfile, + OpenShiftManagedClusterMasterPoolProfile, + OpenShiftManagedClusterAgentPoolProfile, + OpenShiftManagedClusterAuthProfile, + OpenShiftManagedClusterIdentityProvider, + OpenShiftManagedClusterBaseIdentityProvider, + OpenShiftManagedClusterAADIdentityProvider, + ContainerService, + ContainerServiceOrchestratorProfile, + ContainerServiceCustomProfile, + ContainerServiceServicePrincipalProfile, + KeyVaultSecretRef, + ContainerServiceMasterProfile, + ContainerServiceAgentPoolProfile, + ContainerServiceWindowsProfile, + ContainerServiceDiagnosticsProfile, + ContainerServiceVMDiagnostics +} from "../models/mappers"; + diff --git a/packages/@azure/arm-containerservice/lib/models/mappers.ts b/packages/@azure/arm-containerservice/lib/models/mappers.ts new file mode 100644 index 000000000000..f347b9272e41 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/mappers.ts @@ -0,0 +1,1663 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "ms-rest-azure-js"; +import * as msRest from "ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +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" + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PurchasePlan: msRest.CompositeMapper = { + serializedName: "PurchasePlan", + type: { + name: "Composite", + className: "PurchasePlan", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + product: { + serializedName: "product", + type: { + name: "String" + } + }, + promotionCode: { + serializedName: "promotionCode", + type: { + name: "String" + } + }, + publisher: { + serializedName: "publisher", + type: { + name: "String" + } + } + } + } +}; + +export const OpenShiftRouterProfile: msRest.CompositeMapper = { + serializedName: "OpenShiftRouterProfile", + type: { + name: "Composite", + className: "OpenShiftRouterProfile", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + publicSubdomain: { + serializedName: "publicSubdomain", + type: { + name: "String" + } + }, + fqdn: { + readOnly: true, + serializedName: "fqdn", + type: { + name: "String" + } + } + } + } +}; + +export const NetworkProfile: msRest.CompositeMapper = { + serializedName: "NetworkProfile", + type: { + name: "Composite", + className: "NetworkProfile", + modelProperties: { + vnetCidr: { + serializedName: "vnetCidr", + defaultValue: '10.0.0.0/8', + type: { + name: "String" + } + }, + peerVnetId: { + serializedName: "peerVnetId", + type: { + name: "String" + } + } + } + } +}; + +export const OpenShiftManagedClusterMasterPoolProfile: msRest.CompositeMapper = { + serializedName: "OpenShiftManagedClusterMasterPoolProfile", + type: { + name: "Composite", + className: "OpenShiftManagedClusterMasterPoolProfile", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + count: { + required: true, + serializedName: "count", + defaultValue: 3, + constraints: { + InclusiveMaximum: 10, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + vmSize: { + required: true, + serializedName: "vmSize", + type: { + name: "String" + } + }, + subnetCidr: { + serializedName: "subnetCidr", + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", + defaultValue: 'Linux', + type: { + name: "String" + } + } + } + } +}; + +export const OpenShiftManagedClusterAgentPoolProfile: msRest.CompositeMapper = { + serializedName: "OpenShiftManagedClusterAgentPoolProfile", + type: { + name: "Composite", + className: "OpenShiftManagedClusterAgentPoolProfile", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + count: { + required: true, + serializedName: "count", + defaultValue: 2, + constraints: { + InclusiveMaximum: 5, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + vmSize: { + required: true, + serializedName: "vmSize", + type: { + name: "String" + } + }, + subnetCidr: { + serializedName: "subnetCidr", + defaultValue: '10.0.0.0/24', + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", + defaultValue: 'Linux', + type: { + name: "String" + } + }, + role: { + serializedName: "role", + type: { + name: "String" + } + } + } + } +}; + +export const OpenShiftManagedClusterBaseIdentityProvider: msRest.CompositeMapper = { + serializedName: "OpenShiftManagedClusterBaseIdentityProvider", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "OpenShiftManagedClusterBaseIdentityProvider", + className: "OpenShiftManagedClusterBaseIdentityProvider", + modelProperties: { + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const OpenShiftManagedClusterIdentityProvider: msRest.CompositeMapper = { + serializedName: "OpenShiftManagedClusterIdentityProvider", + type: { + name: "Composite", + className: "OpenShiftManagedClusterIdentityProvider", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + provider: { + serializedName: "provider", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "OpenShiftManagedClusterBaseIdentityProvider", + className: "OpenShiftManagedClusterBaseIdentityProvider" + } + } + } + } +}; + +export const OpenShiftManagedClusterAuthProfile: msRest.CompositeMapper = { + serializedName: "OpenShiftManagedClusterAuthProfile", + type: { + name: "Composite", + className: "OpenShiftManagedClusterAuthProfile", + modelProperties: { + identityProviders: { + serializedName: "identityProviders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenShiftManagedClusterIdentityProvider" + } + } + } + } + } + } +}; + +export const OpenShiftManagedCluster: msRest.CompositeMapper = { + serializedName: "OpenShiftManagedCluster", + type: { + name: "Composite", + className: "OpenShiftManagedCluster", + modelProperties: { + ...Resource.type.modelProperties, + plan: { + serializedName: "plan", + type: { + name: "Composite", + className: "PurchasePlan" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + openShiftVersion: { + required: true, + serializedName: "properties.openShiftVersion", + type: { + name: "String" + } + }, + publicHostname: { + serializedName: "properties.publicHostname", + type: { + name: "String" + } + }, + fqdn: { + serializedName: "properties.fqdn", + type: { + name: "String" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "NetworkProfile" + } + }, + routerProfiles: { + serializedName: "properties.routerProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenShiftRouterProfile" + } + } + } + }, + masterPoolProfile: { + serializedName: "properties.masterPoolProfile", + type: { + name: "Composite", + className: "OpenShiftManagedClusterMasterPoolProfile" + } + }, + agentPoolProfiles: { + serializedName: "properties.agentPoolProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OpenShiftManagedClusterAgentPoolProfile" + } + } + } + }, + authProfile: { + serializedName: "properties.authProfile", + type: { + name: "Composite", + className: "OpenShiftManagedClusterAuthProfile" + } + } + } + } +}; + +export const OpenShiftManagedClusterAADIdentityProvider: msRest.CompositeMapper = { + serializedName: "AADIdentityProvider", + type: { + name: "Composite", + polymorphicDiscriminator: OpenShiftManagedClusterBaseIdentityProvider.type.polymorphicDiscriminator, + uberParent: "OpenShiftManagedClusterBaseIdentityProvider", + className: "OpenShiftManagedClusterAADIdentityProvider", + modelProperties: { + ...OpenShiftManagedClusterBaseIdentityProvider.type.modelProperties, + clientId: { + serializedName: "clientId", + type: { + name: "String" + } + }, + secret: { + serializedName: "secret", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + } + } + } +}; + +export const TagsObject: msRest.CompositeMapper = { + serializedName: "TagsObject", + type: { + name: "Composite", + className: "TagsObject", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ContainerServiceCustomProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceCustomProfile", + type: { + name: "Composite", + className: "ContainerServiceCustomProfile", + modelProperties: { + orchestrator: { + required: true, + serializedName: "orchestrator", + type: { + name: "String" + } + } + } + } +}; + +export const KeyVaultSecretRef: msRest.CompositeMapper = { + serializedName: "KeyVaultSecretRef", + type: { + name: "Composite", + className: "KeyVaultSecretRef", + modelProperties: { + vaultID: { + required: true, + serializedName: "vaultID", + type: { + name: "String" + } + }, + secretName: { + required: true, + serializedName: "secretName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceServicePrincipalProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceServicePrincipalProfile", + type: { + name: "Composite", + className: "ContainerServiceServicePrincipalProfile", + modelProperties: { + clientId: { + required: true, + serializedName: "clientId", + type: { + name: "String" + } + }, + secret: { + serializedName: "secret", + type: { + name: "String" + } + }, + keyVaultSecretRef: { + serializedName: "keyVaultSecretRef", + type: { + name: "Composite", + className: "KeyVaultSecretRef" + } + } + } + } +}; + +export const ContainerServiceOrchestratorProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceOrchestratorProfile", + type: { + name: "Composite", + className: "ContainerServiceOrchestratorProfile", + modelProperties: { + orchestratorType: { + required: true, + serializedName: "orchestratorType", + type: { + name: "String" + } + }, + orchestratorVersion: { + serializedName: "orchestratorVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceMasterProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceMasterProfile", + type: { + name: "Composite", + className: "ContainerServiceMasterProfile", + modelProperties: { + count: { + serializedName: "count", + defaultValue: 1, + type: { + name: "Number" + } + }, + dnsPrefix: { + required: true, + serializedName: "dnsPrefix", + type: { + name: "String" + } + }, + vmSize: { + required: true, + serializedName: "vmSize", + type: { + name: "String" + } + }, + osDiskSizeGB: { + serializedName: "osDiskSizeGB", + type: { + name: "Number" + } + }, + vnetSubnetID: { + serializedName: "vnetSubnetID", + type: { + name: "String" + } + }, + firstConsecutiveStaticIP: { + serializedName: "firstConsecutiveStaticIP", + defaultValue: '10.240.255.5', + type: { + name: "String" + } + }, + storageProfile: { + serializedName: "storageProfile", + type: { + name: "String" + } + }, + fqdn: { + readOnly: true, + serializedName: "fqdn", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceAgentPoolProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceAgentPoolProfile", + type: { + name: "Composite", + className: "ContainerServiceAgentPoolProfile", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + count: { + serializedName: "count", + defaultValue: 1, + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + vmSize: { + required: true, + serializedName: "vmSize", + type: { + name: "String" + } + }, + osDiskSizeGB: { + serializedName: "osDiskSizeGB", + type: { + name: "Number" + } + }, + dnsPrefix: { + serializedName: "dnsPrefix", + type: { + name: "String" + } + }, + fqdn: { + readOnly: true, + serializedName: "fqdn", + type: { + name: "String" + } + }, + ports: { + serializedName: "ports", + type: { + name: "Sequence", + element: { + type: { + name: "Number" + } + } + } + }, + storageProfile: { + serializedName: "storageProfile", + type: { + name: "String" + } + }, + vnetSubnetID: { + serializedName: "vnetSubnetID", + type: { + name: "String" + } + }, + osType: { + serializedName: "osType", + defaultValue: 'Linux', + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceWindowsProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceWindowsProfile", + type: { + name: "Composite", + className: "ContainerServiceWindowsProfile", + modelProperties: { + adminUsername: { + required: true, + serializedName: "adminUsername", + constraints: { + Pattern: /^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$/ + }, + type: { + name: "String" + } + }, + adminPassword: { + required: true, + serializedName: "adminPassword", + constraints: { + Pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$/ + }, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceSshPublicKey: msRest.CompositeMapper = { + serializedName: "ContainerServiceSshPublicKey", + type: { + name: "Composite", + className: "ContainerServiceSshPublicKey", + modelProperties: { + keyData: { + required: true, + serializedName: "keyData", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceSshConfiguration: msRest.CompositeMapper = { + serializedName: "ContainerServiceSshConfiguration", + type: { + name: "Composite", + className: "ContainerServiceSshConfiguration", + modelProperties: { + publicKeys: { + required: true, + serializedName: "publicKeys", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerServiceSshPublicKey" + } + } + } + } + } + } +}; + +export const ContainerServiceLinuxProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceLinuxProfile", + type: { + name: "Composite", + className: "ContainerServiceLinuxProfile", + modelProperties: { + adminUsername: { + required: true, + serializedName: "adminUsername", + constraints: { + Pattern: /^[A-Za-z][-A-Za-z0-9_]*$/ + }, + type: { + name: "String" + } + }, + ssh: { + required: true, + serializedName: "ssh", + type: { + name: "Composite", + className: "ContainerServiceSshConfiguration" + } + } + } + } +}; + +export const ContainerServiceVMDiagnostics: msRest.CompositeMapper = { + serializedName: "ContainerServiceVMDiagnostics", + type: { + name: "Composite", + className: "ContainerServiceVMDiagnostics", + modelProperties: { + enabled: { + required: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + storageUri: { + readOnly: true, + serializedName: "storageUri", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceDiagnosticsProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceDiagnosticsProfile", + type: { + name: "Composite", + className: "ContainerServiceDiagnosticsProfile", + modelProperties: { + vmDiagnostics: { + required: true, + serializedName: "vmDiagnostics", + type: { + name: "Composite", + className: "ContainerServiceVMDiagnostics" + } + } + } + } +}; + +export const ContainerService: msRest.CompositeMapper = { + serializedName: "ContainerService", + type: { + name: "Composite", + className: "ContainerService", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + orchestratorProfile: { + required: true, + serializedName: "properties.orchestratorProfile", + type: { + name: "Composite", + className: "ContainerServiceOrchestratorProfile" + } + }, + customProfile: { + serializedName: "properties.customProfile", + type: { + name: "Composite", + className: "ContainerServiceCustomProfile" + } + }, + servicePrincipalProfile: { + serializedName: "properties.servicePrincipalProfile", + type: { + name: "Composite", + className: "ContainerServiceServicePrincipalProfile" + } + }, + masterProfile: { + required: true, + serializedName: "properties.masterProfile", + type: { + name: "Composite", + className: "ContainerServiceMasterProfile" + } + }, + agentPoolProfiles: { + serializedName: "properties.agentPoolProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerServiceAgentPoolProfile" + } + } + } + }, + windowsProfile: { + serializedName: "properties.windowsProfile", + type: { + name: "Composite", + className: "ContainerServiceWindowsProfile" + } + }, + linuxProfile: { + required: true, + serializedName: "properties.linuxProfile", + type: { + name: "Composite", + className: "ContainerServiceLinuxProfile" + } + }, + diagnosticsProfile: { + serializedName: "properties.diagnosticsProfile", + type: { + name: "Composite", + className: "ContainerServiceDiagnosticsProfile" + } + } + } + } +}; + +export const OperationValue: msRest.CompositeMapper = { + serializedName: "OperationValue", + type: { + name: "Composite", + className: "OperationValue", + modelProperties: { + origin: { + readOnly: true, + serializedName: "origin", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + operation: { + readOnly: true, + serializedName: "display.operation", + type: { + name: "String" + } + }, + resource: { + readOnly: true, + serializedName: "display.resource", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "display.description", + type: { + name: "String" + } + }, + provider: { + readOnly: true, + serializedName: "display.provider", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterServicePrincipalProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterServicePrincipalProfile", + type: { + name: "Composite", + className: "ManagedClusterServicePrincipalProfile", + modelProperties: { + clientId: { + required: true, + serializedName: "clientId", + type: { + name: "String" + } + }, + secret: { + serializedName: "secret", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterAgentPoolProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterAgentPoolProfile", + type: { + name: "Composite", + className: "ManagedClusterAgentPoolProfile", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + count: { + serializedName: "count", + defaultValue: 1, + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 1 + }, + type: { + name: "Number" + } + }, + vmSize: { + required: true, + serializedName: "vmSize", + type: { + name: "String" + } + }, + osDiskSizeGB: { + serializedName: "osDiskSizeGB", + type: { + name: "Number" + } + }, + storageProfile: { + readOnly: true, + serializedName: "storageProfile", + type: { + name: "String" + } + }, + vnetSubnetID: { + serializedName: "vnetSubnetID", + type: { + name: "String" + } + }, + maxPods: { + serializedName: "maxPods", + type: { + name: "Number" + } + }, + osType: { + serializedName: "osType", + defaultValue: 'Linux', + type: { + name: "String" + } + } + } + } +}; + +export const ContainerServiceNetworkProfile: msRest.CompositeMapper = { + serializedName: "ContainerServiceNetworkProfile", + type: { + name: "Composite", + className: "ContainerServiceNetworkProfile", + modelProperties: { + networkPlugin: { + serializedName: "networkPlugin", + defaultValue: 'kubenet', + type: { + name: "String" + } + }, + networkPolicy: { + serializedName: "networkPolicy", + type: { + name: "String" + } + }, + podCidr: { + serializedName: "podCidr", + defaultValue: '10.244.0.0/16', + constraints: { + Pattern: /^([0-9]{1,3}\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$/ + }, + type: { + name: "String" + } + }, + serviceCidr: { + serializedName: "serviceCidr", + defaultValue: '10.0.0.0/16', + constraints: { + Pattern: /^([0-9]{1,3}\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$/ + }, + type: { + name: "String" + } + }, + dnsServiceIP: { + serializedName: "dnsServiceIP", + defaultValue: '10.0.0.10', + constraints: { + Pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ + }, + type: { + name: "String" + } + }, + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", + defaultValue: '172.17.0.1/16', + constraints: { + Pattern: /^([0-9]{1,3}\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$/ + }, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterAddonProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterAddonProfile", + type: { + name: "Composite", + className: "ManagedClusterAddonProfile", + modelProperties: { + enabled: { + required: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + config: { + serializedName: "config", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ManagedClusterAADProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterAADProfile", + type: { + name: "Composite", + className: "ManagedClusterAADProfile", + modelProperties: { + clientAppID: { + required: true, + serializedName: "clientAppID", + type: { + name: "String" + } + }, + serverAppID: { + required: true, + serializedName: "serverAppID", + type: { + name: "String" + } + }, + serverAppSecret: { + serializedName: "serverAppSecret", + type: { + name: "String" + } + }, + tenantID: { + serializedName: "tenantID", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCluster: msRest.CompositeMapper = { + serializedName: "ManagedCluster", + type: { + name: "Composite", + className: "ManagedCluster", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + kubernetesVersion: { + serializedName: "properties.kubernetesVersion", + type: { + name: "String" + } + }, + dnsPrefix: { + serializedName: "properties.dnsPrefix", + type: { + name: "String" + } + }, + fqdn: { + readOnly: true, + serializedName: "properties.fqdn", + type: { + name: "String" + } + }, + agentPoolProfiles: { + serializedName: "properties.agentPoolProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedClusterAgentPoolProfile" + } + } + } + }, + linuxProfile: { + serializedName: "properties.linuxProfile", + type: { + name: "Composite", + className: "ContainerServiceLinuxProfile" + } + }, + servicePrincipalProfile: { + serializedName: "properties.servicePrincipalProfile", + type: { + name: "Composite", + className: "ManagedClusterServicePrincipalProfile" + } + }, + addonProfiles: { + serializedName: "properties.addonProfiles", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "ManagedClusterAddonProfile" + } + } + } + }, + nodeResourceGroup: { + readOnly: true, + serializedName: "properties.nodeResourceGroup", + type: { + name: "String" + } + }, + enableRBAC: { + serializedName: "properties.enableRBAC", + type: { + name: "Boolean" + } + }, + networkProfile: { + serializedName: "properties.networkProfile", + type: { + name: "Composite", + className: "ContainerServiceNetworkProfile" + } + }, + aadProfile: { + serializedName: "properties.aadProfile", + type: { + name: "Composite", + className: "ManagedClusterAADProfile" + } + } + } + } +}; + +export const OrchestratorProfile: msRest.CompositeMapper = { + serializedName: "OrchestratorProfile", + type: { + name: "Composite", + className: "OrchestratorProfile", + modelProperties: { + orchestratorType: { + required: true, + serializedName: "orchestratorType", + type: { + name: "String" + } + }, + orchestratorVersion: { + required: true, + serializedName: "orchestratorVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedClusterAccessProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterAccessProfile", + type: { + name: "Composite", + className: "ManagedClusterAccessProfile", + modelProperties: { + ...Resource.type.modelProperties, + kubeConfig: { + serializedName: "properties.kubeConfig", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const ManagedClusterPoolUpgradeProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterPoolUpgradeProfile", + type: { + name: "Composite", + className: "ManagedClusterPoolUpgradeProfile", + modelProperties: { + kubernetesVersion: { + required: true, + serializedName: "kubernetesVersion", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + osType: { + required: true, + serializedName: "osType", + defaultValue: 'Linux', + type: { + name: "String" + } + }, + upgrades: { + serializedName: "upgrades", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ManagedClusterUpgradeProfile: msRest.CompositeMapper = { + serializedName: "ManagedClusterUpgradeProfile", + type: { + name: "Composite", + className: "ManagedClusterUpgradeProfile", + 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" + } + }, + controlPlaneProfile: { + required: true, + serializedName: "properties.controlPlaneProfile", + type: { + name: "Composite", + className: "ManagedClusterPoolUpgradeProfile" + } + }, + agentPoolProfiles: { + required: true, + serializedName: "properties.agentPoolProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedClusterPoolUpgradeProfile" + } + } + } + } + } + } +}; + +export const CredentialResult: msRest.CompositeMapper = { + serializedName: "CredentialResult", + type: { + name: "Composite", + className: "CredentialResult", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "ByteArray" + } + } + } + } +}; + +export const CredentialResults: msRest.CompositeMapper = { + serializedName: "CredentialResults", + type: { + name: "Composite", + className: "CredentialResults", + modelProperties: { + kubeconfigs: { + readOnly: true, + serializedName: "kubeconfigs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CredentialResult" + } + } + } + } + } + } +}; + +export const OrchestratorVersionProfile: msRest.CompositeMapper = { + serializedName: "OrchestratorVersionProfile", + type: { + name: "Composite", + className: "OrchestratorVersionProfile", + modelProperties: { + orchestratorType: { + required: true, + serializedName: "orchestratorType", + type: { + name: "String" + } + }, + orchestratorVersion: { + required: true, + serializedName: "orchestratorVersion", + type: { + name: "String" + } + }, + default: { + required: true, + serializedName: "default", + type: { + name: "Boolean" + } + }, + upgrades: { + required: true, + serializedName: "upgrades", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OrchestratorProfile" + } + } + } + } + } + } +}; + +export const OrchestratorVersionProfileListResult: msRest.CompositeMapper = { + serializedName: "OrchestratorVersionProfileListResult", + type: { + name: "Composite", + className: "OrchestratorVersionProfileListResult", + 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" + } + }, + orchestrators: { + required: true, + serializedName: "properties.orchestrators", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OrchestratorVersionProfile" + } + } + } + } + } + } +}; + +export const ContainerServiceListResult: msRest.CompositeMapper = { + serializedName: "ContainerServiceListResult", + type: { + name: "Composite", + className: "ContainerServiceListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerService" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationValue" + } + } + } + } + } + } +}; + +export const ManagedClusterListResult: msRest.CompositeMapper = { + serializedName: "ManagedClusterListResult", + type: { + name: "Composite", + className: "ManagedClusterListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedCluster" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'OpenShiftManagedClusterBaseIdentityProvider' : OpenShiftManagedClusterBaseIdentityProvider, + 'OpenShiftManagedClusterBaseIdentityProvider.AADIdentityProvider' : OpenShiftManagedClusterAADIdentityProvider +}; diff --git a/packages/@azure/arm-containerservice/lib/models/openShiftManagedClustersMappers.ts b/packages/@azure/arm-containerservice/lib/models/openShiftManagedClustersMappers.ts new file mode 100644 index 000000000000..5a4e00b5a41d --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/openShiftManagedClustersMappers.ts @@ -0,0 +1,48 @@ +/* + * 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 { + discriminators, + OpenShiftManagedCluster, + Resource, + BaseResource, + PurchasePlan, + NetworkProfile, + OpenShiftRouterProfile, + OpenShiftManagedClusterMasterPoolProfile, + OpenShiftManagedClusterAgentPoolProfile, + OpenShiftManagedClusterAuthProfile, + OpenShiftManagedClusterIdentityProvider, + OpenShiftManagedClusterBaseIdentityProvider, + CloudError, + TagsObject, + OpenShiftManagedClusterAADIdentityProvider, + ContainerService, + ContainerServiceOrchestratorProfile, + ContainerServiceCustomProfile, + ContainerServiceServicePrincipalProfile, + KeyVaultSecretRef, + ContainerServiceMasterProfile, + ContainerServiceAgentPoolProfile, + ContainerServiceWindowsProfile, + ContainerServiceLinuxProfile, + ContainerServiceSshConfiguration, + ContainerServiceSshPublicKey, + ContainerServiceDiagnosticsProfile, + ContainerServiceVMDiagnostics, + ManagedCluster, + ManagedClusterAgentPoolProfile, + ManagedClusterServicePrincipalProfile, + ManagedClusterAddonProfile, + ContainerServiceNetworkProfile, + ManagedClusterAADProfile, + ManagedClusterAccessProfile +} from "../models/mappers"; + diff --git a/packages/@azure/arm-containerservice/lib/models/operationsMappers.ts b/packages/@azure/arm-containerservice/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..55bb08c1de34 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/operationsMappers.ts @@ -0,0 +1,17 @@ +/* + * 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 { + discriminators, + OperationListResult, + OperationValue, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-containerservice/lib/models/parameters.ts b/packages/@azure/arm-containerservice/lib/models/parameters.ts new file mode 100644 index 000000000000..e42ccafde634 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/models/parameters.ts @@ -0,0 +1,153 @@ +/* + * 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 "ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion0: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-09-30-preview', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-07-01', + type: { + name: "String" + } + } +}; +export const apiVersion2: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2017-09-30', + type: { + name: "String" + } + } +}; +export const apiVersion3: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2018-03-31', + type: { + name: "String" + } + } +}; +export const containerServiceName: msRest.OperationURLParameter = { + parameterPath: "containerServiceName", + mapper: { + required: true, + serializedName: "containerServiceName", + type: { + name: "String" + } + } +}; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const resourceName: msRest.OperationURLParameter = { + parameterPath: "resourceName", + mapper: { + required: true, + serializedName: "resourceName", + type: { + name: "String" + } + } +}; +export const resourceType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "resourceType" + ], + mapper: { + serializedName: "resource-type", + type: { + name: "String" + } + } +}; +export const roleName: msRest.OperationURLParameter = { + parameterPath: "roleName", + mapper: { + required: true, + serializedName: "roleName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/packages/@azure/arm-containerservice/lib/operations/containerServices.ts b/packages/@azure/arm-containerservice/lib/operations/containerServices.ts new file mode 100644 index 000000000000..7bae83a16054 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/operations/containerServices.ts @@ -0,0 +1,499 @@ +/* + * 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 "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/containerServicesMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a ContainerServices. */ +export class ContainerServices { + private readonly client: ContainerServiceClientContext; + + /** + * Create a ContainerServices. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * Gets a list of container services in the specified subscription. The operation returns + * properties of each container service including state, orchestrator, number of masters and + * agents, and FQDNs of masters and agents. + * @summary Gets a list of container services in the specified subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a container service with the specified configuration of orchestrator, + * masters, and agents. + * @summary Creates or updates a container service. + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, containerServiceName: string, parameters: Models.ContainerService, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,containerServiceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets the properties of the specified container service in the specified subscription and + * resource group. The operation returns the properties including state, orchestrator, number of + * masters and agents, and FQDNs of masters and agents. + * @summary Gets the properties of the specified container service. + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, containerServiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param callback The callback + */ + get(resourceGroupName: string, containerServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, containerServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, containerServiceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerServiceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified container service in the specified subscription and resource group. The + * operation does not delete other resources created as part of creating a container service, + * including storage accounts, VMs, and availability sets. All the other resources created with the + * container service are part of the same resource group and can be deleted individually. + * @summary Deletes the specified container service. + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, containerServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,containerServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a list of container services in the specified subscription and resource group. The + * operation returns properties of each container service including state, orchestrator, number of + * masters and agents, and FQDNs of masters and agents. + * @summary Gets a list of container services in the specified resource group. + * @param resourceGroupName The name of the resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of supported orchestrators in the specified subscription. The operation returns + * properties of each orchestrator including verison and available upgrades. + * @summary Gets a list of supported orchestrators in the specified subscription. + * @param location The name of a supported Azure region. + * @param [options] The optional parameters + * @returns Promise + */ + listOrchestrators(location: string, options?: Models.ContainerServicesListOrchestratorsOptionalParams): Promise; + /** + * @param location The name of a supported Azure region. + * @param callback The callback + */ + listOrchestrators(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The name of a supported Azure region. + * @param options The optional parameters + * @param callback The callback + */ + listOrchestrators(location: string, options: Models.ContainerServicesListOrchestratorsOptionalParams, callback: msRest.ServiceCallback): void; + listOrchestrators(location: string, options?: Models.ContainerServicesListOrchestratorsOptionalParams, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + listOrchestratorsOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a container service with the specified configuration of orchestrator, + * masters, and agents. + * @summary Creates or updates a container service. + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param parameters Parameters supplied to the Create or Update a Container Service operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, containerServiceName: string, parameters: Models.ContainerService, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + containerServiceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the specified container service in the specified subscription and resource group. The + * operation does not delete other resources created as part of creating a container service, + * including storage accounts, VMs, and availability sets. All the other resources created with the + * container service are part of the same resource group and can be deleted individually. + * @summary Deletes the specified container service. + * @param resourceGroupName The name of the resource group. + * @param containerServiceName The name of the container service in the specified subscription and + * resource group. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, containerServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + containerServiceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of container services in the specified subscription. The operation returns + * properties of each container service including state, orchestrator, number of masters and + * agents, and FQDNs of masters and agents. + * @summary Gets a list of container services in the specified subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of container services in the specified subscription and resource group. The + * operation returns properties of each container service including state, orchestrator, number of + * masters and agents, and FQDNs of masters and agents. + * @summary Gets a list of container services in the specified resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(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 + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContainerServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.containerServiceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContainerService + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContainerServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOrchestratorsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/orchestrators", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion2, + Parameters.resourceType + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OrchestratorVersionProfileListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.containerServiceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ContainerService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ContainerService + }, + 201: { + bodyMapper: Mappers.ContainerService + }, + 202: { + bodyMapper: Mappers.ContainerService + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.containerServiceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContainerServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ContainerServiceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-containerservice/lib/operations/index.ts b/packages/@azure/arm-containerservice/lib/operations/index.ts new file mode 100644 index 000000000000..6847d866f326 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/operations/index.ts @@ -0,0 +1,14 @@ +/* + * 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 * from "./openShiftManagedClusters"; +export * from "./containerServices"; +export * from "./operations"; +export * from "./managedClusters"; diff --git a/packages/@azure/arm-containerservice/lib/operations/managedClusters.ts b/packages/@azure/arm-containerservice/lib/operations/managedClusters.ts new file mode 100644 index 000000000000..47321fd42f44 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/operations/managedClusters.ts @@ -0,0 +1,728 @@ +/* + * 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 "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedClustersMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a ManagedClusters. */ +export class ManagedClusters { + private readonly client: ContainerServiceClientContext; + + /** + * Create a ManagedClusters. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties + * of each managed cluster. + * @summary Gets a list of managed clusters in the specified subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns + * properties of each managed cluster. + * @summary Lists managed clusters in the specified subscription and resource group. + * @param resourceGroupName The name of the resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets the details of the upgrade profile for a managed cluster with a specified resource group + * and name. + * @summary Gets upgrade profile for a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + getUpgradeProfile(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + getUpgradeProfile(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + getUpgradeProfile(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getUpgradeProfile(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getUpgradeProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets the accessProfile for the specified role name of the managed cluster with a specified + * resource group and name. + * @summary Gets an access profile of a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param [options] The optional parameters + * @returns Promise + */ + getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param callback The callback + */ + getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param roleName The name of the role for managed cluster accessProfile resource. + * @param options The optional parameters + * @param callback The callback + */ + getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAccessProfile(resourceGroupName: string, resourceName: string, roleName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + roleName, + options + }, + getAccessProfileOperationSpec, + callback) as Promise; + } + + /** + * Gets clusteradmin credential of the managed cluster with a specified resource group and name. + * @summary Gets clusteradmin credential of a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + listClusterAdminCredentials(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + listClusterAdminCredentials(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + listClusterAdminCredentials(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listClusterAdminCredentials(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listClusterAdminCredentialsOperationSpec, + callback) as Promise; + } + + /** + * Gets clusteruser credential of the managed cluster with a specified resource group and name. + * @summary Gets clusteruser credential of a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + listClusterUserCredentials(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + listClusterUserCredentials(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + listClusterUserCredentials(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listClusterUserCredentials(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + listClusterUserCredentialsOperationSpec, + callback) as Promise; + } + + /** + * Gets the details of the managed cluster with a specified resource group and name. + * @summary Gets a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + * version. + * @summary Creates or updates a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a Managed Cluster operation. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.ManagedCluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,resourceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates a managed cluster with the specified tags. + * @summary Updates tags on a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateTags(resourceGroupName,resourceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * @summary Deletes a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a managed cluster with the specified configuration for agents and Kubernetes + * version. + * @summary Creates or updates a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Create or Update a Managed Cluster operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.ManagedCluster, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Updates a managed cluster with the specified tags. + * @summary Updates tags on a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update Managed Cluster Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + beginUpdateTagsOperationSpec, + options); + } + + /** + * Deletes the managed cluster with a specified resource group and name. + * @summary Deletes a managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of managed clusters in the specified subscription. The operation returns properties + * of each managed cluster. + * @summary Gets a list of managed clusters in the specified subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Lists managed clusters in the specified subscription and resource group. The operation returns + * properties of each managed cluster. + * @summary Lists managed clusters in the specified subscription and resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(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 + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getUpgradeProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterUpgradeProfile + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getAccessProfileOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName, + Parameters.roleName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterAccessProfile + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listClusterAdminCredentialsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CredentialResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listClusterUserCredentialsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CredentialResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedCluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedCluster + }, + 201: { + bodyMapper: Mappers.ManagedCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedClusterListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-containerservice/lib/operations/openShiftManagedClusters.ts b/packages/@azure/arm-containerservice/lib/operations/openShiftManagedClusters.ts new file mode 100644 index 000000000000..7153cbba4ba2 --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/operations/openShiftManagedClusters.ts @@ -0,0 +1,286 @@ +/* + * 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 "ms-rest-js"; +import * as msRestAzure from "ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/openShiftManagedClustersMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a OpenShiftManagedClusters. */ +export class OpenShiftManagedClusters { + private readonly client: ContainerServiceClientContext; + + /** + * Create a OpenShiftManagedClusters. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * Gets the details of the managed openshift cluster with a specified resource group and name. + * @summary Gets a openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a openshift managed cluster with the specified configuration for agents and + * OpenShift version. + * @summary Creates or updates an openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster + * operation. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.OpenShiftManagedCluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,resourceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Updates an openshift managed cluster with the specified tags. + * @summary Updates tags on an openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateTags(resourceGroupName,resourceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the openshift managed cluster with a specified resource group and name. + * @summary Deletes an openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a openshift managed cluster with the specified configuration for agents and + * OpenShift version. + * @summary Creates or updates an openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param parameters Parameters supplied to the Create or Update an OpenShift Managed Cluster + * operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.OpenShiftManagedCluster, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Updates an openshift managed cluster with the specified tags. + * @summary Updates tags on an openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param parameters Parameters supplied to the Update OpenShift Managed Cluster Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + beginUpdateTagsOperationSpec, + options); + } + + /** + * Deletes the openshift managed cluster with a specified resource group and name. + * @summary Deletes an openshift managed cluster. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the openshift managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OpenShiftManagedCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.OpenShiftManagedCluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OpenShiftManagedCluster + }, + 201: { + bodyMapper: Mappers.OpenShiftManagedCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginUpdateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.OpenShiftManagedCluster + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-containerservice/lib/operations/operations.ts b/packages/@azure/arm-containerservice/lib/operations/operations.ts new file mode 100644 index 000000000000..178653ba1d4f --- /dev/null +++ b/packages/@azure/arm-containerservice/lib/operations/operations.ts @@ -0,0 +1,74 @@ +/* + * 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 "ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: ContainerServiceClientContext; + + /** + * Create a Operations. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * Gets a list of compute operations. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.ContainerService/operations", + queryParameters: [ + Parameters.apiVersion3 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-containerservice/package.json b/packages/@azure/arm-containerservice/package.json new file mode 100644 index 000000000000..e461299b18db --- /dev/null +++ b/packages/@azure/arm-containerservice/package.json @@ -0,0 +1,39 @@ +{ + "name": "@azure/arm-containerservice", + "author": "Microsoft Corporation", + "description": "ContainerServiceClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0-preview", + "dependencies": { + "ms-rest-azure-js": "~0.17.165", + "ms-rest-js": "~0.22.434" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./cjs/containerServiceClient.js", + "module": "./esm/containerServiceClient.js", + "types": "./cjs/containerServiceClient.d.ts", + "devDependencies": { + "tslib": "^1.9.3", + "typescript": "^3.0.3", + "webpack": "^4.17.2", + "webpack-cli": "^3.1.0" + }, + "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-containerservice", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "scripts": { + "build": "tsc && tsc -p tsconfig.esm.json && webpack", + "prepare": "npm run build" + } +} diff --git a/packages/@azure/arm-containerservice/tsconfig.esm.json b/packages/@azure/arm-containerservice/tsconfig.esm.json new file mode 100644 index 000000000000..0b3aed07505c --- /dev/null +++ b/packages/@azure/arm-containerservice/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "./esm", + "module": "es6", + "target": "es5" + } +} diff --git a/packages/@azure/arm-containerservice/tsconfig.json b/packages/@azure/arm-containerservice/tsconfig.json new file mode 100644 index 000000000000..d5b25971c029 --- /dev/null +++ b/packages/@azure/arm-containerservice/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6"], + "declaration": true, + "outDir": "./cjs" + }, + "include": ["./lib/**/*"], + "exclude": ["node_modules"] +} diff --git a/packages/@azure/arm-containerservice/webpack.config.js b/packages/@azure/arm-containerservice/webpack.config.js new file mode 100644 index 000000000000..b03a594757eb --- /dev/null +++ b/packages/@azure/arm-containerservice/webpack.config.js @@ -0,0 +1,30 @@ +// This is a template webpack config file with minimal configuration. +// Users are free to create their own webpack configuration files in their application. +const path = require('path'); + +/** + * @type {import('webpack').Configuration} + */ +const config = { + mode: 'production', + entry: './esm/containerServiceClient.js', + devtool: 'source-map', + output: { + filename: 'containerServiceClientBundle.js', + path: __dirname, + libraryTarget: 'var', + library: 'containerServiceClient' + }, + // "ms-rest-js" and "ms-rest-azure-js" are dependencies of this library. + // Customer is expected to import/include this library in browser javascript + // (probably using the script tag in their html file). + externals: { + "ms-rest-js": "msRest", + "ms-rest-azure-js": "msRestAzure" + }, + resolve: { + extensions: [".tsx", ".ts", ".js"] + } +}; + +module.exports = config; From b376451567f21d92d3bda4f07849b46e11fed8af Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Mon, 15 Oct 2018 10:17:02 -0700 Subject: [PATCH 2/2] Remove unnecessary generated files --- .../arm-containerservice/tsconfig.esm.json | 8 ----- .../arm-containerservice/webpack.config.js | 30 ------------------- 2 files changed, 38 deletions(-) delete mode 100644 packages/@azure/arm-containerservice/tsconfig.esm.json delete mode 100644 packages/@azure/arm-containerservice/webpack.config.js diff --git a/packages/@azure/arm-containerservice/tsconfig.esm.json b/packages/@azure/arm-containerservice/tsconfig.esm.json deleted file mode 100644 index 0b3aed07505c..000000000000 --- a/packages/@azure/arm-containerservice/tsconfig.esm.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "outDir": "./esm", - "module": "es6", - "target": "es5" - } -} diff --git a/packages/@azure/arm-containerservice/webpack.config.js b/packages/@azure/arm-containerservice/webpack.config.js deleted file mode 100644 index b03a594757eb..000000000000 --- a/packages/@azure/arm-containerservice/webpack.config.js +++ /dev/null @@ -1,30 +0,0 @@ -// This is a template webpack config file with minimal configuration. -// Users are free to create their own webpack configuration files in their application. -const path = require('path'); - -/** - * @type {import('webpack').Configuration} - */ -const config = { - mode: 'production', - entry: './esm/containerServiceClient.js', - devtool: 'source-map', - output: { - filename: 'containerServiceClientBundle.js', - path: __dirname, - libraryTarget: 'var', - library: 'containerServiceClient' - }, - // "ms-rest-js" and "ms-rest-azure-js" are dependencies of this library. - // Customer is expected to import/include this library in browser javascript - // (probably using the script tag in their html file). - externals: { - "ms-rest-js": "msRest", - "ms-rest-azure-js": "msRestAzure" - }, - resolve: { - extensions: [".tsx", ".ts", ".js"] - } -}; - -module.exports = config;