diff --git a/lib/services/containerservicesManagement/lib/models/index.d.ts b/lib/services/containerservicesManagement/lib/models/index.d.ts index 261e8ebc0a..c4c8aa7670 100644 --- a/lib/services/containerservicesManagement/lib/models/index.d.ts +++ b/lib/services/containerservicesManagement/lib/models/index.d.ts @@ -553,6 +553,22 @@ export interface TagsObject { tags?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the ManagedClusterServicePrincipalProfile class. + * @constructor + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + * + * @member {string} clientId The ID for the service principal. + * @member {string} [secret] The secret password associated with the service + * principal in plain text. + */ +export interface ManagedClusterServicePrincipalProfile { + clientId: string; + secret?: string; +} + /** * @class * Initializes a new instance of the ManagedClusterAgentPoolProfile class. @@ -737,19 +753,10 @@ export interface ManagedClusterAADProfile { * used to authenticate with Linux-based VMs. Only expect one key specified. * @member {object} [servicePrincipalProfile] Information about a service * principal identity for the cluster to use for manipulating Azure APIs. - * Either secret or keyVaultSecretRef must be specified. * @member {string} [servicePrincipalProfile.clientId] The ID for the service * principal. * @member {string} [servicePrincipalProfile.secret] The secret password * associated with the service principal in plain text. - * @member {object} [servicePrincipalProfile.keyVaultSecretRef] Reference to a - * secret stored in Azure Key Vault. - * @member {string} [servicePrincipalProfile.keyVaultSecretRef.vaultID] Key - * vault identifier. - * @member {string} [servicePrincipalProfile.keyVaultSecretRef.secretName] The - * secret name. - * @member {string} [servicePrincipalProfile.keyVaultSecretRef.version] The - * secret version. * @member {object} [addonProfiles] Profile of managed cluster add-on. * @member {string} [nodeResourceGroup] Name of the resource group containing * agent pool nodes. @@ -788,7 +795,7 @@ export interface ManagedCluster extends Resource { readonly fqdn?: string; agentPoolProfiles?: ManagedClusterAgentPoolProfile[]; linuxProfile?: ContainerServiceLinuxProfile; - servicePrincipalProfile?: ContainerServiceServicePrincipalProfile; + servicePrincipalProfile?: ManagedClusterServicePrincipalProfile; addonProfiles?: { [propertyName: string]: ManagedClusterAddonProfile }; readonly nodeResourceGroup?: string; enableRBAC?: boolean; diff --git a/lib/services/containerservicesManagement/lib/models/index.js b/lib/services/containerservicesManagement/lib/models/index.js index 626ddeab58..9834540087 100644 --- a/lib/services/containerservicesManagement/lib/models/index.js +++ b/lib/services/containerservicesManagement/lib/models/index.js @@ -34,6 +34,7 @@ exports.ContainerServiceDiagnosticsProfile = require('./containerServiceDiagnost exports.ContainerService = require('./containerService'); exports.OperationValue = require('./operationValue'); exports.TagsObject = require('./tagsObject'); +exports.ManagedClusterServicePrincipalProfile = require('./managedClusterServicePrincipalProfile'); exports.ManagedClusterAgentPoolProfile = require('./managedClusterAgentPoolProfile'); exports.ContainerServiceNetworkProfile = require('./containerServiceNetworkProfile'); exports.ManagedClusterAddonProfile = require('./managedClusterAddonProfile'); diff --git a/lib/services/containerservicesManagement/lib/models/managedCluster.js b/lib/services/containerservicesManagement/lib/models/managedCluster.js index 3cf2f5df4c..7d0c528534 100644 --- a/lib/services/containerservicesManagement/lib/models/managedCluster.js +++ b/lib/services/containerservicesManagement/lib/models/managedCluster.js @@ -38,19 +38,10 @@ class ManagedCluster extends models['Resource'] { * used to authenticate with Linux-based VMs. Only expect one key specified. * @member {object} [servicePrincipalProfile] Information about a service * principal identity for the cluster to use for manipulating Azure APIs. - * Either secret or keyVaultSecretRef must be specified. * @member {string} [servicePrincipalProfile.clientId] The ID for the service * principal. * @member {string} [servicePrincipalProfile.secret] The secret password * associated with the service principal in plain text. - * @member {object} [servicePrincipalProfile.keyVaultSecretRef] Reference to - * a secret stored in Azure Key Vault. - * @member {string} [servicePrincipalProfile.keyVaultSecretRef.vaultID] Key - * vault identifier. - * @member {string} [servicePrincipalProfile.keyVaultSecretRef.secretName] - * The secret name. - * @member {string} [servicePrincipalProfile.keyVaultSecretRef.version] The - * secret version. * @member {object} [addonProfiles] Profile of managed cluster add-on. * @member {string} [nodeResourceGroup] Name of the resource group containing * agent pool nodes. @@ -203,7 +194,7 @@ class ManagedCluster extends models['Resource'] { serializedName: 'properties.servicePrincipalProfile', type: { name: 'Composite', - className: 'ContainerServiceServicePrincipalProfile' + className: 'ManagedClusterServicePrincipalProfile' } }, addonProfiles: { diff --git a/lib/services/containerservicesManagement/lib/models/managedClusterServicePrincipalProfile.js b/lib/services/containerservicesManagement/lib/models/managedClusterServicePrincipalProfile.js new file mode 100644 index 0000000000..f9980faee0 --- /dev/null +++ b/lib/services/containerservicesManagement/lib/models/managedClusterServicePrincipalProfile.js @@ -0,0 +1,62 @@ +/* + * 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'; + +/** + * Information about a service principal identity for the cluster to use for + * manipulating Azure APIs. + * + */ +class ManagedClusterServicePrincipalProfile { + /** + * Create a ManagedClusterServicePrincipalProfile. + * @member {string} clientId The ID for the service principal. + * @member {string} [secret] The secret password associated with the service + * principal in plain text. + */ + constructor() { + } + + /** + * Defines the metadata of ManagedClusterServicePrincipalProfile + * + * @returns {object} metadata of ManagedClusterServicePrincipalProfile + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedClusterServicePrincipalProfile', + type: { + name: 'Composite', + className: 'ManagedClusterServicePrincipalProfile', + modelProperties: { + clientId: { + required: true, + serializedName: 'clientId', + type: { + name: 'String' + } + }, + secret: { + required: false, + serializedName: 'secret', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ManagedClusterServicePrincipalProfile; diff --git a/lib/services/containerservicesManagement/lib/operations/index.d.ts b/lib/services/containerservicesManagement/lib/operations/index.d.ts index 83e805f07c..ed4d5880bb 100644 --- a/lib/services/containerservicesManagement/lib/operations/index.d.ts +++ b/lib/services/containerservicesManagement/lib/operations/index.d.ts @@ -1772,7 +1772,7 @@ export interface ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -1780,20 +1780,6 @@ export interface ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -1894,7 +1880,7 @@ export interface ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -1902,20 +1888,6 @@ export interface ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -2170,7 +2142,7 @@ export interface ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -2178,20 +2150,6 @@ export interface ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -2292,7 +2250,7 @@ export interface ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -2300,20 +2258,6 @@ export interface ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * diff --git a/lib/services/containerservicesManagement/lib/operations/managedClusters.js b/lib/services/containerservicesManagement/lib/operations/managedClusters.js index ec3bee731f..f62f060342 100644 --- a/lib/services/containerservicesManagement/lib/operations/managedClusters.js +++ b/lib/services/containerservicesManagement/lib/operations/managedClusters.js @@ -775,7 +775,7 @@ function _get(resourceGroupName, resourceName, options, callback) { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -783,20 +783,6 @@ function _get(resourceGroupName, resourceName, options, callback) { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -1104,7 +1090,7 @@ function _deleteMethod(resourceGroupName, resourceName, options, callback) { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -1112,20 +1098,6 @@ function _deleteMethod(resourceGroupName, resourceName, options, callback) { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -2423,7 +2395,7 @@ class ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -2431,20 +2403,6 @@ class ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -2557,7 +2515,7 @@ class ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -2565,20 +2523,6 @@ class ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -2902,7 +2846,7 @@ class ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -2910,20 +2854,6 @@ class ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. * @@ -3036,7 +2966,7 @@ class ManagedClusters { * * @param {object} [parameters.servicePrincipalProfile] Information about a * service principal identity for the cluster to use for manipulating Azure - * APIs. Either secret or keyVaultSecretRef must be specified. + * APIs. * * @param {string} parameters.servicePrincipalProfile.clientId The ID for the * service principal. @@ -3044,20 +2974,6 @@ class ManagedClusters { * @param {string} [parameters.servicePrincipalProfile.secret] The secret * password associated with the service principal in plain text. * - * @param {object} [parameters.servicePrincipalProfile.keyVaultSecretRef] - * Reference to a secret stored in Azure Key Vault. - * - * @param {string} parameters.servicePrincipalProfile.keyVaultSecretRef.vaultID - * Key vault identifier. - * - * @param {string} - * parameters.servicePrincipalProfile.keyVaultSecretRef.secretName The secret - * name. - * - * @param {string} - * [parameters.servicePrincipalProfile.keyVaultSecretRef.version] The secret - * version. - * * @param {object} [parameters.addonProfiles] Profile of managed cluster * add-on. *