From b01c8cabee301cac9d1133cb996fb664470aa582 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 2 Oct 2018 15:18:37 -0700 Subject: [PATCH 1/3] Generated from 9a5541421e8815773449ba570834099b97025183 (#3750) Moving MSI Identity object to correct properties --- .../containerInstanceManagementClient.d.ts | 1 + .../lib/containerInstanceManagementClient.js | 3 +- .../lib/models/containerGroup.js | 29 +- .../lib/models/containerGroupIdentity.js | 98 +++++++ ...roupIdentityUserAssignedIdentitiesValue.js | 61 ++++ .../lib/models/index.d.ts | 65 ++++- .../lib/models/index.js | 2 + .../lib/models/ipAddress.js | 2 +- .../lib/operations/containerGroups.js | 108 ++++++- .../lib/operations/index.d.ts | 151 +++++++++- .../lib/operations/index.js | 1 + .../lib/operations/serviceAssociationLink.js | 264 ++++++++++++++++++ 12 files changed, 769 insertions(+), 16 deletions(-) create mode 100644 lib/services/containerinstanceManagement/lib/models/containerGroupIdentity.js create mode 100644 lib/services/containerinstanceManagement/lib/models/containerGroupIdentityUserAssignedIdentitiesValue.js create mode 100644 lib/services/containerinstanceManagement/lib/operations/serviceAssociationLink.js diff --git a/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.d.ts b/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.d.ts index 7735724bf8..c97d627be3 100644 --- a/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.d.ts +++ b/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.d.ts @@ -60,6 +60,7 @@ export default class ContainerInstanceManagementClient extends AzureServiceClien operations: operations.Operations; containerGroupUsage: operations.ContainerGroupUsage; containerOperations: operations.ContainerOperations; + serviceAssociationLink: operations.ServiceAssociationLink; } export { ContainerInstanceManagementClient, models as ContainerInstanceManagementModels }; diff --git a/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.js b/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.js index e9bf3a99e7..75a9e2f1e4 100644 --- a/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.js +++ b/lib/services/containerinstanceManagement/lib/containerInstanceManagementClient.js @@ -50,7 +50,7 @@ class ContainerInstanceManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2018-09-01'; + this.apiVersion = '2018-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -76,6 +76,7 @@ class ContainerInstanceManagementClient extends ServiceClient { this.operations = new operations.Operations(this); this.containerGroupUsage = new operations.ContainerGroupUsage(this); this.containerOperations = new operations.ContainerOperations(this); + this.serviceAssociationLink = new operations.ServiceAssociationLink(this); this.models = models; msRest.addSerializationMixin(this); } diff --git a/lib/services/containerinstanceManagement/lib/models/containerGroup.js b/lib/services/containerinstanceManagement/lib/models/containerGroup.js index 765bf5dc94..67e01195d3 100644 --- a/lib/services/containerinstanceManagement/lib/models/containerGroup.js +++ b/lib/services/containerinstanceManagement/lib/models/containerGroup.js @@ -20,6 +20,24 @@ const models = require('./index'); class ContainerGroup extends models['Resource'] { /** * Create a ContainerGroup. + * @member {object} [identity] The identity of the container group, if + * configured. + * @member {string} [identity.principalId] The principal id of the container + * group identity. This property will only be provided for a system assigned + * identity. + * @member {string} [identity.tenantId] The tenant id associated with the + * container group. This property will only be provided for a system assigned + * identity. + * @member {string} [identity.type] The type of identity used for the + * container group. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {string} [provisioningState] The provisioning state of the * container group. This only appears in the response. * @member {array} containers The containers within the container group. @@ -35,7 +53,8 @@ class ContainerGroup extends models['Resource'] { * @member {array} [ipAddress.ports] The list of ports exposed on the * container group. * @member {string} [ipAddress.type] Specifies if the IP is exposed to the - * public internet. Possible values include: 'Public', 'Private' + * public internet or private VNET. Possible values include: 'Public', + * 'Private' * @member {string} [ipAddress.ip] The IP exposed to the public internet. * @member {string} [ipAddress.dnsNameLabel] The Dns name label for the IP. * @member {string} [ipAddress.fqdn] The FQDN for the IP. @@ -129,6 +148,14 @@ class ContainerGroup extends models['Resource'] { } } }, + identity: { + required: false, + serializedName: 'identity', + type: { + name: 'Composite', + className: 'ContainerGroupIdentity' + } + }, provisioningState: { required: false, readOnly: true, diff --git a/lib/services/containerinstanceManagement/lib/models/containerGroupIdentity.js b/lib/services/containerinstanceManagement/lib/models/containerGroupIdentity.js new file mode 100644 index 0000000000..db2e110156 --- /dev/null +++ b/lib/services/containerinstanceManagement/lib/models/containerGroupIdentity.js @@ -0,0 +1,98 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Identity for the container group. + * + */ +class ContainerGroupIdentity { + /** + * Create a ContainerGroupIdentity. + * @member {string} [principalId] The principal id of the container group + * identity. This property will only be provided for a system assigned + * identity. + * @member {string} [tenantId] The tenant id associated with the container + * group. This property will only be provided for a system assigned identity. + * @member {string} [type] The type of identity used for the container group. + * The type 'SystemAssigned, UserAssigned' includes both an implicitly + * created identity and a set of user assigned identities. The type 'None' + * will remove any identities from the container group. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' + * @member {object} [userAssignedIdentities] The list of user identities + * associated with the container group. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + constructor() { + } + + /** + * Defines the metadata of ContainerGroupIdentity + * + * @returns {object} metadata of ContainerGroupIdentity + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerGroupIdentity', + type: { + name: 'Composite', + className: 'ContainerGroupIdentity', + modelProperties: { + principalId: { + required: false, + readOnly: true, + serializedName: 'principalId', + type: { + name: 'String' + } + }, + tenantId: { + required: false, + readOnly: true, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + type: { + required: false, + serializedName: 'type', + type: { + name: 'Enum', + allowedValues: [ 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' ] + } + }, + userAssignedIdentities: { + required: false, + serializedName: 'userAssignedIdentities', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ContainerGroupIdentityUserAssignedIdentitiesValueElementType', + type: { + name: 'Composite', + className: 'ContainerGroupIdentityUserAssignedIdentitiesValue' + } + } + } + } + } + } + }; + } +} + +module.exports = ContainerGroupIdentity; diff --git a/lib/services/containerinstanceManagement/lib/models/containerGroupIdentityUserAssignedIdentitiesValue.js b/lib/services/containerinstanceManagement/lib/models/containerGroupIdentityUserAssignedIdentitiesValue.js new file mode 100644 index 0000000000..f4f545661b --- /dev/null +++ b/lib/services/containerinstanceManagement/lib/models/containerGroupIdentityUserAssignedIdentitiesValue.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Class representing a ContainerGroupIdentityUserAssignedIdentitiesValue. + */ +class ContainerGroupIdentityUserAssignedIdentitiesValue { + /** + * Create a ContainerGroupIdentityUserAssignedIdentitiesValue. + * @member {string} [principalId] The principal id of user assigned identity. + * @member {string} [clientId] The client id of user assigned identity. + */ + constructor() { + } + + /** + * Defines the metadata of ContainerGroupIdentityUserAssignedIdentitiesValue + * + * @returns {object} metadata of ContainerGroupIdentityUserAssignedIdentitiesValue + * + */ + mapper() { + return { + required: false, + serializedName: 'ContainerGroupIdentity_userAssignedIdentitiesValue', + type: { + name: 'Composite', + className: 'ContainerGroupIdentityUserAssignedIdentitiesValue', + modelProperties: { + principalId: { + required: false, + readOnly: true, + serializedName: 'principalId', + type: { + name: 'String' + } + }, + clientId: { + required: false, + readOnly: true, + serializedName: 'clientId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ContainerGroupIdentityUserAssignedIdentitiesValue; diff --git a/lib/services/containerinstanceManagement/lib/models/index.d.ts b/lib/services/containerinstanceManagement/lib/models/index.d.ts index 5081cf8f74..8756bc3ee1 100644 --- a/lib/services/containerinstanceManagement/lib/models/index.d.ts +++ b/lib/services/containerinstanceManagement/lib/models/index.d.ts @@ -435,6 +435,46 @@ export interface Volume { gitRepo?: GitRepoVolume; } +/** + * @class + * Initializes a new instance of the ContainerGroupIdentityUserAssignedIdentitiesValue class. + * @constructor + * @member {string} [principalId] The principal id of user assigned identity. + * @member {string} [clientId] The client id of user assigned identity. + */ +export interface ContainerGroupIdentityUserAssignedIdentitiesValue { + readonly principalId?: string; + readonly clientId?: string; +} + +/** + * @class + * Initializes a new instance of the ContainerGroupIdentity class. + * @constructor + * Identity for the container group. + * + * @member {string} [principalId] The principal id of the container group + * identity. This property will only be provided for a system assigned + * identity. + * @member {string} [tenantId] The tenant id associated with the container + * group. This property will only be provided for a system assigned identity. + * @member {string} [type] The type of identity used for the container group. + * The type 'SystemAssigned, UserAssigned' includes both an implicitly created + * identity and a set of user assigned identities. The type 'None' will remove + * any identities from the container group. Possible values include: + * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + * @member {object} [userAssignedIdentities] The list of user identities + * associated with the container group. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ +export interface ContainerGroupIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: string; + userAssignedIdentities?: { [propertyName: string]: ContainerGroupIdentityUserAssignedIdentitiesValue }; +} + /** * @class * Initializes a new instance of the ImageRegistryCredential class. @@ -474,8 +514,8 @@ export interface Port { * IP address for the container group. * * @member {array} ports The list of ports exposed on the container group. - * @member {string} type Specifies if the IP is exposed to the public internet. - * Possible values include: 'Public', 'Private' + * @member {string} type Specifies if the IP is exposed to the public internet + * or private VNET. Possible values include: 'Public', 'Private' * @member {string} [ip] The IP exposed to the public internet. * @member {string} [dnsNameLabel] The Dns name label for the IP. * @member {string} [fqdn] The FQDN for the IP. @@ -579,6 +619,23 @@ export interface Resource extends BaseResource { * @constructor * A container group. * + * @member {object} [identity] The identity of the container group, if + * configured. + * @member {string} [identity.principalId] The principal id of the container + * group identity. This property will only be provided for a system assigned + * identity. + * @member {string} [identity.tenantId] The tenant id associated with the + * container group. This property will only be provided for a system assigned + * identity. + * @member {string} [identity.type] The type of identity used for the container + * group. The type 'SystemAssigned, UserAssigned' includes both an implicitly + * created identity and a set of user assigned identities. The type 'None' will + * remove any identities from the container group. Possible values include: + * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the container group. The user identity dictionary + * key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {string} [provisioningState] The provisioning state of the container * group. This only appears in the response. * @member {array} containers The containers within the container group. @@ -594,7 +651,8 @@ export interface Resource extends BaseResource { * @member {array} [ipAddress.ports] The list of ports exposed on the container * group. * @member {string} [ipAddress.type] Specifies if the IP is exposed to the - * public internet. Possible values include: 'Public', 'Private' + * public internet or private VNET. Possible values include: 'Public', + * 'Private' * @member {string} [ipAddress.ip] The IP exposed to the public internet. * @member {string} [ipAddress.dnsNameLabel] The Dns name label for the IP. * @member {string} [ipAddress.fqdn] The FQDN for the IP. @@ -624,6 +682,7 @@ export interface Resource extends BaseResource { * @member {string} [networkProfile.id] The identifier for a network profile. */ export interface ContainerGroup extends Resource { + identity?: ContainerGroupIdentity; readonly provisioningState?: string; containers: Container[]; imageRegistryCredentials?: ImageRegistryCredential[]; diff --git a/lib/services/containerinstanceManagement/lib/models/index.js b/lib/services/containerinstanceManagement/lib/models/index.js index efec5e2787..71ba374674 100644 --- a/lib/services/containerinstanceManagement/lib/models/index.js +++ b/lib/services/containerinstanceManagement/lib/models/index.js @@ -34,6 +34,8 @@ exports.Container = require('./container'); exports.AzureFileVolume = require('./azureFileVolume'); exports.GitRepoVolume = require('./gitRepoVolume'); exports.Volume = require('./volume'); +exports.ContainerGroupIdentityUserAssignedIdentitiesValue = require('./containerGroupIdentityUserAssignedIdentitiesValue'); +exports.ContainerGroupIdentity = require('./containerGroupIdentity'); exports.ImageRegistryCredential = require('./imageRegistryCredential'); exports.Port = require('./port'); exports.IpAddress = require('./ipAddress'); diff --git a/lib/services/containerinstanceManagement/lib/models/ipAddress.js b/lib/services/containerinstanceManagement/lib/models/ipAddress.js index 46427416fc..0ab73610e7 100644 --- a/lib/services/containerinstanceManagement/lib/models/ipAddress.js +++ b/lib/services/containerinstanceManagement/lib/models/ipAddress.js @@ -19,7 +19,7 @@ class IpAddress { * Create a IpAddress. * @member {array} ports The list of ports exposed on the container group. * @member {string} type Specifies if the IP is exposed to the public - * internet. Possible values include: 'Public', 'Private' + * internet or private VNET. Possible values include: 'Public', 'Private' * @member {string} [ip] The IP exposed to the public internet. * @member {string} [dnsNameLabel] The Dns name label for the IP. * @member {string} [fqdn] The FQDN for the IP. diff --git a/lib/services/containerinstanceManagement/lib/operations/containerGroups.js b/lib/services/containerinstanceManagement/lib/operations/containerGroups.js index 14d2f60022..6c7cfa4b58 100644 --- a/lib/services/containerinstanceManagement/lib/operations/containerGroups.js +++ b/lib/services/containerinstanceManagement/lib/operations/containerGroups.js @@ -462,6 +462,21 @@ function _get(resourceGroupName, containerGroupName, options, callback) { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -482,7 +497,8 @@ function _get(resourceGroupName, containerGroupName, options, callback) { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -1124,6 +1140,21 @@ function _stop(resourceGroupName, containerGroupName, options, callback) { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -1144,7 +1175,8 @@ function _stop(resourceGroupName, containerGroupName, options, callback) { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -2071,6 +2103,21 @@ class ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -2091,7 +2138,8 @@ class ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -2172,6 +2220,21 @@ class ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -2192,7 +2255,8 @@ class ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -2675,6 +2739,21 @@ class ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -2695,7 +2774,8 @@ class ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -2776,6 +2856,21 @@ class ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -2796,7 +2891,8 @@ class ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. diff --git a/lib/services/containerinstanceManagement/lib/operations/index.d.ts b/lib/services/containerinstanceManagement/lib/operations/index.d.ts index 4ac8cb838b..875a4832d4 100644 --- a/lib/services/containerinstanceManagement/lib/operations/index.d.ts +++ b/lib/services/containerinstanceManagement/lib/operations/index.d.ts @@ -232,6 +232,21 @@ export interface ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -252,7 +267,8 @@ export interface ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -321,6 +337,21 @@ export interface ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -341,7 +372,8 @@ export interface ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -701,6 +733,21 @@ export interface ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -721,7 +768,8 @@ export interface ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -790,6 +838,21 @@ export interface ContainerGroups { * @param {object} containerGroup The properties of the container group to be * created or updated. * + * @param {object} [containerGroup.identity] The identity of the container + * group, if configured. + * + * @param {string} [containerGroup.identity.type] The type of identity used for + * the container group. The type 'SystemAssigned, UserAssigned' includes both + * an implicitly created identity and a set of user assigned identities. The + * type 'None' will remove any identities from the container group. Possible + * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + * + * @param {object} [containerGroup.identity.userAssignedIdentities] The list of + * user identities associated with the container group. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * * @param {array} containerGroup.containers The containers within the container * group. * @@ -810,7 +873,8 @@ export interface ContainerGroups { * the container group. * * @param {string} containerGroup.ipAddress.type Specifies if the IP is exposed - * to the public internet. Possible values include: 'Public', 'Private' + * to the public internet or private VNET. Possible values include: 'Public', + * 'Private' * * @param {string} [containerGroup.ipAddress.ip] The IP exposed to the public * internet. @@ -1392,3 +1456,82 @@ export interface ContainerOperations { executeCommand(resourceGroupName: string, containerGroupName: string, containerName: string, containerExecRequest: models.ContainerExecRequest, callback: ServiceCallback): void; executeCommand(resourceGroupName: string, containerGroupName: string, containerName: string, containerExecRequest: models.ContainerExecRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } + +/** + * @class + * ServiceAssociationLink + * __NOTE__: An instance of this class is automatically created for an + * instance of the ContainerInstanceManagementClient. + */ +export interface ServiceAssociationLink { + + + /** + * @summary Delete the container instance service association link for the + * subnet. + * + * Delete the container instance service association link for the subnet. This + * operation unblocks user from deleting subnet. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkName The name of the virtual network. + * + * @param {string} subnetName The name of the subnet. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Delete the container instance service association link for the + * subnet. + * + * Delete the container instance service association link for the subnet. This + * operation unblocks user from deleting subnet. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkName The name of the virtual network. + * + * @param {string} subnetName The name of the subnet. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, virtualNetworkName: string, subnetName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/containerinstanceManagement/lib/operations/index.js b/lib/services/containerinstanceManagement/lib/operations/index.js index c8c6b7e67a..3dd698a650 100644 --- a/lib/services/containerinstanceManagement/lib/operations/index.js +++ b/lib/services/containerinstanceManagement/lib/operations/index.js @@ -18,3 +18,4 @@ exports.ContainerGroups = require('./containerGroups'); exports.Operations = require('./operations'); exports.ContainerGroupUsage = require('./containerGroupUsage'); exports.ContainerOperations = require('./containerOperations'); +exports.ServiceAssociationLink = require('./serviceAssociationLink'); diff --git a/lib/services/containerinstanceManagement/lib/operations/serviceAssociationLink.js b/lib/services/containerinstanceManagement/lib/operations/serviceAssociationLink.js new file mode 100644 index 0000000000..22be6dd613 --- /dev/null +++ b/lib/services/containerinstanceManagement/lib/operations/serviceAssociationLink.js @@ -0,0 +1,264 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * @summary Delete the container instance service association link for the + * subnet. + * + * Delete the container instance service association link for the subnet. This + * operation unblocks user from deleting subnet. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkName The name of the virtual network. + * + * @param {string} subnetName The name of the subnet. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, virtualNetworkName, subnetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualNetworkName === null || virtualNetworkName === undefined || typeof virtualNetworkName.valueOf() !== 'string') { + throw new Error('virtualNetworkName cannot be null or undefined and it must be of type string.'); + } + if (subnetName === null || subnetName === undefined || typeof subnetName.valueOf() !== 'string') { + throw new Error('subnetName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualNetworkName}', encodeURIComponent(virtualNetworkName)); + requestUrl = requestUrl.replace('{subnetName}', encodeURIComponent(subnetName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ServiceAssociationLink. */ +class ServiceAssociationLink { + /** + * Create a ServiceAssociationLink. + * @param {ContainerInstanceManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._deleteMethod = _deleteMethod; + } + + /** + * @summary Delete the container instance service association link for the + * subnet. + * + * Delete the container instance service association link for the subnet. This + * operation unblocks user from deleting subnet. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkName The name of the virtual network. + * + * @param {string} subnetName The name of the subnet. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, virtualNetworkName, subnetName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, virtualNetworkName, subnetName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete the container instance service association link for the + * subnet. + * + * Delete the container instance service association link for the subnet. This + * operation unblocks user from deleting subnet. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkName The name of the virtual network. + * + * @param {string} subnetName The name of the subnet. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, virtualNetworkName, subnetName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, virtualNetworkName, subnetName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, virtualNetworkName, subnetName, options, optionalCallback); + } + } + +} + +module.exports = ServiceAssociationLink; From c6ec2d1b77408b104f97500b009292fc5e726f12 Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Tue, 2 Oct 2018 16:00:07 -0700 Subject: [PATCH 2/3] Regenerate azure-arm-containerinstance --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72cb59a8ce..8bcfac7f8a 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "colors": "1.1.2", "fs-extra": "^5.0.0", "glob": "^7.1.1", - "gulp": "^3.9.0", + "gulp": "^3.9.1", "gulp-exec": "2.1.2", "jshint": "^2.9.5", "json-stable-stringify": "^1.0.1", From 5854cde7c70ce2c52b7adbf22f1ea49ed918a1d9 Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik Date: Wed, 3 Oct 2018 08:44:08 -0700 Subject: [PATCH 3/3] Bump containerinstance SDK version to 5.1.0 --- lib/services/containerinstanceManagement/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/containerinstanceManagement/package.json b/lib/services/containerinstanceManagement/package.json index 1090914a5a..03020e1e5f 100644 --- a/lib/services/containerinstanceManagement/package.json +++ b/lib/services/containerinstanceManagement/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-containerinstance", "author": "Microsoft Corporation", "description": "ContainerInstanceManagementClient Library with typescript type definitions for node", - "version": "5.0.0", + "version": "5.1.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5"