diff --git a/lib/services/computeManagement2/lib/computeManagementClient.js b/lib/services/computeManagement2/lib/computeManagementClient.js index e83149fb33..3f527634dc 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -4496,6 +4496,46 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function * @param {string} [parameters.storageProfile.oSDisk.operatingSystemType] * Gets or sets the Operating System type. * + * @param {DiskEncryptionSettings} + * [parameters.storageProfile.oSDisk.encryptionSettings] Gets or sets the + * disk encryption settings. + * + * @param {KeyVaultSecretReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey] + * Gets or sets the disk encryption key which is a KeyVault Secret. + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.secretUrl] + * Gets or sets the URL referencing a secret in a Key Vault. + * + * @param {SourceVaultReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault] + * Gets or sets the Relative URL of the Key Vault containing the secret. + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault.referenceUri] + * Gets or sets the relative URL in the previous Service Management API's + * namespace. For Example: + * /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... + * + * @param {KeyVaultKeyReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey] + * Gets or sets the key encryption key which is KeyVault Key. + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.keyUrl] + * Gets or sets the URL referencing a key in a Key Vault. + * + * @param {SourceVaultReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault] + * Gets or sets the Relative URL of the Key Vault containing the key + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault.referenceUri] + * Gets or sets the relative URL in the previous Service Management API's + * namespace. For Example: + * /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... + * * @param {string} [parameters.storageProfile.oSDisk.name] Gets or sets the * disk name. * @@ -4729,6 +4769,25 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function if (parameters.storageProfile.oSDisk.createOption === null || parameters.storageProfile.oSDisk.createOption === undefined) { return callback(new Error('parameters.storageProfile.oSDisk.createOption cannot be null.')); } + if (parameters.storageProfile.oSDisk.encryptionSettings !== null && parameters.storageProfile.oSDisk.encryptionSettings !== undefined) { + if (parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey === null || parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey === undefined) { + return callback(new Error('parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey cannot be null.')); + } + if (parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.secretUrl === null || parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.secretUrl === undefined) { + return callback(new Error('parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.secretUrl cannot be null.')); + } + if (parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault === null || parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault === undefined) { + return callback(new Error('parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault cannot be null.')); + } + if (parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey !== null && parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey !== undefined) { + if (parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.keyUrl === null || parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.keyUrl === undefined) { + return callback(new Error('parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.keyUrl cannot be null.')); + } + if (parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault === null || parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault === undefined) { + return callback(new Error('parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault cannot be null.')); + } + } + } if (parameters.storageProfile.oSDisk.name === null || parameters.storageProfile.oSDisk.name === undefined) { return callback(new Error('parameters.storageProfile.oSDisk.name cannot be null.')); } @@ -4854,6 +4913,37 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskValue['osType'] = parameters.storageProfile.oSDisk.operatingSystemType; } + if (parameters.storageProfile.oSDisk.encryptionSettings !== null && parameters.storageProfile.oSDisk.encryptionSettings !== undefined) { + var encryptionSettingsValue = {}; + osDiskValue['encryptionSettings'] = encryptionSettingsValue; + + var diskEncryptionKeyValue = {}; + encryptionSettingsValue['diskEncryptionKey'] = diskEncryptionKeyValue; + + diskEncryptionKeyValue['secretUrl'] = parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.secretUrl; + + var sourceVaultValue = {}; + diskEncryptionKeyValue['sourceVault'] = sourceVaultValue; + + if (parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault.referenceUri !== null && parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault.referenceUri !== undefined) { + sourceVaultValue['id'] = parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault.referenceUri; + } + + if (parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey !== null && parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey !== undefined) { + var keyEncryptionKeyValue = {}; + encryptionSettingsValue['keyEncryptionKey'] = keyEncryptionKeyValue; + + keyEncryptionKeyValue['keyUrl'] = parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.keyUrl; + + var sourceVaultValue2 = {}; + keyEncryptionKeyValue['sourceVault'] = sourceVaultValue2; + + if (parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault.referenceUri !== null && parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault.referenceUri !== undefined) { + sourceVaultValue2['id'] = parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault.referenceUri; + } + } + } + osDiskValue['name'] = parameters.storageProfile.oSDisk.name; var vhdValue = {}; @@ -5050,11 +5140,11 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function secretsArray.push(vaultSecretGroupValue); if (secretsItem.sourceVault !== null && secretsItem.sourceVault !== undefined) { - var sourceVaultValue = {}; - vaultSecretGroupValue['sourceVault'] = sourceVaultValue; + var sourceVaultValue3 = {}; + vaultSecretGroupValue['sourceVault'] = sourceVaultValue3; if (secretsItem.sourceVault.referenceUri !== null && secretsItem.sourceVault.referenceUri !== undefined) { - sourceVaultValue['id'] = secretsItem.sourceVault.referenceUri; + sourceVaultValue3['id'] = secretsItem.sourceVault.referenceUri; } } @@ -5689,6 +5779,60 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskInstance.operatingSystemType = osTypeInstance; } + var encryptionSettingsValue2 = osDiskValue2['encryptionSettings']; + if (encryptionSettingsValue2 !== null && encryptionSettingsValue2 !== undefined) { + var encryptionSettingsInstance = {}; + osDiskInstance.encryptionSettings = encryptionSettingsInstance; + + var diskEncryptionKeyValue2 = encryptionSettingsValue2['diskEncryptionKey']; + if (diskEncryptionKeyValue2 !== null && diskEncryptionKeyValue2 !== undefined) { + var diskEncryptionKeyInstance = {}; + encryptionSettingsInstance.diskEncryptionKey = diskEncryptionKeyInstance; + + var secretUrlValue = diskEncryptionKeyValue2['secretUrl']; + if (secretUrlValue !== null && secretUrlValue !== undefined) { + var secretUrlInstance = secretUrlValue; + diskEncryptionKeyInstance.secretUrl = secretUrlInstance; + } + + var sourceVaultValue4 = diskEncryptionKeyValue2['sourceVault']; + if (sourceVaultValue4 !== null && sourceVaultValue4 !== undefined) { + var sourceVaultInstance = {}; + diskEncryptionKeyInstance.sourceVault = sourceVaultInstance; + + var idValue = sourceVaultValue4['id']; + if (idValue !== null && idValue !== undefined) { + var idInstance = idValue; + sourceVaultInstance.referenceUri = idInstance; + } + } + } + + var keyEncryptionKeyValue2 = encryptionSettingsValue2['keyEncryptionKey']; + if (keyEncryptionKeyValue2 !== null && keyEncryptionKeyValue2 !== undefined) { + var keyEncryptionKeyInstance = {}; + encryptionSettingsInstance.keyEncryptionKey = keyEncryptionKeyInstance; + + var keyUrlValue = keyEncryptionKeyValue2['keyUrl']; + if (keyUrlValue !== null && keyUrlValue !== undefined) { + var keyUrlInstance = keyUrlValue; + keyEncryptionKeyInstance.keyUrl = keyUrlInstance; + } + + var sourceVaultValue5 = keyEncryptionKeyValue2['sourceVault']; + if (sourceVaultValue5 !== null && sourceVaultValue5 !== undefined) { + var sourceVaultInstance2 = {}; + keyEncryptionKeyInstance.sourceVault = sourceVaultInstance2; + + var idValue2 = sourceVaultValue5['id']; + if (idValue2 !== null && idValue2 !== undefined) { + var idInstance2 = idValue2; + sourceVaultInstance2.referenceUri = idInstance2; + } + } + } + } + var nameValue2 = osDiskValue2['name']; if (nameValue2 !== null && nameValue2 !== undefined) { var nameInstance2 = nameValue2; @@ -5961,15 +6105,15 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var vaultSecretGroupInstance = { vaultCertificates: [] }; osProfileInstance.secrets.push(vaultSecretGroupInstance); - var sourceVaultValue2 = secretsValue['sourceVault']; - if (sourceVaultValue2 !== null && sourceVaultValue2 !== undefined) { - var sourceVaultInstance = {}; - vaultSecretGroupInstance.sourceVault = sourceVaultInstance; + var sourceVaultValue6 = secretsValue['sourceVault']; + if (sourceVaultValue6 !== null && sourceVaultValue6 !== undefined) { + var sourceVaultInstance3 = {}; + vaultSecretGroupInstance.sourceVault = sourceVaultInstance3; - var idValue = sourceVaultValue2['id']; - if (idValue !== null && idValue !== undefined) { - var idInstance = idValue; - sourceVaultInstance.referenceUri = idInstance; + var idValue3 = sourceVaultValue6['id']; + if (idValue3 !== null && idValue3 !== undefined) { + var idInstance3 = idValue3; + sourceVaultInstance3.referenceUri = idInstance3; } } @@ -6018,10 +6162,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue2 = networkInterfacesValue['id']; - if (idValue2 !== null && idValue2 !== undefined) { - var idInstance2 = idValue2; - networkInterfaceReferenceJsonInstance.referenceUri = idInstance2; + var idValue4 = networkInterfacesValue['id']; + if (idValue4 !== null && idValue4 !== undefined) { + var idInstance4 = idValue4; + networkInterfaceReferenceJsonInstance.referenceUri = idInstance4; } } } @@ -6056,10 +6200,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var availabilitySetInstance = {}; virtualMachineInstance.availabilitySetReference = availabilitySetInstance; - var idValue3 = availabilitySetValue2['id']; - if (idValue3 !== null && idValue3 !== undefined) { - var idInstance3 = idValue3; - availabilitySetInstance.referenceUri = idInstance3; + var idValue5 = availabilitySetValue2['id']; + if (idValue5 !== null && idValue5 !== undefined) { + var idInstance5 = idValue5; + availabilitySetInstance.referenceUri = idInstance5; } } @@ -6573,10 +6717,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue4 = resourcesValue['id']; - if (idValue4 !== null && idValue4 !== undefined) { - var idInstance4 = idValue4; - virtualMachineExtensionJsonInstance.id = idInstance4; + var idValue6 = resourcesValue['id']; + if (idValue6 !== null && idValue6 !== undefined) { + var idInstance6 = idValue6; + virtualMachineExtensionJsonInstance.id = idInstance6; } var nameValue7 = resourcesValue['name']; @@ -6608,10 +6752,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue5 = responseDoc['id']; - if (idValue5 !== null && idValue5 !== undefined) { - var idInstance5 = idValue5; - virtualMachineInstance.id = idInstance5; + var idValue7 = responseDoc['id']; + if (idValue7 !== null && idValue7 !== undefined) { + var idInstance7 = idValue7; + virtualMachineInstance.id = idInstance7; } var nameValue8 = responseDoc['name']; @@ -6826,10 +6970,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function if (statusCode === 409) { result.status = OperationStatus.Failed; } - if (statusCode === 200) { + if (statusCode === 204) { result.status = OperationStatus.Succeeded; } - if (statusCode === 204) { + if (statusCode === 200) { result.status = OperationStatus.Succeeded; } @@ -7216,6 +7360,46 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function * @param {string} [parameters.storageProfile.oSDisk.operatingSystemType] * Gets or sets the Operating System type. * + * @param {DiskEncryptionSettings} + * [parameters.storageProfile.oSDisk.encryptionSettings] Gets or sets the + * disk encryption settings. + * + * @param {KeyVaultSecretReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey] + * Gets or sets the disk encryption key which is a KeyVault Secret. + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.secretUrl] + * Gets or sets the URL referencing a secret in a Key Vault. + * + * @param {SourceVaultReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault] + * Gets or sets the Relative URL of the Key Vault containing the secret. + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.diskEncryptionKey.sourceVault.referenceUri] + * Gets or sets the relative URL in the previous Service Management API's + * namespace. For Example: + * /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... + * + * @param {KeyVaultKeyReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey] + * Gets or sets the key encryption key which is KeyVault Key. + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.keyUrl] + * Gets or sets the URL referencing a key in a Key Vault. + * + * @param {SourceVaultReference} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault] + * Gets or sets the Relative URL of the Key Vault containing the key + * + * @param {string} + * [parameters.storageProfile.oSDisk.encryptionSettings.keyEncryptionKey.sourceVault.referenceUri] + * Gets or sets the relative URL in the previous Service Management API's + * namespace. For Example: + * /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... + * * @param {string} [parameters.storageProfile.oSDisk.name] Gets or sets the * disk name. * @@ -7817,6 +8001,60 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskInstance.operatingSystemType = osTypeInstance; } + var encryptionSettingsValue = osDiskValue['encryptionSettings']; + if (encryptionSettingsValue !== null && encryptionSettingsValue !== undefined) { + var encryptionSettingsInstance = {}; + osDiskInstance.encryptionSettings = encryptionSettingsInstance; + + var diskEncryptionKeyValue = encryptionSettingsValue['diskEncryptionKey']; + if (diskEncryptionKeyValue !== null && diskEncryptionKeyValue !== undefined) { + var diskEncryptionKeyInstance = {}; + encryptionSettingsInstance.diskEncryptionKey = diskEncryptionKeyInstance; + + var secretUrlValue = diskEncryptionKeyValue['secretUrl']; + if (secretUrlValue !== null && secretUrlValue !== undefined) { + var secretUrlInstance = secretUrlValue; + diskEncryptionKeyInstance.secretUrl = secretUrlInstance; + } + + var sourceVaultValue = diskEncryptionKeyValue['sourceVault']; + if (sourceVaultValue !== null && sourceVaultValue !== undefined) { + var sourceVaultInstance = {}; + diskEncryptionKeyInstance.sourceVault = sourceVaultInstance; + + var idValue = sourceVaultValue['id']; + if (idValue !== null && idValue !== undefined) { + var idInstance = idValue; + sourceVaultInstance.referenceUri = idInstance; + } + } + } + + var keyEncryptionKeyValue = encryptionSettingsValue['keyEncryptionKey']; + if (keyEncryptionKeyValue !== null && keyEncryptionKeyValue !== undefined) { + var keyEncryptionKeyInstance = {}; + encryptionSettingsInstance.keyEncryptionKey = keyEncryptionKeyInstance; + + var keyUrlValue = keyEncryptionKeyValue['keyUrl']; + if (keyUrlValue !== null && keyUrlValue !== undefined) { + var keyUrlInstance = keyUrlValue; + keyEncryptionKeyInstance.keyUrl = keyUrlInstance; + } + + var sourceVaultValue2 = keyEncryptionKeyValue['sourceVault']; + if (sourceVaultValue2 !== null && sourceVaultValue2 !== undefined) { + var sourceVaultInstance2 = {}; + keyEncryptionKeyInstance.sourceVault = sourceVaultInstance2; + + var idValue2 = sourceVaultValue2['id']; + if (idValue2 !== null && idValue2 !== undefined) { + var idInstance2 = idValue2; + sourceVaultInstance2.referenceUri = idInstance2; + } + } + } + } + var nameValue2 = osDiskValue['name']; if (nameValue2 !== null && nameValue2 !== undefined) { var nameInstance2 = nameValue2; @@ -8089,15 +8327,15 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var vaultSecretGroupInstance = { vaultCertificates: [] }; osProfileInstance.secrets.push(vaultSecretGroupInstance); - var sourceVaultValue = secretsValue['sourceVault']; - if (sourceVaultValue !== null && sourceVaultValue !== undefined) { - var sourceVaultInstance = {}; - vaultSecretGroupInstance.sourceVault = sourceVaultInstance; + var sourceVaultValue3 = secretsValue['sourceVault']; + if (sourceVaultValue3 !== null && sourceVaultValue3 !== undefined) { + var sourceVaultInstance3 = {}; + vaultSecretGroupInstance.sourceVault = sourceVaultInstance3; - var idValue = sourceVaultValue['id']; - if (idValue !== null && idValue !== undefined) { - var idInstance = idValue; - sourceVaultInstance.referenceUri = idInstance; + var idValue3 = sourceVaultValue3['id']; + if (idValue3 !== null && idValue3 !== undefined) { + var idInstance3 = idValue3; + sourceVaultInstance3.referenceUri = idInstance3; } } @@ -8146,10 +8384,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue2 = networkInterfacesValue['id']; - if (idValue2 !== null && idValue2 !== undefined) { - var idInstance2 = idValue2; - networkInterfaceReferenceJsonInstance.referenceUri = idInstance2; + var idValue4 = networkInterfacesValue['id']; + if (idValue4 !== null && idValue4 !== undefined) { + var idInstance4 = idValue4; + networkInterfaceReferenceJsonInstance.referenceUri = idInstance4; } } } @@ -8184,10 +8422,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var availabilitySetInstance = {}; virtualMachineInstance.availabilitySetReference = availabilitySetInstance; - var idValue3 = availabilitySetValue['id']; - if (idValue3 !== null && idValue3 !== undefined) { - var idInstance3 = idValue3; - availabilitySetInstance.referenceUri = idInstance3; + var idValue5 = availabilitySetValue['id']; + if (idValue5 !== null && idValue5 !== undefined) { + var idInstance5 = idValue5; + availabilitySetInstance.referenceUri = idInstance5; } } @@ -8701,10 +8939,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue4 = resourcesValue['id']; - if (idValue4 !== null && idValue4 !== undefined) { - var idInstance4 = idValue4; - virtualMachineExtensionJsonInstance.id = idInstance4; + var idValue6 = resourcesValue['id']; + if (idValue6 !== null && idValue6 !== undefined) { + var idInstance6 = idValue6; + virtualMachineExtensionJsonInstance.id = idInstance6; } var nameValue7 = resourcesValue['name']; @@ -8736,10 +8974,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue5 = responseDoc['id']; - if (idValue5 !== null && idValue5 !== undefined) { - var idInstance5 = idValue5; - virtualMachineInstance.id = idInstance5; + var idValue7 = responseDoc['id']; + if (idValue7 !== null && idValue7 !== undefined) { + var idInstance7 = idValue7; + virtualMachineInstance.id = idInstance7; } var nameValue8 = responseDoc['name']; @@ -8959,6 +9197,60 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskInstance.operatingSystemType = osTypeInstance; } + var encryptionSettingsValue = osDiskValue['encryptionSettings']; + if (encryptionSettingsValue !== null && encryptionSettingsValue !== undefined) { + var encryptionSettingsInstance = {}; + osDiskInstance.encryptionSettings = encryptionSettingsInstance; + + var diskEncryptionKeyValue = encryptionSettingsValue['diskEncryptionKey']; + if (diskEncryptionKeyValue !== null && diskEncryptionKeyValue !== undefined) { + var diskEncryptionKeyInstance = {}; + encryptionSettingsInstance.diskEncryptionKey = diskEncryptionKeyInstance; + + var secretUrlValue = diskEncryptionKeyValue['secretUrl']; + if (secretUrlValue !== null && secretUrlValue !== undefined) { + var secretUrlInstance = secretUrlValue; + diskEncryptionKeyInstance.secretUrl = secretUrlInstance; + } + + var sourceVaultValue = diskEncryptionKeyValue['sourceVault']; + if (sourceVaultValue !== null && sourceVaultValue !== undefined) { + var sourceVaultInstance = {}; + diskEncryptionKeyInstance.sourceVault = sourceVaultInstance; + + var idValue = sourceVaultValue['id']; + if (idValue !== null && idValue !== undefined) { + var idInstance = idValue; + sourceVaultInstance.referenceUri = idInstance; + } + } + } + + var keyEncryptionKeyValue = encryptionSettingsValue['keyEncryptionKey']; + if (keyEncryptionKeyValue !== null && keyEncryptionKeyValue !== undefined) { + var keyEncryptionKeyInstance = {}; + encryptionSettingsInstance.keyEncryptionKey = keyEncryptionKeyInstance; + + var keyUrlValue = keyEncryptionKeyValue['keyUrl']; + if (keyUrlValue !== null && keyUrlValue !== undefined) { + var keyUrlInstance = keyUrlValue; + keyEncryptionKeyInstance.keyUrl = keyUrlInstance; + } + + var sourceVaultValue2 = keyEncryptionKeyValue['sourceVault']; + if (sourceVaultValue2 !== null && sourceVaultValue2 !== undefined) { + var sourceVaultInstance2 = {}; + keyEncryptionKeyInstance.sourceVault = sourceVaultInstance2; + + var idValue2 = sourceVaultValue2['id']; + if (idValue2 !== null && idValue2 !== undefined) { + var idInstance2 = idValue2; + sourceVaultInstance2.referenceUri = idInstance2; + } + } + } + } + var nameValue2 = osDiskValue['name']; if (nameValue2 !== null && nameValue2 !== undefined) { var nameInstance2 = nameValue2; @@ -9231,15 +9523,15 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var vaultSecretGroupInstance = { vaultCertificates: [] }; osProfileInstance.secrets.push(vaultSecretGroupInstance); - var sourceVaultValue = secretsValue['sourceVault']; - if (sourceVaultValue !== null && sourceVaultValue !== undefined) { - var sourceVaultInstance = {}; - vaultSecretGroupInstance.sourceVault = sourceVaultInstance; + var sourceVaultValue3 = secretsValue['sourceVault']; + if (sourceVaultValue3 !== null && sourceVaultValue3 !== undefined) { + var sourceVaultInstance3 = {}; + vaultSecretGroupInstance.sourceVault = sourceVaultInstance3; - var idValue = sourceVaultValue['id']; - if (idValue !== null && idValue !== undefined) { - var idInstance = idValue; - sourceVaultInstance.referenceUri = idInstance; + var idValue3 = sourceVaultValue3['id']; + if (idValue3 !== null && idValue3 !== undefined) { + var idInstance3 = idValue3; + sourceVaultInstance3.referenceUri = idInstance3; } } @@ -9288,10 +9580,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue2 = networkInterfacesValue['id']; - if (idValue2 !== null && idValue2 !== undefined) { - var idInstance2 = idValue2; - networkInterfaceReferenceJsonInstance.referenceUri = idInstance2; + var idValue4 = networkInterfacesValue['id']; + if (idValue4 !== null && idValue4 !== undefined) { + var idInstance4 = idValue4; + networkInterfaceReferenceJsonInstance.referenceUri = idInstance4; } } } @@ -9326,10 +9618,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var availabilitySetInstance = {}; virtualMachineInstance.availabilitySetReference = availabilitySetInstance; - var idValue3 = availabilitySetValue['id']; - if (idValue3 !== null && idValue3 !== undefined) { - var idInstance3 = idValue3; - availabilitySetInstance.referenceUri = idInstance3; + var idValue5 = availabilitySetValue['id']; + if (idValue5 !== null && idValue5 !== undefined) { + var idInstance5 = idValue5; + availabilitySetInstance.referenceUri = idInstance5; } } @@ -9843,10 +10135,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue4 = resourcesValue['id']; - if (idValue4 !== null && idValue4 !== undefined) { - var idInstance4 = idValue4; - virtualMachineExtensionJsonInstance.id = idInstance4; + var idValue6 = resourcesValue['id']; + if (idValue6 !== null && idValue6 !== undefined) { + var idInstance6 = idValue6; + virtualMachineExtensionJsonInstance.id = idInstance6; } var nameValue7 = resourcesValue['name']; @@ -9878,10 +10170,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue5 = responseDoc['id']; - if (idValue5 !== null && idValue5 !== undefined) { - var idInstance5 = idValue5; - virtualMachineInstance.id = idInstance5; + var idValue7 = responseDoc['id']; + if (idValue7 !== null && idValue7 !== undefined) { + var idInstance7 = idValue7; + virtualMachineInstance.id = idInstance7; } var nameValue8 = responseDoc['name']; @@ -10098,6 +10390,60 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskInstance.operatingSystemType = osTypeInstance; } + var encryptionSettingsValue = osDiskValue['encryptionSettings']; + if (encryptionSettingsValue !== null && encryptionSettingsValue !== undefined) { + var encryptionSettingsInstance = {}; + osDiskInstance.encryptionSettings = encryptionSettingsInstance; + + var diskEncryptionKeyValue = encryptionSettingsValue['diskEncryptionKey']; + if (diskEncryptionKeyValue !== null && diskEncryptionKeyValue !== undefined) { + var diskEncryptionKeyInstance = {}; + encryptionSettingsInstance.diskEncryptionKey = diskEncryptionKeyInstance; + + var secretUrlValue = diskEncryptionKeyValue['secretUrl']; + if (secretUrlValue !== null && secretUrlValue !== undefined) { + var secretUrlInstance = secretUrlValue; + diskEncryptionKeyInstance.secretUrl = secretUrlInstance; + } + + var sourceVaultValue = diskEncryptionKeyValue['sourceVault']; + if (sourceVaultValue !== null && sourceVaultValue !== undefined) { + var sourceVaultInstance = {}; + diskEncryptionKeyInstance.sourceVault = sourceVaultInstance; + + var idValue = sourceVaultValue['id']; + if (idValue !== null && idValue !== undefined) { + var idInstance = idValue; + sourceVaultInstance.referenceUri = idInstance; + } + } + } + + var keyEncryptionKeyValue = encryptionSettingsValue['keyEncryptionKey']; + if (keyEncryptionKeyValue !== null && keyEncryptionKeyValue !== undefined) { + var keyEncryptionKeyInstance = {}; + encryptionSettingsInstance.keyEncryptionKey = keyEncryptionKeyInstance; + + var keyUrlValue = keyEncryptionKeyValue['keyUrl']; + if (keyUrlValue !== null && keyUrlValue !== undefined) { + var keyUrlInstance = keyUrlValue; + keyEncryptionKeyInstance.keyUrl = keyUrlInstance; + } + + var sourceVaultValue2 = keyEncryptionKeyValue['sourceVault']; + if (sourceVaultValue2 !== null && sourceVaultValue2 !== undefined) { + var sourceVaultInstance2 = {}; + keyEncryptionKeyInstance.sourceVault = sourceVaultInstance2; + + var idValue2 = sourceVaultValue2['id']; + if (idValue2 !== null && idValue2 !== undefined) { + var idInstance2 = idValue2; + sourceVaultInstance2.referenceUri = idInstance2; + } + } + } + } + var nameValue2 = osDiskValue['name']; if (nameValue2 !== null && nameValue2 !== undefined) { var nameInstance2 = nameValue2; @@ -10370,15 +10716,15 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var vaultSecretGroupInstance = { vaultCertificates: [] }; osProfileInstance.secrets.push(vaultSecretGroupInstance); - var sourceVaultValue = secretsValue['sourceVault']; - if (sourceVaultValue !== null && sourceVaultValue !== undefined) { - var sourceVaultInstance = {}; - vaultSecretGroupInstance.sourceVault = sourceVaultInstance; + var sourceVaultValue3 = secretsValue['sourceVault']; + if (sourceVaultValue3 !== null && sourceVaultValue3 !== undefined) { + var sourceVaultInstance3 = {}; + vaultSecretGroupInstance.sourceVault = sourceVaultInstance3; - var idValue = sourceVaultValue['id']; - if (idValue !== null && idValue !== undefined) { - var idInstance = idValue; - sourceVaultInstance.referenceUri = idInstance; + var idValue3 = sourceVaultValue3['id']; + if (idValue3 !== null && idValue3 !== undefined) { + var idInstance3 = idValue3; + sourceVaultInstance3.referenceUri = idInstance3; } } @@ -10427,10 +10773,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue2 = networkInterfacesValue['id']; - if (idValue2 !== null && idValue2 !== undefined) { - var idInstance2 = idValue2; - networkInterfaceReferenceJsonInstance.referenceUri = idInstance2; + var idValue4 = networkInterfacesValue['id']; + if (idValue4 !== null && idValue4 !== undefined) { + var idInstance4 = idValue4; + networkInterfaceReferenceJsonInstance.referenceUri = idInstance4; } } } @@ -10465,10 +10811,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var availabilitySetInstance = {}; virtualMachineJsonInstance.availabilitySetReference = availabilitySetInstance; - var idValue3 = availabilitySetValue['id']; - if (idValue3 !== null && idValue3 !== undefined) { - var idInstance3 = idValue3; - availabilitySetInstance.referenceUri = idInstance3; + var idValue5 = availabilitySetValue['id']; + if (idValue5 !== null && idValue5 !== undefined) { + var idInstance5 = idValue5; + availabilitySetInstance.referenceUri = idInstance5; } } @@ -10982,10 +11328,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue4 = resourcesValue['id']; - if (idValue4 !== null && idValue4 !== undefined) { - var idInstance4 = idValue4; - virtualMachineExtensionJsonInstance.id = idInstance4; + var idValue6 = resourcesValue['id']; + if (idValue6 !== null && idValue6 !== undefined) { + var idInstance6 = idValue6; + virtualMachineExtensionJsonInstance.id = idInstance6; } var nameValue7 = resourcesValue['name']; @@ -11017,10 +11363,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue5 = valueValue['id']; - if (idValue5 !== null && idValue5 !== undefined) { - var idInstance5 = idValue5; - virtualMachineJsonInstance.id = idInstance5; + var idValue7 = valueValue['id']; + if (idValue7 !== null && idValue7 !== undefined) { + var idInstance7 = idValue7; + virtualMachineJsonInstance.id = idInstance7; } var nameValue8 = valueValue['name']; @@ -11247,6 +11593,60 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskInstance.operatingSystemType = osTypeInstance; } + var encryptionSettingsValue = osDiskValue['encryptionSettings']; + if (encryptionSettingsValue !== null && encryptionSettingsValue !== undefined) { + var encryptionSettingsInstance = {}; + osDiskInstance.encryptionSettings = encryptionSettingsInstance; + + var diskEncryptionKeyValue = encryptionSettingsValue['diskEncryptionKey']; + if (diskEncryptionKeyValue !== null && diskEncryptionKeyValue !== undefined) { + var diskEncryptionKeyInstance = {}; + encryptionSettingsInstance.diskEncryptionKey = diskEncryptionKeyInstance; + + var secretUrlValue = diskEncryptionKeyValue['secretUrl']; + if (secretUrlValue !== null && secretUrlValue !== undefined) { + var secretUrlInstance = secretUrlValue; + diskEncryptionKeyInstance.secretUrl = secretUrlInstance; + } + + var sourceVaultValue = diskEncryptionKeyValue['sourceVault']; + if (sourceVaultValue !== null && sourceVaultValue !== undefined) { + var sourceVaultInstance = {}; + diskEncryptionKeyInstance.sourceVault = sourceVaultInstance; + + var idValue = sourceVaultValue['id']; + if (idValue !== null && idValue !== undefined) { + var idInstance = idValue; + sourceVaultInstance.referenceUri = idInstance; + } + } + } + + var keyEncryptionKeyValue = encryptionSettingsValue['keyEncryptionKey']; + if (keyEncryptionKeyValue !== null && keyEncryptionKeyValue !== undefined) { + var keyEncryptionKeyInstance = {}; + encryptionSettingsInstance.keyEncryptionKey = keyEncryptionKeyInstance; + + var keyUrlValue = keyEncryptionKeyValue['keyUrl']; + if (keyUrlValue !== null && keyUrlValue !== undefined) { + var keyUrlInstance = keyUrlValue; + keyEncryptionKeyInstance.keyUrl = keyUrlInstance; + } + + var sourceVaultValue2 = keyEncryptionKeyValue['sourceVault']; + if (sourceVaultValue2 !== null && sourceVaultValue2 !== undefined) { + var sourceVaultInstance2 = {}; + keyEncryptionKeyInstance.sourceVault = sourceVaultInstance2; + + var idValue2 = sourceVaultValue2['id']; + if (idValue2 !== null && idValue2 !== undefined) { + var idInstance2 = idValue2; + sourceVaultInstance2.referenceUri = idInstance2; + } + } + } + } + var nameValue2 = osDiskValue['name']; if (nameValue2 !== null && nameValue2 !== undefined) { var nameInstance2 = nameValue2; @@ -11519,15 +11919,15 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var vaultSecretGroupInstance = { vaultCertificates: [] }; osProfileInstance.secrets.push(vaultSecretGroupInstance); - var sourceVaultValue = secretsValue['sourceVault']; - if (sourceVaultValue !== null && sourceVaultValue !== undefined) { - var sourceVaultInstance = {}; - vaultSecretGroupInstance.sourceVault = sourceVaultInstance; + var sourceVaultValue3 = secretsValue['sourceVault']; + if (sourceVaultValue3 !== null && sourceVaultValue3 !== undefined) { + var sourceVaultInstance3 = {}; + vaultSecretGroupInstance.sourceVault = sourceVaultInstance3; - var idValue = sourceVaultValue['id']; - if (idValue !== null && idValue !== undefined) { - var idInstance = idValue; - sourceVaultInstance.referenceUri = idInstance; + var idValue3 = sourceVaultValue3['id']; + if (idValue3 !== null && idValue3 !== undefined) { + var idInstance3 = idValue3; + sourceVaultInstance3.referenceUri = idInstance3; } } @@ -11576,10 +11976,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue2 = networkInterfacesValue['id']; - if (idValue2 !== null && idValue2 !== undefined) { - var idInstance2 = idValue2; - networkInterfaceReferenceJsonInstance.referenceUri = idInstance2; + var idValue4 = networkInterfacesValue['id']; + if (idValue4 !== null && idValue4 !== undefined) { + var idInstance4 = idValue4; + networkInterfaceReferenceJsonInstance.referenceUri = idInstance4; } } } @@ -11614,10 +12014,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var availabilitySetInstance = {}; virtualMachineJsonInstance.availabilitySetReference = availabilitySetInstance; - var idValue3 = availabilitySetValue['id']; - if (idValue3 !== null && idValue3 !== undefined) { - var idInstance3 = idValue3; - availabilitySetInstance.referenceUri = idInstance3; + var idValue5 = availabilitySetValue['id']; + if (idValue5 !== null && idValue5 !== undefined) { + var idInstance5 = idValue5; + availabilitySetInstance.referenceUri = idInstance5; } } @@ -12131,10 +12531,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue4 = resourcesValue['id']; - if (idValue4 !== null && idValue4 !== undefined) { - var idInstance4 = idValue4; - virtualMachineExtensionJsonInstance.id = idInstance4; + var idValue6 = resourcesValue['id']; + if (idValue6 !== null && idValue6 !== undefined) { + var idInstance6 = idValue6; + virtualMachineExtensionJsonInstance.id = idInstance6; } var nameValue7 = resourcesValue['name']; @@ -12166,10 +12566,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue5 = valueValue['id']; - if (idValue5 !== null && idValue5 !== undefined) { - var idInstance5 = idValue5; - virtualMachineJsonInstance.id = idInstance5; + var idValue7 = valueValue['id']; + if (idValue7 !== null && idValue7 !== undefined) { + var idInstance7 = idValue7; + virtualMachineJsonInstance.id = idInstance7; } var nameValue8 = valueValue['name']; @@ -12517,6 +12917,60 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function osDiskInstance.operatingSystemType = osTypeInstance; } + var encryptionSettingsValue = osDiskValue['encryptionSettings']; + if (encryptionSettingsValue !== null && encryptionSettingsValue !== undefined) { + var encryptionSettingsInstance = {}; + osDiskInstance.encryptionSettings = encryptionSettingsInstance; + + var diskEncryptionKeyValue = encryptionSettingsValue['diskEncryptionKey']; + if (diskEncryptionKeyValue !== null && diskEncryptionKeyValue !== undefined) { + var diskEncryptionKeyInstance = {}; + encryptionSettingsInstance.diskEncryptionKey = diskEncryptionKeyInstance; + + var secretUrlValue = diskEncryptionKeyValue['secretUrl']; + if (secretUrlValue !== null && secretUrlValue !== undefined) { + var secretUrlInstance = secretUrlValue; + diskEncryptionKeyInstance.secretUrl = secretUrlInstance; + } + + var sourceVaultValue = diskEncryptionKeyValue['sourceVault']; + if (sourceVaultValue !== null && sourceVaultValue !== undefined) { + var sourceVaultInstance = {}; + diskEncryptionKeyInstance.sourceVault = sourceVaultInstance; + + var idValue = sourceVaultValue['id']; + if (idValue !== null && idValue !== undefined) { + var idInstance = idValue; + sourceVaultInstance.referenceUri = idInstance; + } + } + } + + var keyEncryptionKeyValue = encryptionSettingsValue['keyEncryptionKey']; + if (keyEncryptionKeyValue !== null && keyEncryptionKeyValue !== undefined) { + var keyEncryptionKeyInstance = {}; + encryptionSettingsInstance.keyEncryptionKey = keyEncryptionKeyInstance; + + var keyUrlValue = keyEncryptionKeyValue['keyUrl']; + if (keyUrlValue !== null && keyUrlValue !== undefined) { + var keyUrlInstance = keyUrlValue; + keyEncryptionKeyInstance.keyUrl = keyUrlInstance; + } + + var sourceVaultValue2 = keyEncryptionKeyValue['sourceVault']; + if (sourceVaultValue2 !== null && sourceVaultValue2 !== undefined) { + var sourceVaultInstance2 = {}; + keyEncryptionKeyInstance.sourceVault = sourceVaultInstance2; + + var idValue2 = sourceVaultValue2['id']; + if (idValue2 !== null && idValue2 !== undefined) { + var idInstance2 = idValue2; + sourceVaultInstance2.referenceUri = idInstance2; + } + } + } + } + var nameValue2 = osDiskValue['name']; if (nameValue2 !== null && nameValue2 !== undefined) { var nameInstance2 = nameValue2; @@ -12789,15 +13243,15 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var vaultSecretGroupInstance = { vaultCertificates: [] }; osProfileInstance.secrets.push(vaultSecretGroupInstance); - var sourceVaultValue = secretsValue['sourceVault']; - if (sourceVaultValue !== null && sourceVaultValue !== undefined) { - var sourceVaultInstance = {}; - vaultSecretGroupInstance.sourceVault = sourceVaultInstance; + var sourceVaultValue3 = secretsValue['sourceVault']; + if (sourceVaultValue3 !== null && sourceVaultValue3 !== undefined) { + var sourceVaultInstance3 = {}; + vaultSecretGroupInstance.sourceVault = sourceVaultInstance3; - var idValue = sourceVaultValue['id']; - if (idValue !== null && idValue !== undefined) { - var idInstance = idValue; - sourceVaultInstance.referenceUri = idInstance; + var idValue3 = sourceVaultValue3['id']; + if (idValue3 !== null && idValue3 !== undefined) { + var idInstance3 = idValue3; + sourceVaultInstance3.referenceUri = idInstance3; } } @@ -12846,10 +13300,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue2 = networkInterfacesValue['id']; - if (idValue2 !== null && idValue2 !== undefined) { - var idInstance2 = idValue2; - networkInterfaceReferenceJsonInstance.referenceUri = idInstance2; + var idValue4 = networkInterfacesValue['id']; + if (idValue4 !== null && idValue4 !== undefined) { + var idInstance4 = idValue4; + networkInterfaceReferenceJsonInstance.referenceUri = idInstance4; } } } @@ -12884,10 +13338,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function var availabilitySetInstance = {}; virtualMachineJsonInstance.availabilitySetReference = availabilitySetInstance; - var idValue3 = availabilitySetValue['id']; - if (idValue3 !== null && idValue3 !== undefined) { - var idInstance3 = idValue3; - availabilitySetInstance.referenceUri = idInstance3; + var idValue5 = availabilitySetValue['id']; + if (idValue5 !== null && idValue5 !== undefined) { + var idInstance5 = idValue5; + availabilitySetInstance.referenceUri = idInstance5; } } @@ -13401,10 +13855,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue4 = resourcesValue['id']; - if (idValue4 !== null && idValue4 !== undefined) { - var idInstance4 = idValue4; - virtualMachineExtensionJsonInstance.id = idInstance4; + var idValue6 = resourcesValue['id']; + if (idValue6 !== null && idValue6 !== undefined) { + var idInstance6 = idValue6; + virtualMachineExtensionJsonInstance.id = idInstance6; } var nameValue7 = resourcesValue['name']; @@ -13436,10 +13890,10 @@ var VirtualMachineOperations = ( /** @lends VirtualMachineOperations */ function } } - var idValue5 = valueValue['id']; - if (idValue5 !== null && idValue5 !== undefined) { - var idInstance5 = idValue5; - virtualMachineJsonInstance.id = idInstance5; + var idValue7 = valueValue['id']; + if (idValue7 !== null && idValue7 !== undefined) { + var idInstance7 = idValue7; + virtualMachineJsonInstance.id = idInstance7; } var nameValue8 = valueValue['name']; diff --git a/lib/services/computeManagement2/package.json b/lib/services/computeManagement2/package.json index 10e2feba0b..48d6c38232 100644 --- a/lib/services/computeManagement2/package.json +++ b/lib/services/computeManagement2/package.json @@ -11,7 +11,7 @@ "Wang, Yugang ", "Zavery, Amar " ], - "version": "0.12.0", + "version": "0.13.0", "description": "Microsoft Azure Compute Resource Provider Management Client Library for node", "tags": [ "azure",