Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/services/containerservicesManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ npm install azure-arm-containerservice

## How to use

### Authentication, client creation and list containerServices as an example.
### Authentication, client creation and get openShiftManagedClusters as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const ContainerServiceClient = require("azure-arm-containerservice");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new ContainerServiceClient(creds, subscriptionId);
return client.containerServices.list().then((result) => {
const resourceGroupName = "testresourceGroupName";
const resourceName = "testresourceName";
return client.openShiftManagedClusters.get(resourceGroupName, resourceName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default class ContainerServiceClient extends AzureServiceClient {
generateClientRequestId: boolean;

// Operation groups
openShiftManagedClusters: operations.OpenShiftManagedClusters;
containerServices: operations.ContainerServices;
operations: operations.Operations;
managedClusters: operations.ManagedClusters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class ContainerServiceClient extends ServiceClient {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.openShiftManagedClusters = new operations.OpenShiftManagedClusters(this);
this.containerServices = new operations.ContainerServices(this);
this.operations = new operations.Operations(this);
this.managedClusters = new operations.ManagedClusters(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Profile for diagnostics on the container service cluster.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Profile for Linux VMs in the container service cluster.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* Information about a service principal identity for the cluster to use for
* manipulating Azure APIs. Either secret or keyVaultSecretRef must be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* SSH configuration for Linux-based VMs running on Azure.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

const models = require('./index');

/**
* The list of credential result response.
*
Expand Down
251 changes: 236 additions & 15 deletions lib/services/containerservicesManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,238 @@ export interface Resource extends BaseResource {
tags?: { [propertyName: string]: string };
}

/**
* @class
* Initializes a new instance of the PurchasePlan class.
* @constructor
* Used for establishing the purchase context of any 3rd Party artifact through
* MarketPlace.
*
* @member {string} [name] The plan ID.
* @member {string} [product] Specifies the product of the image from the
* marketplace. This is the same value as Offer under the imageReference
* element.
* @member {string} [promotionCode] The promotion code.
* @member {string} [publisher] The plan ID.
*/
export interface PurchasePlan {
name?: string;
product?: string;
promotionCode?: string;
publisher?: string;
}

/**
* @class
* Initializes a new instance of the OpenShiftRouterProfile class.
* @constructor
* Represents an OpenShift router
*
* @member {string} [name] Name of the router profile.
* @member {string} [publicSubdomain] DNS subdomain for openshift router.
* @member {string} [fqdn] Auto-allocated FQDN for the OpenShift router.
*/
export interface OpenShiftRouterProfile {
name?: string;
publicSubdomain?: string;
readonly fqdn?: string;
}

/**
* @class
* Initializes a new instance of the NetworkProfile class.
* @constructor
* Represents the OpenShift networking configuration
*
* @member {string} [vnetCidr] CIDR for the OpenShift Vnet. Default value:
* '10.0.0.0/8' .
* @member {string} [peerVnetId] CIDR of the Vnet to peer.
*/
export interface NetworkProfile {
vnetCidr?: string;
peerVnetId?: string;
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedClusterMasterPoolProfile class.
* @constructor
* OpenShiftManagedClusterMaterPoolProfile contains configuration for OpenShift
* master VMs.
*
* @member {string} [name] Unique name of the master pool profile in the
* context of the subscription and resource group.
* @member {number} count Number of masters (VMs) to host docker containers.
* The default value is 3. Default value: 3 .
* @member {string} vmSize Size of agent VMs. Possible values include:
* 'Standard_D2s_v3', 'Standard_D4s_v3'
* @member {string} [subnetCidr] Subnet CIDR for the peering.
* @member {string} [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' .
*/
export interface OpenShiftManagedClusterMasterPoolProfile {
name?: string;
count: number;
vmSize: string;
subnetCidr?: string;
osType?: string;
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedClusterAgentPoolProfile class.
* @constructor
* Defines the configuration of the OpenShift cluster VMs.
*
* @member {string} name Unique name of the pool profile in the context of the
* subscription and resource group.
* @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 .
* @member {string} vmSize Size of agent VMs. Possible values include:
* 'Standard_D2s_v3', 'Standard_D4s_v3'
* @member {string} [subnetCidr] Subnet CIDR for the peering. Default value:
* '10.0.0.0/24' .
* @member {string} [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' .
* @member {string} [role] Define the role of the AgentPoolProfile. Possible
* values include: 'compute', 'infra'
*/
export interface OpenShiftManagedClusterAgentPoolProfile {
name: string;
count: number;
vmSize: string;
subnetCidr?: string;
osType?: string;
role?: string;
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedClusterBaseIdentityProvider class.
* @constructor
* Structure for any Identity provider.
*
* @member {string} kind Polymorphic Discriminator
*/
export interface OpenShiftManagedClusterBaseIdentityProvider {
kind: string;
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedClusterIdentityProvider class.
* @constructor
* Defines the configuration of the identity providers to be used in the
* OpenShift cluster.
*
* @member {string} [name] Name of the provider.
* @member {object} [provider] Configuration of the provider.
* @member {string} [provider.kind] Polymorphic Discriminator
*/
export interface OpenShiftManagedClusterIdentityProvider {
name?: string;
provider?: OpenShiftManagedClusterBaseIdentityProvider;
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedClusterAuthProfile class.
* @constructor
* Defines all possible authentication profiles for the OpenShift cluster.
*
* @member {array} [identityProviders] Type of authentication profile to use.
*/
export interface OpenShiftManagedClusterAuthProfile {
identityProviders?: OpenShiftManagedClusterIdentityProvider[];
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedCluster class.
* @constructor
* OpenShift Managed cluster.
*
* @member {object} [plan] Define the resource plan as required by ARM for
* billing purposes
* @member {string} [plan.name] The plan ID.
* @member {string} [plan.product] Specifies the product of the image from the
* marketplace. This is the same value as Offer under the imageReference
* element.
* @member {string} [plan.promotionCode] The promotion code.
* @member {string} [plan.publisher] The plan ID.
* @member {string} [provisioningState] The current deployment or provisioning
* state, which only appears in the response.
* @member {string} openShiftVersion Version of OpenShift specified when
* creating the cluster.
* @member {string} [publicHostname] Optional user-specified FQDN for OpenShift
* API server.
* @member {string} [fqdn] User-specified FQDN for OpenShift API server
* loadbalancer internal hostname.
* @member {object} [networkProfile] Configuration for OpenShift networking.
* @member {string} [networkProfile.vnetCidr] CIDR for the OpenShift Vnet.
* @member {string} [networkProfile.peerVnetId] CIDR of the Vnet to peer.
* @member {array} [routerProfiles] Configuration for OpenShift router(s).
* @member {object} [masterPoolProfile] Configuration for OpenShift master VMs.
* @member {string} [masterPoolProfile.name] Unique name of the master pool
* profile in the context of the subscription and resource group.
* @member {number} [masterPoolProfile.count] Number of masters (VMs) to host
* docker containers. The default value is 3.
* @member {string} [masterPoolProfile.vmSize] Size of agent VMs. Possible
* values include: 'Standard_D2s_v3', 'Standard_D4s_v3'
* @member {string} [masterPoolProfile.subnetCidr] Subnet CIDR for the peering.
* @member {string} [masterPoolProfile.osType] OsType to be used to specify os
* type. Choose from Linux and Windows. Default to Linux. Possible values
* include: 'Linux', 'Windows'
* @member {array} [agentPoolProfiles] Configuration of OpenShift cluster VMs.
* @member {object} [authProfile] Configures OpenShift authentication.
* @member {array} [authProfile.identityProviders] Type of authentication
* profile to use.
*/
export interface OpenShiftManagedCluster extends Resource {
plan?: PurchasePlan;
readonly provisioningState?: string;
openShiftVersion: string;
publicHostname?: string;
fqdn?: string;
networkProfile?: NetworkProfile;
routerProfiles?: OpenShiftRouterProfile[];
masterPoolProfile?: OpenShiftManagedClusterMasterPoolProfile;
agentPoolProfiles?: OpenShiftManagedClusterAgentPoolProfile[];
authProfile?: OpenShiftManagedClusterAuthProfile;
}

/**
* @class
* Initializes a new instance of the OpenShiftManagedClusterAADIdentityProvider class.
* @constructor
* Defines the Identity provider for MS AAD.
*
* @member {string} [clientId] The clientId password associated with the
* provider.
* @member {string} [secret] The secret password associated with the provider.
* @member {string} [tenantId] The tenantId associated with the provider.
*/
export interface OpenShiftManagedClusterAADIdentityProvider extends OpenShiftManagedClusterBaseIdentityProvider {
clientId?: string;
secret?: string;
tenantId?: string;
}

/**
* @class
* Initializes a new instance of the TagsObject class.
* @constructor
* Tags object for patch operations.
*
* @member {object} [tags] Resource tags.
*/
export interface TagsObject {
tags?: { [propertyName: string]: string };
}

/**
* @class
* Initializes a new instance of the ContainerServiceCustomProfile class.
Expand Down Expand Up @@ -541,18 +773,6 @@ export interface OperationValue {
readonly provider?: string;
}

/**
* @class
* Initializes a new instance of the TagsObject class.
* @constructor
* Tags object for patch operations.
*
* @member {object} [tags] Resource tags.
*/
export interface TagsObject {
tags?: { [propertyName: string]: string };
}

/**
* @class
* Initializes a new instance of the ManagedClusterServicePrincipalProfile class.
Expand Down Expand Up @@ -708,14 +928,14 @@ export interface ManagedClusterAddonProfile {
*
* @member {string} clientAppID The client AAD application ID.
* @member {string} serverAppID The server AAD application ID.
* @member {string} serverAppSecret The server AAD application secret.
* @member {string} [serverAppSecret] The server AAD application secret.
* @member {string} [tenantID] The AAD tenant ID to use for authentication. If
* not specified, will use the tenant of the deployment subscription.
*/
export interface ManagedClusterAADProfile {
clientAppID: string;
serverAppID: string;
serverAppSecret: string;
serverAppSecret?: string;
tenantID?: string;
}

Expand All @@ -732,7 +952,8 @@ export interface ManagedClusterAADProfile {
* @member {string} [dnsPrefix] DNS prefix specified when creating the managed
* cluster.
* @member {string} [fqdn] FDQN for the master pool.
* @member {array} [agentPoolProfiles] Properties of the agent pool.
* @member {array} [agentPoolProfiles] Properties of the agent pool. Currently
* only one agent pool can exist.
* @member {object} [linuxProfile] Profile for Linux VMs in the container
* service cluster.
* @member {string} [linuxProfile.adminUsername] The administrator username to
Expand Down
16 changes: 15 additions & 1 deletion lib/services/containerservicesManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ var msRestAzure = require('ms-rest-azure');
exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError;
exports.Resource = require('./resource');
exports.PurchasePlan = require('./purchasePlan');
exports.OpenShiftRouterProfile = require('./openShiftRouterProfile');
exports.NetworkProfile = require('./networkProfile');
exports.OpenShiftManagedClusterMasterPoolProfile = require('./openShiftManagedClusterMasterPoolProfile');
exports.OpenShiftManagedClusterAgentPoolProfile = require('./openShiftManagedClusterAgentPoolProfile');
exports.OpenShiftManagedClusterBaseIdentityProvider = require('./openShiftManagedClusterBaseIdentityProvider');
exports.OpenShiftManagedClusterIdentityProvider = require('./openShiftManagedClusterIdentityProvider');
exports.OpenShiftManagedClusterAuthProfile = require('./openShiftManagedClusterAuthProfile');
exports.OpenShiftManagedCluster = require('./openShiftManagedCluster');
exports.OpenShiftManagedClusterAADIdentityProvider = require('./openShiftManagedClusterAADIdentityProvider');
exports.TagsObject = require('./tagsObject');
exports.ContainerServiceCustomProfile = require('./containerServiceCustomProfile');
exports.KeyVaultSecretRef = require('./keyVaultSecretRef');
exports.ContainerServiceServicePrincipalProfile = require('./containerServiceServicePrincipalProfile');
Expand All @@ -33,7 +44,6 @@ exports.ContainerServiceVMDiagnostics = require('./containerServiceVMDiagnostics
exports.ContainerServiceDiagnosticsProfile = require('./containerServiceDiagnosticsProfile');
exports.ContainerService = require('./containerService');
exports.OperationValue = require('./operationValue');
exports.TagsObject = require('./tagsObject');
exports.ManagedClusterServicePrincipalProfile = require('./managedClusterServicePrincipalProfile');
exports.ManagedClusterAgentPoolProfile = require('./managedClusterAgentPoolProfile');
exports.ContainerServiceNetworkProfile = require('./containerServiceNetworkProfile');
Expand All @@ -51,3 +61,7 @@ exports.OrchestratorVersionProfileListResult = require('./orchestratorVersionPro
exports.ContainerServiceListResult = require('./containerServiceListResult');
exports.OperationListResult = require('./operationListResult');
exports.ManagedClusterListResult = require('./managedClusterListResult');
exports.discriminators = {
'OpenShiftManagedClusterBaseIdentityProvider' : exports.OpenShiftManagedClusterBaseIdentityProvider,
'OpenShiftManagedClusterBaseIdentityProvider.AADIdentityProvider' : exports.OpenShiftManagedClusterAADIdentityProvider
};
Loading