diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs
index f7e63a1b2a60..f72eb77336a2 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs
@@ -647,8 +647,9 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume',
+ /// 'Suspend'
///
///
/// The headers that will be added to request.
@@ -662,7 +663,7 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// Thrown when a required parameter is null
///
- Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or update a VM scale set.
///
@@ -1044,8 +1045,9 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume',
+ /// 'Suspend'
///
///
/// The headers that will be added to request.
@@ -1059,7 +1061,7 @@ public partial interface IVirtualMachineScaleSetsOperations
///
/// Thrown when a required parameter is null
///
- Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets all the VM scale sets under the specified subscription for the
/// specified location.
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs
index 59334fab5736..0a4915b4d937 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs
@@ -44,12 +44,16 @@ public LinuxConfiguration()
/// be added to the VM later.
/// [Preview Feature] Specifies settings
/// related to VM Guest Patching on Linux.
- public LinuxConfiguration(bool? disablePasswordAuthentication = default(bool?), SshConfiguration ssh = default(SshConfiguration), bool? provisionVMAgent = default(bool?), LinuxPatchSettings patchSettings = default(LinuxPatchSettings))
+ /// Indicates whether
+ /// VMAgent Platform Updates is enabled for the Linux virtual machine.
+ /// Default value is false.
+ public LinuxConfiguration(bool? disablePasswordAuthentication = default(bool?), SshConfiguration ssh = default(SshConfiguration), bool? provisionVMAgent = default(bool?), LinuxPatchSettings patchSettings = default(LinuxPatchSettings), bool? enableVMAgentPlatformUpdates = default(bool?))
{
DisablePasswordAuthentication = disablePasswordAuthentication;
Ssh = ssh;
ProvisionVMAgent = provisionVMAgent;
PatchSettings = patchSettings;
+ EnableVMAgentPlatformUpdates = enableVMAgentPlatformUpdates;
CustomInit();
}
@@ -89,5 +93,12 @@ public LinuxConfiguration()
[JsonProperty(PropertyName = "patchSettings")]
public LinuxPatchSettings PatchSettings { get; set; }
+ ///
+ /// Gets or sets indicates whether VMAgent Platform Updates is enabled
+ /// for the Linux virtual machine. Default value is false.
+ ///
+ [JsonProperty(PropertyName = "enableVMAgentPlatformUpdates")]
+ public bool? EnableVMAgentPlatformUpdates { get; set; }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs
index 30a42bbd138a..e576678a8965 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceNames.cs
@@ -17,6 +17,5 @@ namespace Microsoft.Azure.Management.Compute.Models
public static class OrchestrationServiceNames
{
public const string AutomaticRepairs = "AutomaticRepairs";
-
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs
index 2eb5ebd10d94..56348e21b78d 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceStateInput.cs
@@ -32,29 +32,25 @@ public OrchestrationServiceStateInput()
/// Initializes a new instance of the OrchestrationServiceStateInput
/// class.
///
- /// The name of the service. Possible values
- /// include: 'AutomaticRepairs',
- /// 'DummyOrchestrationServiceName'
/// The action to be performed. Possible values
/// include: 'Resume', 'Suspend'
- public OrchestrationServiceStateInput(string serviceName, string action)
+ public OrchestrationServiceStateInput(string action)
{
- ServiceName = serviceName;
Action = action;
CustomInit();
}
-
///
- /// An initialization method that performs custom operations like setting defaults
+ /// Static constructor for OrchestrationServiceStateInput class.
///
- partial void CustomInit();
+ static OrchestrationServiceStateInput()
+ {
+ ServiceName = "AutomaticRepairs";
+ }
///
- /// Gets or sets the name of the service. Possible values include:
- /// 'AutomaticRepairs'
+ /// An initialization method that performs custom operations like setting defaults
///
- [JsonProperty(PropertyName = "serviceName")]
- public string ServiceName { get; set; }
+ partial void CustomInit();
///
/// Gets or sets the action to be performed. Possible values include:
@@ -63,6 +59,12 @@ public OrchestrationServiceStateInput(string serviceName, string action)
[JsonProperty(PropertyName = "action")]
public string Action { get; set; }
+ ///
+ /// The name of the service.
+ ///
+ [JsonProperty(PropertyName = "serviceName")]
+ public static string ServiceName { get; private set; }
+
///
/// Validate the object.
///
@@ -71,10 +73,6 @@ public OrchestrationServiceStateInput(string serviceName, string action)
///
public virtual void Validate()
{
- if (ServiceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "ServiceName");
- }
if (Action == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Action");
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs
index 2f398484a900..47ace61c353f 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationServiceSummary.cs
@@ -32,8 +32,7 @@ public OrchestrationServiceSummary()
/// class.
///
/// The name of the service. Possible values
- /// include: 'AutomaticRepairs',
- /// 'DummyOrchestrationServiceName'
+ /// include: 'AutomaticRepairs'
/// The current state of the service.
/// Possible values include: 'NotRunning', 'Running',
/// 'Suspended'
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs
index 25535b8e26a9..6f124436f622 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs
@@ -514,6 +514,16 @@ public override void Validate()
{
StorageProfile.Validate();
}
+ if (Resources != null)
+ {
+ foreach (var element in Resources)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
}
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtension.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtension.cs
index e04e212cd273..0991f0ef352a 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtension.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtension.cs
@@ -72,7 +72,7 @@ public VirtualMachineExtension()
/// The extensions
/// protected settings that are passed by reference, and consumed from
/// key vault
- public VirtualMachineExtension(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string forceUpdateTag = default(string), string publisher = default(string), string virtualMachineExtensionType = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), VirtualMachineExtensionInstanceView instanceView = default(VirtualMachineExtensionInstanceView), bool? suppressFailures = default(bool?), object protectedSettingsFromKeyVault = default(object))
+ public VirtualMachineExtension(string location = default(string), string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string forceUpdateTag = default(string), string publisher = default(string), string virtualMachineExtensionType = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), VirtualMachineExtensionInstanceView instanceView = default(VirtualMachineExtensionInstanceView), bool? suppressFailures = default(bool?), KeyVaultSecretReference protectedSettingsFromKeyVault = default(KeyVaultSecretReference))
: base(location, id, name, type, tags)
{
ForceUpdateTag = forceUpdateTag;
@@ -177,7 +177,20 @@ public VirtualMachineExtension()
/// reference, and consumed from key vault
///
[JsonProperty(PropertyName = "properties.protectedSettingsFromKeyVault")]
- public object ProtectedSettingsFromKeyVault { get; set; }
+ public KeyVaultSecretReference ProtectedSettingsFromKeyVault { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ProtectedSettingsFromKeyVault != null)
+ {
+ ProtectedSettingsFromKeyVault.Validate();
+ }
+ }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtensionUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtensionUpdate.cs
index 3839a8f107a7..64a288bbcffc 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtensionUpdate.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineExtensionUpdate.cs
@@ -66,7 +66,7 @@ public VirtualMachineExtensionUpdate()
/// The extensions
/// protected settings that are passed by reference, and consumed from
/// key vault
- public VirtualMachineExtensionUpdate(IDictionary tags = default(IDictionary), string forceUpdateTag = default(string), string publisher = default(string), string type = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), bool? suppressFailures = default(bool?), object protectedSettingsFromKeyVault = default(object))
+ public VirtualMachineExtensionUpdate(IDictionary tags = default(IDictionary), string forceUpdateTag = default(string), string publisher = default(string), string type = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), bool? suppressFailures = default(bool?), KeyVaultSecretReference protectedSettingsFromKeyVault = default(KeyVaultSecretReference))
: base(tags)
{
ForceUpdateTag = forceUpdateTag;
@@ -157,7 +157,20 @@ public VirtualMachineExtensionUpdate()
/// reference, and consumed from key vault
///
[JsonProperty(PropertyName = "properties.protectedSettingsFromKeyVault")]
- public object ProtectedSettingsFromKeyVault { get; set; }
+ public KeyVaultSecretReference ProtectedSettingsFromKeyVault { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ProtectedSettingsFromKeyVault != null)
+ {
+ ProtectedSettingsFromKeyVault.Validate();
+ }
+ }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtension.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtension.cs
index 7e4057f6157a..e73c85a639e0 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtension.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtension.cs
@@ -73,7 +73,7 @@ public VirtualMachineScaleSetExtension()
/// The extensions
/// protected settings that are passed by reference, and consumed from
/// key vault
- public VirtualMachineScaleSetExtension(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), IList provisionAfterExtensions = default(IList), bool? suppressFailures = default(bool?), object protectedSettingsFromKeyVault = default(object))
+ public VirtualMachineScaleSetExtension(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), IList provisionAfterExtensions = default(IList), bool? suppressFailures = default(bool?), KeyVaultSecretReference protectedSettingsFromKeyVault = default(KeyVaultSecretReference))
: base(id)
{
Name = name;
@@ -194,7 +194,20 @@ public VirtualMachineScaleSetExtension()
/// reference, and consumed from key vault
///
[JsonProperty(PropertyName = "properties.protectedSettingsFromKeyVault")]
- public object ProtectedSettingsFromKeyVault { get; set; }
+ public KeyVaultSecretReference ProtectedSettingsFromKeyVault { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ProtectedSettingsFromKeyVault != null)
+ {
+ ProtectedSettingsFromKeyVault.Validate();
+ }
+ }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs
index 09aae47b27db..a100df931865 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs
@@ -73,7 +73,7 @@ public VirtualMachineScaleSetExtensionUpdate()
/// The extensions
/// protected settings that are passed by reference, and consumed from
/// key vault
- public VirtualMachineScaleSetExtensionUpdate(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), IList provisionAfterExtensions = default(IList), bool? suppressFailures = default(bool?), object protectedSettingsFromKeyVault = default(object))
+ public VirtualMachineScaleSetExtensionUpdate(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), IList provisionAfterExtensions = default(IList), bool? suppressFailures = default(bool?), KeyVaultSecretReference protectedSettingsFromKeyVault = default(KeyVaultSecretReference))
: base(id)
{
Name = name;
@@ -194,7 +194,20 @@ public VirtualMachineScaleSetExtensionUpdate()
/// reference, and consumed from key vault
///
[JsonProperty(PropertyName = "properties.protectedSettingsFromKeyVault")]
- public object ProtectedSettingsFromKeyVault { get; set; }
+ public KeyVaultSecretReference ProtectedSettingsFromKeyVault { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ProtectedSettingsFromKeyVault != null)
+ {
+ ProtectedSettingsFromKeyVault.Validate();
+ }
+ }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs
index b9b9295215f7..27b2827863da 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs
@@ -348,6 +348,16 @@ public override void Validate()
{
StorageProfile.Validate();
}
+ if (Resources != null)
+ {
+ foreach (var element in Resources)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
}
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtension.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtension.cs
index fdb767f44b90..80e1dbe82190 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtension.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtension.cs
@@ -70,7 +70,7 @@ public VirtualMachineScaleSetVMExtension()
/// The extensions
/// protected settings that are passed by reference, and consumed from
/// key vault
- public VirtualMachineScaleSetVMExtension(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), VirtualMachineExtensionInstanceView instanceView = default(VirtualMachineExtensionInstanceView), bool? suppressFailures = default(bool?), object protectedSettingsFromKeyVault = default(object))
+ public VirtualMachineScaleSetVMExtension(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), string provisioningState = default(string), VirtualMachineExtensionInstanceView instanceView = default(VirtualMachineExtensionInstanceView), bool? suppressFailures = default(bool?), KeyVaultSecretReference protectedSettingsFromKeyVault = default(KeyVaultSecretReference))
: base(id)
{
Name = name;
@@ -189,7 +189,20 @@ public VirtualMachineScaleSetVMExtension()
/// reference, and consumed from key vault
///
[JsonProperty(PropertyName = "properties.protectedSettingsFromKeyVault")]
- public object ProtectedSettingsFromKeyVault { get; set; }
+ public KeyVaultSecretReference ProtectedSettingsFromKeyVault { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ProtectedSettingsFromKeyVault != null)
+ {
+ ProtectedSettingsFromKeyVault.Validate();
+ }
+ }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs
index dcaf3098b7ae..fdbb3911e616 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs
@@ -66,7 +66,7 @@ public VirtualMachineScaleSetVMExtensionUpdate()
/// The extensions
/// protected settings that are passed by reference, and consumed from
/// key vault
- public VirtualMachineScaleSetVMExtensionUpdate(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), bool? suppressFailures = default(bool?), object protectedSettingsFromKeyVault = default(object))
+ public VirtualMachineScaleSetVMExtensionUpdate(string id = default(string), string name = default(string), string type = default(string), string forceUpdateTag = default(string), string publisher = default(string), string type1 = default(string), string typeHandlerVersion = default(string), bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), object settings = default(object), object protectedSettings = default(object), bool? suppressFailures = default(bool?), KeyVaultSecretReference protectedSettingsFromKeyVault = default(KeyVaultSecretReference))
: base(id)
{
Name = name;
@@ -171,7 +171,20 @@ public VirtualMachineScaleSetVMExtensionUpdate()
/// reference, and consumed from key vault
///
[JsonProperty(PropertyName = "properties.protectedSettingsFromKeyVault")]
- public object ProtectedSettingsFromKeyVault { get; set; }
+ public KeyVaultSecretReference ProtectedSettingsFromKeyVault { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ProtectedSettingsFromKeyVault != null)
+ {
+ ProtectedSettingsFromKeyVault.Validate();
+ }
+ }
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs
index e090d1a72804..2f900b18b6ce 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs
@@ -55,7 +55,10 @@ public WindowsConfiguration()
/// related to VM Guest Patching on Windows.
/// Specifies the Windows Remote Management
/// listeners. This enables remote Windows PowerShell.
- public WindowsConfiguration(bool? provisionVMAgent = default(bool?), bool? enableAutomaticUpdates = default(bool?), string timeZone = default(string), IList additionalUnattendContent = default(IList), PatchSettings patchSettings = default(PatchSettings), WinRMConfiguration winRM = default(WinRMConfiguration))
+ /// Indicates whether
+ /// VMAgent Platform Updates is enabled for the Windows virtual
+ /// machine. Default value is false.
+ public WindowsConfiguration(bool? provisionVMAgent = default(bool?), bool? enableAutomaticUpdates = default(bool?), string timeZone = default(string), IList additionalUnattendContent = default(IList), PatchSettings patchSettings = default(PatchSettings), WinRMConfiguration winRM = default(WinRMConfiguration), bool? enableVMAgentPlatformUpdates = default(bool?))
{
ProvisionVMAgent = provisionVMAgent;
EnableAutomaticUpdates = enableAutomaticUpdates;
@@ -63,6 +66,7 @@ public WindowsConfiguration()
AdditionalUnattendContent = additionalUnattendContent;
PatchSettings = patchSettings;
WinRM = winRM;
+ EnableVMAgentPlatformUpdates = enableVMAgentPlatformUpdates;
CustomInit();
}
@@ -125,5 +129,12 @@ public WindowsConfiguration()
[JsonProperty(PropertyName = "winRM")]
public WinRMConfiguration WinRM { get; set; }
+ ///
+ /// Gets or sets indicates whether VMAgent Platform Updates is enabled
+ /// for the Windows virtual machine. Default value is false.
+ ///
+ [JsonProperty(PropertyName = "enableVMAgentPlatformUpdates")]
+ public bool? EnableVMAgentPlatformUpdates { get; set; }
+
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs
index 58825bb8754a..2b8c811d1a4e 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs
@@ -600,6 +600,10 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "extensionParameters");
}
+ if (extensionParameters != null)
+ {
+ extensionParameters.Validate();
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs
index efba1564e0cd..51d633e3fb50 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs
@@ -592,6 +592,10 @@ internal VirtualMachineScaleSetExtensionsOperations(ComputeManagementClient clie
{
throw new ValidationException(ValidationRules.CannotBeNull, "extensionParameters");
}
+ if (extensionParameters != null)
+ {
+ extensionParameters.Validate();
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs
index 6cd1acfb5e62..e099d6710af4 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs
@@ -633,6 +633,10 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl
{
throw new ValidationException(ValidationRules.CannotBeNull, "extensionParameters");
}
+ if (extensionParameters != null)
+ {
+ extensionParameters.Validate();
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs
index de708608d583..0e19f3018ad3 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs
@@ -2173,8 +2173,8 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client)
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume', 'Suspend'
///
///
/// The headers that will be added to request.
@@ -2182,10 +2182,10 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client)
///
/// The cancellation token.
///
- public async Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task SetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
- AzureOperationResponse _response = await BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, action, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -4752,8 +4752,8 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client)
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume', 'Suspend'
///
///
/// Headers that will be added to request.
@@ -4773,7 +4773,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginSetOrchestrationServiceStateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string action, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -4783,17 +4783,19 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName");
}
- if (parameters == null)
+ if (Client.SubscriptionId == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- if (parameters != null)
+ if (action == null)
{
- parameters.Validate();
+ throw new ValidationException(ValidationRules.CannotBeNull, "action");
}
- if (Client.SubscriptionId == null)
+ string apiVersion = "2022-08-01";
+ OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput();
+ if (action != null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ parameters.Action = action;
}
string apiVersion = "2022-03-01";
// Tracing
@@ -4805,8 +4807,8 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("vmScaleSetName", vmScaleSetName);
- tracingParameters.Add("parameters", parameters);
tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "BeginSetOrchestrationServiceState", tracingParameters);
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs
index 0a336a613878..78c057416693 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs
@@ -1061,12 +1061,12 @@ public static void UpdateInstances(this IVirtualMachineScaleSetsOperations opera
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume', 'Suspend'
///
- public static void SetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters)
+ public static void SetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action)
{
- operations.SetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters).GetAwaiter().GetResult();
+ operations.SetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action).GetAwaiter().GetResult();
}
///
@@ -1081,15 +1081,15 @@ public static void SetOrchestrationServiceState(this IVirtualMachineScaleSetsOpe
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume', 'Suspend'
///
///
/// The cancellation token.
///
- public static async Task SetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task SetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.SetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.SetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, action, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -1739,12 +1739,12 @@ public static void BeginUpdateInstances(this IVirtualMachineScaleSetsOperations
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume', 'Suspend'
///
- public static void BeginSetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters)
+ public static void BeginSetOrchestrationServiceState(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action)
{
- operations.BeginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, parameters).GetAwaiter().GetResult();
+ operations.BeginSetOrchestrationServiceStateAsync(resourceGroupName, vmScaleSetName, action).GetAwaiter().GetResult();
}
///
@@ -1759,15 +1759,15 @@ public static void BeginSetOrchestrationServiceState(this IVirtualMachineScaleSe
///
/// The name of the virtual machine scale set to create or update.
///
- ///
- /// The input object for SetOrchestrationServiceState API.
+ ///
+ /// The action to be performed. Possible values include: 'Resume', 'Suspend'
///
///
/// The cancellation token.
///
- public static async Task BeginSetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, OrchestrationServiceStateInput parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginSetOrchestrationServiceStateAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, string action, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.BeginSetOrchestrationServiceStateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, action, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/ExtensionTests.cs b/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/ExtensionTests.cs
index 49ff7219d57b..34422fbcfeb7 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/ExtensionTests.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/ExtensionTests.cs
@@ -166,12 +166,14 @@ private void ValidateVMExtensionInstanceView(VirtualMachineExtensionInstanceView
private void AddProtectedSettingsFromKeyVaultToExtension(VirtualMachineExtension vmExtension)
{
vmExtension.ProtectedSettings = null;
- //string idValue = string.Format("subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.KeyVault/vaults/kvName", m_subId, resourceGroupName);
- string idValue = string.Format("/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGforSDKtestResources/providers/Microsoft.KeyVault/vaults/keyVaultInSoutheastAsia");
- string sourceVaultId = string.Format("\"id\": \"{0}\"", idValue);
- string sourceVault = "{ " + sourceVaultId + " }";
- string secret = string.Format("\"secretUrl\": \"{0}\"", "https://keyvaultinsoutheastasia.vault.azure.net/secrets/SecretForTest/2375df95e3da463c81c43c300f6506ab");
- vmExtension.ProtectedSettingsFromKeyVault = new JRaw("{ " + string.Format("\"sourceVault\": {0},{1}", sourceVault, secret) + " }");
+ SubResource sourceVault = new SubResource();
+ sourceVault.Id = "/subscriptions/e37510d7-33b6-4676-886f-ee75bcc01871/resourceGroups/RGforSDKtestResources/providers/Microsoft.KeyVault/vaults/keyVaultInSoutheastAsia";
+ string secret = "https://keyvaultinsoutheastasia.vault.azure.net/secrets/SecretForTest/2375df95e3da463c81c43c300f6506ab";
+ vmExtension.ProtectedSettingsFromKeyVault = new KeyVaultSecretReference()
+ {
+ SourceVault = sourceVault,
+ SecretUrl = secret
+ };
}
}
}
diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/OSProfileTests.cs b/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/OSProfileTests.cs
index 3af101437c4b..d7fbe0293b1e 100644
--- a/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/OSProfileTests.cs
+++ b/sdk/compute/Microsoft.Azure.Management.Compute/tests/ScenarioTests/OSProfileTests.cs
@@ -82,7 +82,8 @@ private void EnableWinRMCustomDataAndUnattendContent(string rgName, string keyVa
CertificateUrl = winRMCertificateUrl,
}
}
- }
+ },
+ EnableVMAgentPlatformUpdates = true
};
osProfile.Secrets = new List
{
@@ -112,6 +113,7 @@ private void ValidateWinRMCustomDataAndUnattendContent(string winRMCertificateUr
Assert.True(osProfile.WindowsConfiguration.ProvisionVMAgent != null && osProfile.WindowsConfiguration.ProvisionVMAgent.Value);
Assert.True(osProfile.WindowsConfiguration.EnableAutomaticUpdates != null && !osProfile.WindowsConfiguration.EnableAutomaticUpdates.Value);
+ Assert.True(osProfile.WindowsConfiguration.EnableVMAgentPlatformUpdates != null && !osProfile.WindowsConfiguration.EnableVMAgentPlatformUpdates.Value);
// TimeZone
Assert.Equal(PacificStandardTime, osProfile.WindowsConfiguration.TimeZone);
@@ -219,7 +221,8 @@ public void TestVMWithLinuxOSProfile()
KeyData = DefaultSshPublicKey,
}
}
- }
+ },
+ EnableVMAgentPlatformUpdates = true
};
};
@@ -239,6 +242,7 @@ public void TestVMWithLinuxOSProfile()
Assert.Equal(1, publicKeys.Count);
Assert.Equal(sshPath, publicKeys[0].Path);
Assert.Equal(DefaultSshPublicKey, publicKeys[0].KeyData);
+ Assert.True(osProfile.LinuxConfiguration.EnableVMAgentPlatformUpdates);
};
TestVMWithOSProfile(