diff --git a/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md b/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md index f1dc04ea5bc1..38dddfee8119 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md +++ b/sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md @@ -1,14 +1,12 @@ # Release History -## 1.10.0-beta.1 (Unreleased) +## 1.10.0 (2026-06-30) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added `Properties` property in `VirtualMachineScaleSetVmData` class. + - This property contains the properties of the VirtualMachineScaleSetVm. It supports `AdditionalProperties` to send and receive private/internal properties supported by the service. + - Please use the properties in `VirtualMachineScaleSetVmData.Properties` to set the properties of the VirtualMachineScaleSetVm, instead of using those properties at the root level of `VirtualMachineScaleSetVmData` class. ## 1.9.0 (2025-03-31) @@ -46,7 +44,7 @@ - Upgraded api-version tag from 'package-2024-07-01' to 'package-2024-11-03'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b09c9ec927456021dc549e111fa2cac3b4b00659/specification/compute/resource-manager/readme.md. - Added new classes named `GalleryInVmAccessControlProfileCollection`, `ComputeGalleryValidationProfile`, `GalleryImageExecutedValidation`, `AdditionalReplicaSet`, `GallerySoftDeleted`, `GallerySoftDeletedResourceList`, `ComputeGalleryEndpointAccess`, `ComputeGalleryEndpointTypes`, and `ComputeGalleryPlatformAttribute`. - - Added a new property named `IsBlockedDeletionBeforeEndOfLife` to `GalleryImageVersionSafertyProfile` class. + - Added a new property named `IsBlockedDeletionBeforeEndOfLife` to `GalleryImageVersionSafetyProfile` class. - Added a new property named `StartsAtVersion` to `GalleryImageFeature` class. - Added a new property named `AllowUpdateImage` to `GalleryImageData` class. - Added new properties named `ValidationsProfile` and `EnableRestore` to `GalleryImageVersionData` class. diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs index fac44f0490e9..514701b944b1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.net8.0.cs @@ -2898,30 +2898,50 @@ protected VirtualMachineScaleSetVmCollection() { } public partial class VirtualMachineScaleSetVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineScaleSetVmData(Azure.Core.AzureLocation location) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.AdditionalCapabilities AdditionalCapabilities { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Core.ResourceIdentifier AvailabilitySetId { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.BootDiagnostics BootDiagnostics { get { throw null; } set { } } public string ETag { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile HardwareProfile { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string InstanceId { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView InstanceView { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public bool? LatestModelApplied { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string LicenseType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string ModelDefinitionApplied { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile NetworkProfile { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile OSProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePlan Plan { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties Properties { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string ProvisioningState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? ResilientVmDeletionStatus { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile StorageProfile { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.DateTimeOffset? TimeCreated { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string UserData { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string VmId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3663,12 +3683,15 @@ public static partial class ArmComputeModelFactory public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string instanceId, Azure.ResourceManager.Compute.Models.ComputeSku sku, Azure.ResourceManager.Compute.Models.ComputePlan plan, System.Collections.Generic.IEnumerable resources, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, bool? latestModelApplied, string vmId, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile, Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile, System.Collections.Generic.IEnumerable networkInterfaceConfigurations, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics, Azure.Core.ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, System.DateTimeOffset? timeCreated) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string instanceId, Azure.ResourceManager.Compute.Models.ComputeSku sku, Azure.ResourceManager.Compute.Models.ComputePlan plan, System.Collections.Generic.IEnumerable resources, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string etag, bool? latestModelApplied, string vmId, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile, Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile, System.Collections.Generic.IEnumerable networkInterfaceConfigurations, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics, Azure.Core.ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, System.DateTimeOffset? timeCreated) { throw null; } - public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string instanceId = null, Azure.ResourceManager.Compute.Models.ComputeSku sku = null, Azure.ResourceManager.Compute.Models.ComputePlan plan = null, System.Collections.Generic.IEnumerable resources = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string etag = null, bool? latestModelApplied = default(bool?), string vmId = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView = null, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = null, Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? resilientVmDeletionStatus = default(Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus?), Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = null, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.Core.ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string instanceId, Azure.ResourceManager.Compute.Models.ComputeSku sku, Azure.ResourceManager.Compute.Models.ComputePlan plan = null, System.Collections.Generic.IEnumerable resources = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string etag = null, bool? latestModelApplied = default(bool?), string vmId = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView = null, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = null, Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? resilientVmDeletionStatus = default(Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus?), Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = null, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.Core.ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string instanceId = null, Azure.ResourceManager.Compute.Models.ComputeSku sku = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties properties = null, Azure.ResourceManager.Compute.Models.ComputePlan plan = null, System.Collections.Generic.IEnumerable resources = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string etag = null) { throw null; } public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmExtensionData VirtualMachineScaleSetVmExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string forceUpdateTag = null, string publisher = null, string extensionType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, string provisioningState = null, Azure.ResourceManager.Compute.Models.VirtualMachineExtensionInstanceView instanceView = null, bool? suppressFailures = default(bool?), Azure.ResourceManager.Compute.Models.KeyVaultSecretReference keyVaultProtectedSettings = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmExtensionPatch VirtualMachineScaleSetVmExtensionPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string forceUpdateTag = null, string publisher = null, string extensionType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, bool? suppressFailures = default(bool?), Azure.ResourceManager.Compute.Models.KeyVaultSecretReference keyVaultProtectedSettings = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmExtensionsSummary VirtualMachineScaleSetVmExtensionsSummary(string name = null, System.Collections.Generic.IEnumerable statusesSummary = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView VirtualMachineScaleSetVmInstanceView(int? platformUpdateDomain = default(int?), int? platformFaultDomain = default(int?), string rdpThumbPrint = null, Azure.ResourceManager.Compute.Models.VirtualMachineAgentInstanceView vmAgent = null, Azure.ResourceManager.Compute.Models.MaintenanceRedeployStatus maintenanceRedeployStatus = null, System.Collections.Generic.IEnumerable disks = null, System.Collections.Generic.IEnumerable extensions = null, Azure.ResourceManager.Compute.Models.InstanceViewStatus vmHealthStatus = null, Azure.ResourceManager.Compute.Models.BootDiagnosticsInstanceView bootDiagnostics = null, System.Collections.Generic.IEnumerable statuses = null, Azure.Core.ResourceIdentifier assignedHost = null, string placementGroupId = null, string computerName = null, string osName = null, string osVersion = null, Azure.ResourceManager.Compute.Models.HyperVGeneration? hyperVGeneration = default(Azure.ResourceManager.Compute.Models.HyperVGeneration?)) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProfile VirtualMachineScaleSetVmProfile(Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetNetworkProfile networkProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetExtensionProfile extensionProfile = null, string licenseType = null, Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType? priority = default(Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType?), Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType?), double? billingMaxPrice = default(double?), Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile scheduledEventsProfile = null, string userData = null, Azure.Core.ResourceIdentifier capacityReservationGroupId = null, System.Collections.Generic.IEnumerable galleryApplications = null, Azure.ResourceManager.Compute.Models.VirtualMachineSizeProperties hardwareVmSizeProperties = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.ResourceManager.Compute.Models.ComputeSecurityPostureReference securityPostureReference = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties VirtualMachineScaleSetVmProperties(bool? latestModelApplied = default(bool?), string vmId = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView = null, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = null, Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? resilientVmDeletionStatus = default(Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus?), Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = null, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.Core.ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineSize VirtualMachineSize(string name = null, int? numberOfCores = default(int?), int? osDiskSizeInMB = default(int?), int? resourceDiskSizeInMB = default(int?), int? memoryInMB = default(int?), int? maxDataDiskCount = default(int?)) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineSoftwarePatchProperties VirtualMachineSoftwarePatchProperties(string patchId = null, string name = null, string version = null, string kbId = null, System.Collections.Generic.IEnumerable classifications = null, Azure.ResourceManager.Compute.Models.VmGuestPatchRebootBehavior? rebootBehavior = default(Azure.ResourceManager.Compute.Models.VmGuestPatchRebootBehavior?), string activityId = null, System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.PatchAssessmentState? assessmentState = default(Azure.ResourceManager.Compute.Models.PatchAssessmentState?)) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineStatusCodeCount VirtualMachineStatusCodeCount(string code = null, int? count = default(int?)) { throw null; } @@ -10162,6 +10185,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VirtualMachineScaleSetVmProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineScaleSetVmProperties() { } + public Azure.ResourceManager.Compute.Models.AdditionalCapabilities AdditionalCapabilities { get { throw null; } set { } } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public Azure.Core.ResourceIdentifier AvailabilitySetId { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.BootDiagnostics BootDiagnostics { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile HardwareProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView InstanceView { get { throw null; } } + public bool? LatestModelApplied { get { throw null; } } + public string LicenseType { get { throw null; } set { } } + public string ModelDefinitionApplied { get { throw null; } } + public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + public Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile NetworkProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile OSProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? ResilientVmDeletionStatus { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile StorageProfile { get { throw null; } set { } } + public System.DateTimeOffset? TimeCreated { get { throw null; } } + public string UserData { get { throw null; } set { } } + public string VmId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VirtualMachineScaleSetVmProtectionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineScaleSetVmProtectionPolicy() { } diff --git a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs index fac44f0490e9..514701b944b1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/api/Azure.ResourceManager.Compute.netstandard2.0.cs @@ -2898,30 +2898,50 @@ protected VirtualMachineScaleSetVmCollection() { } public partial class VirtualMachineScaleSetVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineScaleSetVmData(Azure.Core.AzureLocation location) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.AdditionalCapabilities AdditionalCapabilities { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.Core.ResourceIdentifier AvailabilitySetId { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.BootDiagnostics BootDiagnostics { get { throw null; } set { } } public string ETag { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile HardwareProfile { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string InstanceId { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView InstanceView { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public bool? LatestModelApplied { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string LicenseType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string ModelDefinitionApplied { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile NetworkProfile { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile OSProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputePlan Plan { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties Properties { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string ProvisioningState { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? ResilientVmDeletionStatus { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } public Azure.ResourceManager.Compute.Models.ComputeSku Sku { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile StorageProfile { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.DateTimeOffset? TimeCreated { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string UserData { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string VmId { get { throw null; } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3663,12 +3683,15 @@ public static partial class ArmComputeModelFactory public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string instanceId, Azure.ResourceManager.Compute.Models.ComputeSku sku, Azure.ResourceManager.Compute.Models.ComputePlan plan, System.Collections.Generic.IEnumerable resources, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, bool? latestModelApplied, string vmId, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile, Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile, System.Collections.Generic.IEnumerable networkInterfaceConfigurations, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics, Azure.Core.ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, System.DateTimeOffset? timeCreated) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string instanceId, Azure.ResourceManager.Compute.Models.ComputeSku sku, Azure.ResourceManager.Compute.Models.ComputePlan plan, System.Collections.Generic.IEnumerable resources, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string etag, bool? latestModelApplied, string vmId, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile, Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile, System.Collections.Generic.IEnumerable networkInterfaceConfigurations, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics, Azure.Core.ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, System.DateTimeOffset? timeCreated) { throw null; } - public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string instanceId = null, Azure.ResourceManager.Compute.Models.ComputeSku sku = null, Azure.ResourceManager.Compute.Models.ComputePlan plan = null, System.Collections.Generic.IEnumerable resources = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string etag = null, bool? latestModelApplied = default(bool?), string vmId = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView = null, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = null, Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? resilientVmDeletionStatus = default(Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus?), Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = null, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.Core.ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string instanceId, Azure.ResourceManager.Compute.Models.ComputeSku sku, Azure.ResourceManager.Compute.Models.ComputePlan plan = null, System.Collections.Generic.IEnumerable resources = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string etag = null, bool? latestModelApplied = default(bool?), string vmId = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView = null, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = null, Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? resilientVmDeletionStatus = default(Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus?), Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = null, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.Core.ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string instanceId = null, Azure.ResourceManager.Compute.Models.ComputeSku sku = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties properties = null, Azure.ResourceManager.Compute.Models.ComputePlan plan = null, System.Collections.Generic.IEnumerable resources = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string etag = null) { throw null; } public static Azure.ResourceManager.Compute.VirtualMachineScaleSetVmExtensionData VirtualMachineScaleSetVmExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string forceUpdateTag = null, string publisher = null, string extensionType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, string provisioningState = null, Azure.ResourceManager.Compute.Models.VirtualMachineExtensionInstanceView instanceView = null, bool? suppressFailures = default(bool?), Azure.ResourceManager.Compute.Models.KeyVaultSecretReference keyVaultProtectedSettings = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmExtensionPatch VirtualMachineScaleSetVmExtensionPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string forceUpdateTag = null, string publisher = null, string extensionType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), bool? enableAutomaticUpgrade = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, bool? suppressFailures = default(bool?), Azure.ResourceManager.Compute.Models.KeyVaultSecretReference keyVaultProtectedSettings = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmExtensionsSummary VirtualMachineScaleSetVmExtensionsSummary(string name = null, System.Collections.Generic.IEnumerable statusesSummary = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView VirtualMachineScaleSetVmInstanceView(int? platformUpdateDomain = default(int?), int? platformFaultDomain = default(int?), string rdpThumbPrint = null, Azure.ResourceManager.Compute.Models.VirtualMachineAgentInstanceView vmAgent = null, Azure.ResourceManager.Compute.Models.MaintenanceRedeployStatus maintenanceRedeployStatus = null, System.Collections.Generic.IEnumerable disks = null, System.Collections.Generic.IEnumerable extensions = null, Azure.ResourceManager.Compute.Models.InstanceViewStatus vmHealthStatus = null, Azure.ResourceManager.Compute.Models.BootDiagnosticsInstanceView bootDiagnostics = null, System.Collections.Generic.IEnumerable statuses = null, Azure.Core.ResourceIdentifier assignedHost = null, string placementGroupId = null, string computerName = null, string osName = null, string osVersion = null, Azure.ResourceManager.Compute.Models.HyperVGeneration? hyperVGeneration = default(Azure.ResourceManager.Compute.Models.HyperVGeneration?)) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProfile VirtualMachineScaleSetVmProfile(Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetNetworkProfile networkProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetExtensionProfile extensionProfile = null, string licenseType = null, Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType? priority = default(Azure.ResourceManager.Compute.Models.VirtualMachinePriorityType?), Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.Compute.Models.VirtualMachineEvictionPolicyType?), double? billingMaxPrice = default(double?), Azure.ResourceManager.Compute.Models.ComputeScheduledEventsProfile scheduledEventsProfile = null, string userData = null, Azure.Core.ResourceIdentifier capacityReservationGroupId = null, System.Collections.Generic.IEnumerable galleryApplications = null, Azure.ResourceManager.Compute.Models.VirtualMachineSizeProperties hardwareVmSizeProperties = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.ResourceManager.Compute.Models.ComputeSecurityPostureReference securityPostureReference = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties VirtualMachineScaleSetVmProperties(bool? latestModelApplied = default(bool?), string vmId = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView instanceView = null, Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile hardwareProfile = null, Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? resilientVmDeletionStatus = default(Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus?), Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile storageProfile = null, Azure.ResourceManager.Compute.Models.AdditionalCapabilities additionalCapabilities = null, Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile osProfile = null, Azure.ResourceManager.Compute.Models.SecurityProfile securityProfile = null, Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile networkProfile = null, System.Collections.Generic.IEnumerable networkInterfaceConfigurations = null, Azure.ResourceManager.Compute.Models.BootDiagnostics bootDiagnostics = null, Azure.Core.ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, System.DateTimeOffset? timeCreated = default(System.DateTimeOffset?), System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineSize VirtualMachineSize(string name = null, int? numberOfCores = default(int?), int? osDiskSizeInMB = default(int?), int? resourceDiskSizeInMB = default(int?), int? memoryInMB = default(int?), int? maxDataDiskCount = default(int?)) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineSoftwarePatchProperties VirtualMachineSoftwarePatchProperties(string patchId = null, string name = null, string version = null, string kbId = null, System.Collections.Generic.IEnumerable classifications = null, Azure.ResourceManager.Compute.Models.VmGuestPatchRebootBehavior? rebootBehavior = default(Azure.ResourceManager.Compute.Models.VmGuestPatchRebootBehavior?), string activityId = null, System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Compute.Models.PatchAssessmentState? assessmentState = default(Azure.ResourceManager.Compute.Models.PatchAssessmentState?)) { throw null; } public static Azure.ResourceManager.Compute.Models.VirtualMachineStatusCodeCount VirtualMachineStatusCodeCount(string code = null, int? count = default(int?)) { throw null; } @@ -10162,6 +10185,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VirtualMachineScaleSetVmProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineScaleSetVmProperties() { } + public Azure.ResourceManager.Compute.Models.AdditionalCapabilities AdditionalCapabilities { get { throw null; } set { } } + public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } + public Azure.Core.ResourceIdentifier AvailabilitySetId { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.BootDiagnostics BootDiagnostics { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineHardwareProfile HardwareProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmInstanceView InstanceView { get { throw null; } } + public bool? LatestModelApplied { get { throw null; } } + public string LicenseType { get { throw null; } set { } } + public string ModelDefinitionApplied { get { throw null; } } + public System.Collections.Generic.IList NetworkInterfaceConfigurations { get { throw null; } } + public Azure.ResourceManager.Compute.Models.VirtualMachineNetworkProfile NetworkProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineOSProfile OSProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Compute.Models.ResilientVmDeletionStatus? ResilientVmDeletionStatus { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.SecurityProfile SecurityProfile { get { throw null; } set { } } + public Azure.ResourceManager.Compute.Models.VirtualMachineStorageProfile StorageProfile { get { throw null; } set { } } + public System.DateTimeOffset? TimeCreated { get { throw null; } } + public string UserData { get { throw null; } set { } } + public string VmId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVmProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VirtualMachineScaleSetVmProtectionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VirtualMachineScaleSetVmProtectionPolicy() { } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj b/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj index b8949405c5ff..78443e5cf51c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Azure.ResourceManager.Compute.csproj @@ -1,6 +1,6 @@ - 1.10.0-beta.1 + 1.10.0 1.9.0 Azure.ResourceManager.Compute diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Customize/ArmComputeModelFactory.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Customize/ArmComputeModelFactory.cs index 752fbb3aef0f..3400e6457f5a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Customize/ArmComputeModelFactory.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Customize/ArmComputeModelFactory.cs @@ -148,7 +148,125 @@ public static CapacityReservationGroupData CapacityReservationGroupData(Resource => CapacityReservationGroupData(id, name, resourceType, systemData, tags, location, zones, capacityReservations, virtualMachinesAssociated, null, null); [EditorBrowsable(EditorBrowsableState.Never)] - public static CommunityGalleryInfo CommunityGalleryInfo(Uri publisherUri = null, string publisherContact = null, string eula = null, string publicNamePrefix = null, bool? communityGalleryEnabled = null, IEnumerable publicNames = null) + public static CommunityGalleryInfo CommunityGalleryInfo(Uri publisherUri = null, string publisherContact = null, string eula = null, string publicNamePrefix = null, bool? communityGalleryEnabled = null, IEnumerable publicNames = null) => CommunityGalleryInfo(publisherUri.AbsoluteUri, publisherContact, eula, publicNamePrefix, communityGalleryEnabled, publicNames?.ToList()); + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The virtual machine instance ID. + /// The virtual machine SKU. + /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + /// The virtual machine child extension resources. + /// The virtual machine zones. + /// The identity of the virtual machine, if configured. + /// Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. + /// Specifies whether the latest model has been applied to the virtual machine. + /// Azure VM unique ID. + /// The virtual machine instance view. + /// Specifies the hardware settings for the virtual machine. + /// Specifies the resilient VM deletion status for the virtual machine. + /// Specifies the storage settings for the virtual machine disks. + /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + /// Specifies the operating system settings for the virtual machine. + /// Specifies the Security related profile settings for the virtual machine. + /// Specifies the network interfaces of the virtual machine. + /// Specifies the network profile configuration of the virtual machine. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + /// The provisioning state, which only appears in the response. + /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. + /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + /// Specifies the protection policy of the virtual machine. + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan = null, IEnumerable resources = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, string etag = null, bool? latestModelApplied = null, string vmId = null, VirtualMachineScaleSetVmInstanceView instanceView = null, VirtualMachineHardwareProfile hardwareProfile = null, ResilientVmDeletionStatus? resilientVmDeletionStatus = null, VirtualMachineStorageProfile storageProfile = null, AdditionalCapabilities additionalCapabilities = null, VirtualMachineOSProfile osProfile = null, SecurityProfile securityProfile = null, VirtualMachineNetworkProfile networkProfile = null, IEnumerable networkInterfaceConfigurations = null, BootDiagnostics bootDiagnostics = null, ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, DateTimeOffset? timeCreated = null) + { + return VirtualMachineScaleSetVmData( + id, + name, + resourceType, + systemData, + tags, + location, + instanceId, + sku, + properties: VirtualMachineScaleSetVmProperties( + latestModelApplied, + vmId, + instanceView, + hardwareProfile, + resilientVmDeletionStatus, + storageProfile, + additionalCapabilities, + osProfile, + securityProfile, + networkProfile, + networkInterfaceConfigurations, + bootDiagnostics, + availabilitySetId, + provisioningState, + licenseType, + modelDefinitionApplied, + protectionPolicy, + userData, + timeCreated), + plan, + resources?.ToList(), + zones?.ToList(), + identity, + etag); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The virtual machine instance ID. + /// The virtual machine SKU. + /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + /// The virtual machine child extension resources. + /// The virtual machine zones. + /// The identity of the virtual machine, if configured. + /// Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. + /// Specifies whether the latest model has been applied to the virtual machine. + /// Azure VM unique ID. + /// The virtual machine instance view. + /// Specifies the hardware settings for the virtual machine. + /// Specifies the storage settings for the virtual machine disks. + /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + /// Specifies the operating system settings for the virtual machine. + /// Specifies the Security related profile settings for the virtual machine. + /// Specifies the network interfaces of the virtual machine. + /// Specifies the network profile configuration of the virtual machine. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + /// The provisioning state, which only appears in the response. + /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. + /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + /// Specifies the protection policy of the virtual machine. + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan, IEnumerable resources, IEnumerable zones, ManagedServiceIdentity identity, string etag, bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, IEnumerable networkInterfaceConfigurations, BootDiagnostics bootDiagnostics, ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated) + { + return VirtualMachineScaleSetVmData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, instanceId: instanceId, sku: sku, plan: plan, resources: resources, zones: zones, identity: identity, etag: etag, latestModelApplied: latestModelApplied, vmId: vmId, instanceView: instanceView, hardwareProfile: hardwareProfile, resilientVmDeletionStatus: default, storageProfile: storageProfile, additionalCapabilities: additionalCapabilities, osProfile: osProfile, securityProfile: securityProfile, networkProfile: networkProfile, networkInterfaceConfigurations: networkInterfaceConfigurations, bootDiagnostics: bootDiagnostics, availabilitySetId: availabilitySetId, provisioningState: provisioningState, licenseType: licenseType, modelDefinitionApplied: modelDefinitionApplied, protectionPolicy: protectionPolicy, userData: userData, timeCreated: timeCreated); + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan, IEnumerable resources, IEnumerable zones, ManagedServiceIdentity identity, bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, IEnumerable networkInterfaceConfigurations, BootDiagnostics bootDiagnostics, ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated) + { + return VirtualMachineScaleSetVmData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, instanceId: instanceId, sku: sku, plan: plan, resources: resources, zones: zones, identity: identity, etag: default, latestModelApplied: latestModelApplied, vmId: vmId, instanceView: instanceView, hardwareProfile: hardwareProfile, resilientVmDeletionStatus: default, storageProfile: storageProfile, additionalCapabilities: additionalCapabilities, osProfile: osProfile, securityProfile: securityProfile, networkProfile: networkProfile, networkInterfaceConfigurations: networkInterfaceConfigurations, bootDiagnostics: bootDiagnostics, availabilitySetId: availabilitySetId, provisioningState: provisioningState, licenseType: licenseType, modelDefinitionApplied: modelDefinitionApplied, protectionPolicy: protectionPolicy, userData: userData, timeCreated: timeCreated); + } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Customize/VirtualMachineScaleSetVmData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Customize/VirtualMachineScaleSetVmData.cs new file mode 100644 index 000000000000..234f2b49d9ce --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Customize/VirtualMachineScaleSetVmData.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Compute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Compute +{ + public partial class VirtualMachineScaleSetVmData : TrackedResourceData + { + /// Specifies whether the latest model has been applied to the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool? LatestModelApplied => Properties?.LatestModelApplied; + /// Azure VM unique ID. + [EditorBrowsable(EditorBrowsableState.Never)] + public string VmId => Properties?.VmId; + /// The virtual machine instance view. + [EditorBrowsable(EditorBrowsableState.Never)] + public VirtualMachineScaleSetVmInstanceView InstanceView => Properties?.InstanceView; + /// Specifies the hardware settings for the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public VirtualMachineHardwareProfile HardwareProfile + { + get => Properties?.HardwareProfile; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.HardwareProfile = value; + } + } + /// Specifies the resilient VM deletion status for the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public ResilientVmDeletionStatus? ResilientVmDeletionStatus + { + get => Properties?.ResilientVmDeletionStatus; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.ResilientVmDeletionStatus = value; + } + } + /// Specifies the storage settings for the virtual machine disks. + [EditorBrowsable(EditorBrowsableState.Never)] + public VirtualMachineStorageProfile StorageProfile + { + get => Properties?.StorageProfile; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.StorageProfile = value; + } + } + /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + [EditorBrowsable(EditorBrowsableState.Never)] + public AdditionalCapabilities AdditionalCapabilities + { + get => Properties?.AdditionalCapabilities; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.AdditionalCapabilities = value; + } + } + /// Specifies the operating system settings for the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public VirtualMachineOSProfile OSProfile + { + get => Properties?.OSProfile; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.OSProfile = value; + } + } + /// Specifies the Security related profile settings for the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public SecurityProfile SecurityProfile + { + get => Properties?.SecurityProfile; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.SecurityProfile = value; + } + } + /// Specifies the network interfaces of the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public VirtualMachineNetworkProfile NetworkProfile + { + get => Properties?.NetworkProfile; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.NetworkProfile = value; + } + } + /// The list of network configurations. + [EditorBrowsable(EditorBrowsableState.Never)] + public IList NetworkInterfaceConfigurations => Properties?.NetworkInterfaceConfigurations; + + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + [EditorBrowsable(EditorBrowsableState.Never)] + public BootDiagnostics BootDiagnostics + { + get => Properties?.BootDiagnostics; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.BootDiagnostics = value; + } + } + + /// Gets or sets Id. + [EditorBrowsable(EditorBrowsableState.Never)] + public ResourceIdentifier AvailabilitySetId + { + get => Properties?.AvailabilitySetId; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.AvailabilitySetId = value; + } + } + + /// The provisioning state, which only appears in the response. + [EditorBrowsable(EditorBrowsableState.Never)] + public string ProvisioningState => Properties?.ProvisioningState; + /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. + [EditorBrowsable(EditorBrowsableState.Never)] + public string LicenseType + { + get => Properties?.LicenseType; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.LicenseType = value; + } + } + /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public string ModelDefinitionApplied => Properties?.ModelDefinitionApplied; + /// Specifies the protection policy of the virtual machine. + [EditorBrowsable(EditorBrowsableState.Never)] + public VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy + { + get => Properties?.ProtectionPolicy; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.ProtectionPolicy = value; + } + } + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + [EditorBrowsable(EditorBrowsableState.Never)] + public string UserData + { + get => Properties?.UserData; + set + { + if (Properties == null) + Properties = new VirtualMachineScaleSetVmProperties(); + Properties.UserData = value; + } + } + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. + [EditorBrowsable(EditorBrowsableState.Never)] + public DateTimeOffset? TimeCreated => Properties?.TimeCreated; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs index 7db942270bd3..14b5d7b10faf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ArmComputeModelFactory.cs @@ -646,11 +646,38 @@ public static VirtualMachineScaleSetVmExtensionPatch VirtualMachineScaleSetVmExt /// The location. /// The virtual machine instance ID. /// The virtual machine SKU. + /// Describes the properties of a virtual machine scale set virtual machine. /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. /// The virtual machine child extension resources. /// The virtual machine zones. /// The identity of the virtual machine, if configured. /// Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. + /// A new instance for mocking. + public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string instanceId = null, ComputeSku sku = null, VirtualMachineScaleSetVmProperties properties = null, ComputePlan plan = null, IEnumerable resources = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, string etag = null) + { + tags ??= new Dictionary(); + resources ??= new List(); + zones ??= new List(); + + return new VirtualMachineScaleSetVmData( + id, + name, + resourceType, + systemData, + tags, + location, + instanceId, + sku, + properties, + plan, + resources?.ToList(), + zones?.ToList(), + identity, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// Specifies whether the latest model has been applied to the virtual machine. /// Azure VM unique ID. /// The virtual machine instance view. @@ -670,28 +697,14 @@ public static VirtualMachineScaleSetVmExtensionPatch VirtualMachineScaleSetVmExt /// Specifies the protection policy of the virtual machine. /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. - /// A new instance for mocking. - public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string instanceId = null, ComputeSku sku = null, ComputePlan plan = null, IEnumerable resources = null, IEnumerable zones = null, ManagedServiceIdentity identity = null, string etag = null, bool? latestModelApplied = null, string vmId = null, VirtualMachineScaleSetVmInstanceView instanceView = null, VirtualMachineHardwareProfile hardwareProfile = null, ResilientVmDeletionStatus? resilientVmDeletionStatus = null, VirtualMachineStorageProfile storageProfile = null, AdditionalCapabilities additionalCapabilities = null, VirtualMachineOSProfile osProfile = null, SecurityProfile securityProfile = null, VirtualMachineNetworkProfile networkProfile = null, IEnumerable networkInterfaceConfigurations = null, BootDiagnostics bootDiagnostics = null, ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, DateTimeOffset? timeCreated = null) + /// Additional Properties. + /// A new instance for mocking. + public static VirtualMachineScaleSetVmProperties VirtualMachineScaleSetVmProperties(bool? latestModelApplied = null, string vmId = null, VirtualMachineScaleSetVmInstanceView instanceView = null, VirtualMachineHardwareProfile hardwareProfile = null, ResilientVmDeletionStatus? resilientVmDeletionStatus = null, VirtualMachineStorageProfile storageProfile = null, AdditionalCapabilities additionalCapabilities = null, VirtualMachineOSProfile osProfile = null, SecurityProfile securityProfile = null, VirtualMachineNetworkProfile networkProfile = null, IEnumerable networkInterfaceConfigurations = null, BootDiagnostics bootDiagnostics = null, ResourceIdentifier availabilitySetId = null, string provisioningState = null, string licenseType = null, string modelDefinitionApplied = null, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = null, string userData = null, DateTimeOffset? timeCreated = null, IDictionary additionalProperties = null) { - tags ??= new Dictionary(); - resources ??= new List(); - zones ??= new List(); networkInterfaceConfigurations ??= new List(); + additionalProperties ??= new Dictionary(); - return new VirtualMachineScaleSetVmData( - id, - name, - resourceType, - systemData, - tags, - location, - instanceId, - sku, - plan, - resources?.ToList(), - zones?.ToList(), - identity, - etag, + return new VirtualMachineScaleSetVmProperties( latestModelApplied, vmId, instanceView, @@ -711,7 +724,7 @@ public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(Resource protectionPolicy, userData, timeCreated, - serializedAdditionalRawData: null); + additionalProperties); } /// Initializes a new instance of . @@ -4482,45 +4495,6 @@ public static OSVersionPropertiesBase OSVersionPropertiesBase(string version = n return new OSVersionPropertiesBase(version, label, isDefault, isActive, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The virtual machine instance ID. - /// The virtual machine SKU. - /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. - /// The virtual machine child extension resources. - /// The virtual machine zones. - /// The identity of the virtual machine, if configured. - /// Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. - /// Specifies whether the latest model has been applied to the virtual machine. - /// Azure VM unique ID. - /// The virtual machine instance view. - /// Specifies the hardware settings for the virtual machine. - /// Specifies the storage settings for the virtual machine disks. - /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. - /// Specifies the operating system settings for the virtual machine. - /// Specifies the Security related profile settings for the virtual machine. - /// Specifies the network interfaces of the virtual machine. - /// Specifies the network profile configuration of the virtual machine. - /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. - /// The provisioning state, which only appears in the response. - /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. - /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. - /// Specifies the protection policy of the virtual machine. - /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. - /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static VirtualMachineScaleSetVmData VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan, IEnumerable resources, IEnumerable zones, ManagedServiceIdentity identity, string etag, bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, IEnumerable networkInterfaceConfigurations, BootDiagnostics bootDiagnostics, ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated) - { - return VirtualMachineScaleSetVmData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, instanceId: instanceId, sku: sku, plan: plan, resources: resources, zones: zones, identity: identity, etag: etag, latestModelApplied: latestModelApplied, vmId: vmId, instanceView: instanceView, hardwareProfile: hardwareProfile, resilientVmDeletionStatus: default, storageProfile: storageProfile, additionalCapabilities: additionalCapabilities, osProfile: osProfile, securityProfile: securityProfile, networkProfile: networkProfile, networkInterfaceConfigurations: networkInterfaceConfigurations, bootDiagnostics: bootDiagnostics, availabilitySetId: availabilitySetId, provisioningState: provisioningState, licenseType: licenseType, modelDefinitionApplied: modelDefinitionApplied, protectionPolicy: protectionPolicy, userData: userData, timeCreated: timeCreated); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -4606,12 +4580,6 @@ public static AvailabilitySetPatch AvailabilitySetPatch(IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan, IEnumerable resources, IEnumerable zones, ManagedServiceIdentity identity, bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, IEnumerable networkInterfaceConfigurations, BootDiagnostics bootDiagnostics, ResourceIdentifier availabilitySetId, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated) - { - return VirtualMachineScaleSetVmData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, instanceId: instanceId, sku: sku, plan: plan, resources: resources, zones: zones, identity: identity, etag: default, latestModelApplied: latestModelApplied, vmId: vmId, instanceView: instanceView, hardwareProfile: hardwareProfile, resilientVmDeletionStatus: default, storageProfile: storageProfile, additionalCapabilities: additionalCapabilities, osProfile: osProfile, securityProfile: securityProfile, networkProfile: networkProfile, networkInterfaceConfigurations: networkInterfaceConfigurations, bootDiagnostics: bootDiagnostics, availabilitySetId: availabilitySetId, provisioningState: provisioningState, licenseType: licenseType, modelDefinitionApplied: modelDefinitionApplied, protectionPolicy: protectionPolicy, userData: userData, timeCreated: timeCreated); - } - [EditorBrowsable(EditorBrowsableState.Never)] public static VirtualMachineData VirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ComputePlan plan, IEnumerable resources, ManagedServiceIdentity identity, IEnumerable zones, ExtendedLocation extendedLocation, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, VirtualMachineNetworkProfile networkProfile, SecurityProfile securityProfile, BootDiagnostics bootDiagnostics, ResourceIdentifier availabilitySetId, ResourceIdentifier virtualMachineScaleSetId, ResourceIdentifier proximityPlacementGroupId, VirtualMachinePriorityType? priority, VirtualMachineEvictionPolicyType? evictionPolicy, double? billingMaxPrice, ResourceIdentifier hostId, ResourceIdentifier hostGroupId, string provisioningState, VirtualMachineInstanceView instanceView, string licenseType, string vmId, string extensionsTimeBudget, int? platformFaultDomain, ComputeScheduledEventsProfile scheduledEventsProfile, string userData, ResourceIdentifier capacityReservationGroupId, IEnumerable galleryApplications, DateTimeOffset? timeCreated) { diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProperties.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProperties.Serialization.cs new file mode 100644 index 000000000000..23f557db2b16 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProperties.Serialization.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + public partial class VirtualMachineScaleSetVmProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(LatestModelApplied)) + { + writer.WritePropertyName("latestModelApplied"u8); + writer.WriteBooleanValue(LatestModelApplied.Value); + } + if (options.Format != "W" && Optional.IsDefined(VmId)) + { + writer.WritePropertyName("vmId"u8); + writer.WriteStringValue(VmId); + } + if (options.Format != "W" && Optional.IsDefined(InstanceView)) + { + writer.WritePropertyName("instanceView"u8); + writer.WriteObjectValue(InstanceView, options); + } + if (Optional.IsDefined(HardwareProfile)) + { + writer.WritePropertyName("hardwareProfile"u8); + writer.WriteObjectValue(HardwareProfile, options); + } + if (Optional.IsDefined(ResilientVmDeletionStatus)) + { + writer.WritePropertyName("resilientVMDeletionStatus"u8); + writer.WriteStringValue(ResilientVmDeletionStatus.Value.ToString()); + } + if (Optional.IsDefined(StorageProfile)) + { + writer.WritePropertyName("storageProfile"u8); + writer.WriteObjectValue(StorageProfile, options); + } + if (Optional.IsDefined(AdditionalCapabilities)) + { + writer.WritePropertyName("additionalCapabilities"u8); + writer.WriteObjectValue(AdditionalCapabilities, options); + } + if (Optional.IsDefined(OSProfile)) + { + writer.WritePropertyName("osProfile"u8); + writer.WriteObjectValue(OSProfile, options); + } + if (Optional.IsDefined(SecurityProfile)) + { + writer.WritePropertyName("securityProfile"u8); + writer.WriteObjectValue(SecurityProfile, options); + } + if (Optional.IsDefined(NetworkProfile)) + { + writer.WritePropertyName("networkProfile"u8); + writer.WriteObjectValue(NetworkProfile, options); + } + if (Optional.IsDefined(NetworkProfileConfiguration)) + { + writer.WritePropertyName("networkProfileConfiguration"u8); + writer.WriteObjectValue(NetworkProfileConfiguration, options); + } + if (Optional.IsDefined(DiagnosticsProfile)) + { + writer.WritePropertyName("diagnosticsProfile"u8); + writer.WriteObjectValue(DiagnosticsProfile, options); + } + if (Optional.IsDefined(AvailabilitySet)) + { + writer.WritePropertyName("availabilitySet"u8); + JsonSerializer.Serialize(writer, AvailabilitySet); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsDefined(LicenseType)) + { + writer.WritePropertyName("licenseType"u8); + writer.WriteStringValue(LicenseType); + } + if (options.Format != "W" && Optional.IsDefined(ModelDefinitionApplied)) + { + writer.WritePropertyName("modelDefinitionApplied"u8); + writer.WriteStringValue(ModelDefinitionApplied); + } + if (Optional.IsDefined(ProtectionPolicy)) + { + writer.WritePropertyName("protectionPolicy"u8); + writer.WriteObjectValue(ProtectionPolicy, options); + } + if (Optional.IsDefined(UserData)) + { + writer.WritePropertyName("userData"u8); + writer.WriteStringValue(UserData); + } + if (options.Format != "W" && Optional.IsDefined(TimeCreated)) + { + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated.Value, "O"); + } + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + + VirtualMachineScaleSetVmProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineScaleSetVmProperties(document.RootElement, options); + } + + internal static VirtualMachineScaleSetVmProperties DeserializeVirtualMachineScaleSetVmProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? latestModelApplied = default; + string vmId = default; + VirtualMachineScaleSetVmInstanceView instanceView = default; + VirtualMachineHardwareProfile hardwareProfile = default; + ResilientVmDeletionStatus? resilientVmDeletionStatus = default; + VirtualMachineStorageProfile storageProfile = default; + AdditionalCapabilities additionalCapabilities = default; + VirtualMachineOSProfile osProfile = default; + SecurityProfile securityProfile = default; + VirtualMachineNetworkProfile networkProfile = default; + VirtualMachineScaleSetVmNetworkProfileConfiguration networkProfileConfiguration = default; + DiagnosticsProfile diagnosticsProfile = default; + WritableSubResource availabilitySet = default; + string provisioningState = default; + string licenseType = default; + string modelDefinitionApplied = default; + VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = default; + string userData = default; + DateTimeOffset? timeCreated = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("latestModelApplied"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + latestModelApplied = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("vmId"u8)) + { + vmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceView"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceView = VirtualMachineScaleSetVmInstanceView.DeserializeVirtualMachineScaleSetVmInstanceView(property.Value, options); + continue; + } + if (property.NameEquals("hardwareProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hardwareProfile = VirtualMachineHardwareProfile.DeserializeVirtualMachineHardwareProfile(property.Value, options); + continue; + } + if (property.NameEquals("resilientVMDeletionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resilientVmDeletionStatus = new ResilientVmDeletionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageProfile = VirtualMachineStorageProfile.DeserializeVirtualMachineStorageProfile(property.Value, options); + continue; + } + if (property.NameEquals("additionalCapabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalCapabilities = AdditionalCapabilities.DeserializeAdditionalCapabilities(property.Value, options); + continue; + } + if (property.NameEquals("osProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osProfile = VirtualMachineOSProfile.DeserializeVirtualMachineOSProfile(property.Value, options); + continue; + } + if (property.NameEquals("securityProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityProfile = SecurityProfile.DeserializeSecurityProfile(property.Value, options); + continue; + } + if (property.NameEquals("networkProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkProfile = VirtualMachineNetworkProfile.DeserializeVirtualMachineNetworkProfile(property.Value, options); + continue; + } + if (property.NameEquals("networkProfileConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkProfileConfiguration = VirtualMachineScaleSetVmNetworkProfileConfiguration.DeserializeVirtualMachineScaleSetVmNetworkProfileConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("diagnosticsProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diagnosticsProfile = DiagnosticsProfile.DeserializeDiagnosticsProfile(property.Value, options); + continue; + } + if (property.NameEquals("availabilitySet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilitySet = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + provisioningState = property.Value.GetString(); + continue; + } + if (property.NameEquals("licenseType"u8)) + { + licenseType = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelDefinitionApplied"u8)) + { + modelDefinitionApplied = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionPolicy = VirtualMachineScaleSetVmProtectionPolicy.DeserializeVirtualMachineScaleSetVmProtectionPolicy(property.Value, options); + continue; + } + if (property.NameEquals("userData"u8)) + { + userData = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + additionalProperties = additionalPropertiesDictionary; + return new VirtualMachineScaleSetVmProperties( + latestModelApplied, + vmId, + instanceView, + hardwareProfile, + resilientVmDeletionStatus, + storageProfile, + additionalCapabilities, + osProfile, + securityProfile, + networkProfile, + networkProfileConfiguration, + diagnosticsProfile, + availabilitySet, + provisioningState, + licenseType, + modelDefinitionApplied, + protectionPolicy, + userData, + timeCreated, + additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerComputeContext.Default); + default: + throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmProperties)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineScaleSetVmProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualMachineScaleSetVmProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineScaleSetVmProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProperties.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProperties.cs new file mode 100644 index 000000000000..eaba1d65eb25 --- /dev/null +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/Models/VirtualMachineScaleSetVmProperties.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Compute.Models +{ + /// Describes the properties of a virtual machine scale set virtual machine. + public partial class VirtualMachineScaleSetVmProperties + { + /// Initializes a new instance of . + public VirtualMachineScaleSetVmProperties() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Specifies whether the latest model has been applied to the virtual machine. + /// Azure VM unique ID. + /// The virtual machine instance view. + /// Specifies the hardware settings for the virtual machine. + /// Specifies the resilient VM deletion status for the virtual machine. + /// Specifies the storage settings for the virtual machine disks. + /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + /// Specifies the operating system settings for the virtual machine. + /// Specifies the Security related profile settings for the virtual machine. + /// Specifies the network interfaces of the virtual machine. + /// Specifies the network profile configuration of the virtual machine. + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + /// The provisioning state, which only appears in the response. + /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. + /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + /// Specifies the protection policy of the virtual machine. + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. + /// Additional Properties. + internal VirtualMachineScaleSetVmProperties(bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, ResilientVmDeletionStatus? resilientVmDeletionStatus, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, VirtualMachineScaleSetVmNetworkProfileConfiguration networkProfileConfiguration, DiagnosticsProfile diagnosticsProfile, WritableSubResource availabilitySet, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated, IDictionary additionalProperties) + { + LatestModelApplied = latestModelApplied; + VmId = vmId; + InstanceView = instanceView; + HardwareProfile = hardwareProfile; + ResilientVmDeletionStatus = resilientVmDeletionStatus; + StorageProfile = storageProfile; + AdditionalCapabilities = additionalCapabilities; + OSProfile = osProfile; + SecurityProfile = securityProfile; + NetworkProfile = networkProfile; + NetworkProfileConfiguration = networkProfileConfiguration; + DiagnosticsProfile = diagnosticsProfile; + AvailabilitySet = availabilitySet; + ProvisioningState = provisioningState; + LicenseType = licenseType; + ModelDefinitionApplied = modelDefinitionApplied; + ProtectionPolicy = protectionPolicy; + UserData = userData; + TimeCreated = timeCreated; + AdditionalProperties = additionalProperties; + } + + /// Specifies whether the latest model has been applied to the virtual machine. + public bool? LatestModelApplied { get; } + /// Azure VM unique ID. + public string VmId { get; } + /// The virtual machine instance view. + public VirtualMachineScaleSetVmInstanceView InstanceView { get; } + /// Specifies the hardware settings for the virtual machine. + public VirtualMachineHardwareProfile HardwareProfile { get; set; } + /// Specifies the resilient VM deletion status for the virtual machine. + public ResilientVmDeletionStatus? ResilientVmDeletionStatus { get; set; } + /// Specifies the storage settings for the virtual machine disks. + public VirtualMachineStorageProfile StorageProfile { get; set; } + /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + public AdditionalCapabilities AdditionalCapabilities { get; set; } + /// Specifies the operating system settings for the virtual machine. + public VirtualMachineOSProfile OSProfile { get; set; } + /// Specifies the Security related profile settings for the virtual machine. + public SecurityProfile SecurityProfile { get; set; } + /// Specifies the network interfaces of the virtual machine. + public VirtualMachineNetworkProfile NetworkProfile { get; set; } + /// Specifies the network profile configuration of the virtual machine. + internal VirtualMachineScaleSetVmNetworkProfileConfiguration NetworkProfileConfiguration { get; set; } + /// The list of network configurations. + public IList NetworkInterfaceConfigurations + { + get + { + if (NetworkProfileConfiguration is null) + NetworkProfileConfiguration = new VirtualMachineScaleSetVmNetworkProfileConfiguration(); + return NetworkProfileConfiguration.NetworkInterfaceConfigurations; + } + } + + /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + internal DiagnosticsProfile DiagnosticsProfile { get; set; } + /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + public BootDiagnostics BootDiagnostics + { + get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; + set + { + if (DiagnosticsProfile is null) + DiagnosticsProfile = new DiagnosticsProfile(); + DiagnosticsProfile.BootDiagnostics = value; + } + } + + /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + internal WritableSubResource AvailabilitySet { get; set; } + /// Gets or sets Id. + public ResourceIdentifier AvailabilitySetId + { + get => AvailabilitySet is null ? default : AvailabilitySet.Id; + set + { + if (AvailabilitySet is null) + AvailabilitySet = new WritableSubResource(); + AvailabilitySet.Id = value; + } + } + + /// The provisioning state, which only appears in the response. + public string ProvisioningState { get; } + /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. + public string LicenseType { get; set; } + /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + public string ModelDefinitionApplied { get; } + /// Specifies the protection policy of the virtual machine. + public VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get; set; } + /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + public string UserData { get; set; } + /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. + public DateTimeOffset? TimeCreated { get; } + /// + /// Additional Properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary AdditionalProperties { get; } + } +} diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs index 087f906457c3..53da3ebb7f6a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.Serialization.cs @@ -12,7 +12,6 @@ using Azure.Core; using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute { @@ -48,6 +47,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } if (Optional.IsDefined(Plan)) { writer.WritePropertyName("plan"u8); @@ -83,104 +87,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(LatestModelApplied)) - { - writer.WritePropertyName("latestModelApplied"u8); - writer.WriteBooleanValue(LatestModelApplied.Value); - } - if (options.Format != "W" && Optional.IsDefined(VmId)) - { - writer.WritePropertyName("vmId"u8); - writer.WriteStringValue(VmId); - } - if (options.Format != "W" && Optional.IsDefined(InstanceView)) - { - writer.WritePropertyName("instanceView"u8); - writer.WriteObjectValue(InstanceView, options); - } - if (Optional.IsDefined(HardwareProfile)) - { - writer.WritePropertyName("hardwareProfile"u8); - writer.WriteObjectValue(HardwareProfile, options); - } - if (Optional.IsDefined(ResilientVmDeletionStatus)) - { - writer.WritePropertyName("resilientVMDeletionStatus"u8); - writer.WriteStringValue(ResilientVmDeletionStatus.Value.ToString()); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile, options); - } - if (Optional.IsDefined(AdditionalCapabilities)) - { - writer.WritePropertyName("additionalCapabilities"u8); - writer.WriteObjectValue(AdditionalCapabilities, options); - } - if (Optional.IsDefined(OSProfile)) - { - writer.WritePropertyName("osProfile"u8); - writer.WriteObjectValue(OSProfile, options); - } - if (Optional.IsDefined(SecurityProfile)) - { - writer.WritePropertyName("securityProfile"u8); - writer.WriteObjectValue(SecurityProfile, options); - } - if (Optional.IsDefined(NetworkProfile)) - { - writer.WritePropertyName("networkProfile"u8); - writer.WriteObjectValue(NetworkProfile, options); - } - if (Optional.IsDefined(NetworkProfileConfiguration)) - { - writer.WritePropertyName("networkProfileConfiguration"u8); - writer.WriteObjectValue(NetworkProfileConfiguration, options); - } - if (Optional.IsDefined(DiagnosticsProfile)) - { - writer.WritePropertyName("diagnosticsProfile"u8); - writer.WriteObjectValue(DiagnosticsProfile, options); - } - if (Optional.IsDefined(AvailabilitySet)) - { - writer.WritePropertyName("availabilitySet"u8); - JsonSerializer.Serialize(writer, AvailabilitySet); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - if (Optional.IsDefined(LicenseType)) - { - writer.WritePropertyName("licenseType"u8); - writer.WriteStringValue(LicenseType); - } - if (options.Format != "W" && Optional.IsDefined(ModelDefinitionApplied)) - { - writer.WritePropertyName("modelDefinitionApplied"u8); - writer.WriteStringValue(ModelDefinitionApplied); - } - if (Optional.IsDefined(ProtectionPolicy)) - { - writer.WritePropertyName("protectionPolicy"u8); - writer.WriteObjectValue(ProtectionPolicy, options); - } - if (Optional.IsDefined(UserData)) - { - writer.WritePropertyName("userData"u8); - writer.WriteStringValue(UserData); - } - if (options.Format != "W" && Optional.IsDefined(TimeCreated)) - { - writer.WritePropertyName("timeCreated"u8); - writer.WriteStringValue(TimeCreated.Value, "O"); - } - writer.WriteEndObject(); } VirtualMachineScaleSetVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -205,6 +111,7 @@ internal static VirtualMachineScaleSetVmData DeserializeVirtualMachineScaleSetVm } string instanceId = default; ComputeSku sku = default; + VirtualMachineScaleSetVmProperties properties = default; ComputePlan plan = default; IReadOnlyList resources = default; IReadOnlyList zones = default; @@ -216,25 +123,6 @@ internal static VirtualMachineScaleSetVmData DeserializeVirtualMachineScaleSetVm string name = default; ResourceType type = default; SystemData systemData = default; - bool? latestModelApplied = default; - string vmId = default; - VirtualMachineScaleSetVmInstanceView instanceView = default; - VirtualMachineHardwareProfile hardwareProfile = default; - ResilientVmDeletionStatus? resilientVmDeletionStatus = default; - VirtualMachineStorageProfile storageProfile = default; - AdditionalCapabilities additionalCapabilities = default; - VirtualMachineOSProfile osProfile = default; - SecurityProfile securityProfile = default; - VirtualMachineNetworkProfile networkProfile = default; - VirtualMachineScaleSetVmNetworkProfileConfiguration networkProfileConfiguration = default; - DiagnosticsProfile diagnosticsProfile = default; - WritableSubResource availabilitySet = default; - string provisioningState = default; - string licenseType = default; - string modelDefinitionApplied = default; - VirtualMachineScaleSetVmProtectionPolicy protectionPolicy = default; - string userData = default; - DateTimeOffset? timeCreated = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -253,6 +141,15 @@ internal static VirtualMachineScaleSetVmData DeserializeVirtualMachineScaleSetVm sku = ComputeSku.DeserializeComputeSku(property.Value, options); continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = VirtualMachineScaleSetVmProperties.DeserializeVirtualMachineScaleSetVmProperties(property.Value, options); + continue; + } if (property.NameEquals("plan"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -347,169 +244,6 @@ internal static VirtualMachineScaleSetVmData DeserializeVirtualMachineScaleSetVm systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("latestModelApplied"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - latestModelApplied = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("vmId"u8)) - { - vmId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("instanceView"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - instanceView = VirtualMachineScaleSetVmInstanceView.DeserializeVirtualMachineScaleSetVmInstanceView(property0.Value, options); - continue; - } - if (property0.NameEquals("hardwareProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hardwareProfile = VirtualMachineHardwareProfile.DeserializeVirtualMachineHardwareProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("resilientVMDeletionStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resilientVmDeletionStatus = new ResilientVmDeletionStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("storageProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageProfile = VirtualMachineStorageProfile.DeserializeVirtualMachineStorageProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("additionalCapabilities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - additionalCapabilities = AdditionalCapabilities.DeserializeAdditionalCapabilities(property0.Value, options); - continue; - } - if (property0.NameEquals("osProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - osProfile = VirtualMachineOSProfile.DeserializeVirtualMachineOSProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("securityProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - securityProfile = SecurityProfile.DeserializeSecurityProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("networkProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - networkProfile = VirtualMachineNetworkProfile.DeserializeVirtualMachineNetworkProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("networkProfileConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - networkProfileConfiguration = VirtualMachineScaleSetVmNetworkProfileConfiguration.DeserializeVirtualMachineScaleSetVmNetworkProfileConfiguration(property0.Value, options); - continue; - } - if (property0.NameEquals("diagnosticsProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diagnosticsProfile = DiagnosticsProfile.DeserializeDiagnosticsProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("availabilitySet"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - availabilitySet = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("licenseType"u8)) - { - licenseType = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("modelDefinitionApplied"u8)) - { - modelDefinitionApplied = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("protectionPolicy"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - protectionPolicy = VirtualMachineScaleSetVmProtectionPolicy.DeserializeVirtualMachineScaleSetVmProtectionPolicy(property0.Value, options); - continue; - } - if (property0.NameEquals("userData"u8)) - { - userData = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("timeCreated"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeCreated = property0.Value.GetDateTimeOffset("O"); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -525,30 +259,12 @@ internal static VirtualMachineScaleSetVmData DeserializeVirtualMachineScaleSetVm location, instanceId, sku, + properties, plan, resources ?? new ChangeTrackingList(), zones ?? new ChangeTrackingList(), identity, etag, - latestModelApplied, - vmId, - instanceView, - hardwareProfile, - resilientVmDeletionStatus, - storageProfile, - additionalCapabilities, - osProfile, - securityProfile, - networkProfile, - networkProfileConfiguration, - diagnosticsProfile, - availabilitySet, - provisioningState, - licenseType, - modelDefinitionApplied, - protectionPolicy, - userData, - timeCreated, serializedAdditionalRawData); } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs index 2fe9b2e029bc..5c8cdc391f76 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmData.cs @@ -10,7 +10,6 @@ using Azure.Core; using Azure.ResourceManager.Compute.Models; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Compute { @@ -69,59 +68,23 @@ public VirtualMachineScaleSetVmData(AzureLocation location) : base(location) /// The location. /// The virtual machine instance ID. /// The virtual machine SKU. + /// Describes the properties of a virtual machine scale set virtual machine. /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. /// The virtual machine child extension resources. /// The virtual machine zones. /// The identity of the virtual machine, if configured. /// Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. - /// Specifies whether the latest model has been applied to the virtual machine. - /// Azure VM unique ID. - /// The virtual machine instance view. - /// Specifies the hardware settings for the virtual machine. - /// Specifies the resilient VM deletion status for the virtual machine. - /// Specifies the storage settings for the virtual machine disks. - /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. - /// Specifies the operating system settings for the virtual machine. - /// Specifies the Security related profile settings for the virtual machine. - /// Specifies the network interfaces of the virtual machine. - /// Specifies the network profile configuration of the virtual machine. - /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. - /// The provisioning state, which only appears in the response. - /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. - /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. - /// Specifies the protection policy of the virtual machine. - /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. - /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. /// Keeps track of any properties unknown to the library. - internal VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan, IReadOnlyList resources, IReadOnlyList zones, ManagedServiceIdentity identity, string etag, bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, ResilientVmDeletionStatus? resilientVmDeletionStatus, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, VirtualMachineScaleSetVmNetworkProfileConfiguration networkProfileConfiguration, DiagnosticsProfile diagnosticsProfile, WritableSubResource availabilitySet, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceId, ComputeSku sku, VirtualMachineScaleSetVmProperties properties, ComputePlan plan, IReadOnlyList resources, IReadOnlyList zones, ManagedServiceIdentity identity, string etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { InstanceId = instanceId; Sku = sku; + Properties = properties; Plan = plan; Resources = resources; Zones = zones; Identity = identity; ETag = etag; - LatestModelApplied = latestModelApplied; - VmId = vmId; - InstanceView = instanceView; - HardwareProfile = hardwareProfile; - ResilientVmDeletionStatus = resilientVmDeletionStatus; - StorageProfile = storageProfile; - AdditionalCapabilities = additionalCapabilities; - OSProfile = osProfile; - SecurityProfile = securityProfile; - NetworkProfile = networkProfile; - NetworkProfileConfiguration = networkProfileConfiguration; - DiagnosticsProfile = diagnosticsProfile; - AvailabilitySet = availabilitySet; - ProvisioningState = provisioningState; - LicenseType = licenseType; - ModelDefinitionApplied = modelDefinitionApplied; - ProtectionPolicy = protectionPolicy; - UserData = userData; - TimeCreated = timeCreated; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -134,6 +97,8 @@ internal VirtualMachineScaleSetVmData() public string InstanceId { get; } /// The virtual machine SKU. public ComputeSku Sku { get; } + /// Describes the properties of a virtual machine scale set virtual machine. + public VirtualMachineScaleSetVmProperties Properties { get; set; } /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. public ComputePlan Plan { get; set; } /// The virtual machine child extension resources. @@ -144,78 +109,5 @@ internal VirtualMachineScaleSetVmData() public ManagedServiceIdentity Identity { get; set; } /// Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. public string ETag { get; } - /// Specifies whether the latest model has been applied to the virtual machine. - public bool? LatestModelApplied { get; } - /// Azure VM unique ID. - public string VmId { get; } - /// The virtual machine instance view. - public VirtualMachineScaleSetVmInstanceView InstanceView { get; } - /// Specifies the hardware settings for the virtual machine. - public VirtualMachineHardwareProfile HardwareProfile { get; set; } - /// Specifies the resilient VM deletion status for the virtual machine. - public ResilientVmDeletionStatus? ResilientVmDeletionStatus { get; set; } - /// Specifies the storage settings for the virtual machine disks. - public VirtualMachineStorageProfile StorageProfile { get; set; } - /// Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. - public AdditionalCapabilities AdditionalCapabilities { get; set; } - /// Specifies the operating system settings for the virtual machine. - public VirtualMachineOSProfile OSProfile { get; set; } - /// Specifies the Security related profile settings for the virtual machine. - public SecurityProfile SecurityProfile { get; set; } - /// Specifies the network interfaces of the virtual machine. - public VirtualMachineNetworkProfile NetworkProfile { get; set; } - /// Specifies the network profile configuration of the virtual machine. - internal VirtualMachineScaleSetVmNetworkProfileConfiguration NetworkProfileConfiguration { get; set; } - /// The list of network configurations. - public IList NetworkInterfaceConfigurations - { - get - { - if (NetworkProfileConfiguration is null) - NetworkProfileConfiguration = new VirtualMachineScaleSetVmNetworkProfileConfiguration(); - return NetworkProfileConfiguration.NetworkInterfaceConfigurations; - } - } - - /// Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. - internal DiagnosticsProfile DiagnosticsProfile { get; set; } - /// Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. - public BootDiagnostics BootDiagnostics - { - get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics; - set - { - if (DiagnosticsProfile is null) - DiagnosticsProfile = new DiagnosticsProfile(); - DiagnosticsProfile.BootDiagnostics = value; - } - } - - /// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. - internal WritableSubResource AvailabilitySet { get; set; } - /// Gets or sets Id. - public ResourceIdentifier AvailabilitySetId - { - get => AvailabilitySet is null ? default : AvailabilitySet.Id; - set - { - if (AvailabilitySet is null) - AvailabilitySet = new WritableSubResource(); - AvailabilitySet.Id = value; - } - } - - /// The provisioning state, which only appears in the response. - public string ProvisioningState { get; } - /// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15. - public string LicenseType { get; set; } - /// Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. - public string ModelDefinitionApplied { get; } - /// Specifies the protection policy of the virtual machine. - public VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get; set; } - /// UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. - public string UserData { get; set; } - /// Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. - public DateTimeOffset? TimeCreated { get; } } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md index 1366fb3e33ff..7d24c147de19 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md +++ b/sdk/compute/Azure.ResourceManager.Compute/src/autorest.md @@ -306,7 +306,7 @@ rename-mapping: Modes: HostEndpointSettingsMode Expand: GetVirtualMachineImagesWithPropertiesExpand RebalanceBehavior: VmssRebalanceBehavior - RebalanceStrategy: VmssRebalanceStrategy + RebalanceStrategy: VmssRebalanceStrategy directive: # copy the systemData from common-types here so that it will be automatically replaced @@ -424,6 +424,8 @@ directive: $.VirtualMachineScaleSetProperties.additionalProperties = true; $.VirtualMachineScaleSet.properties.properties["x-ms-client-flatten"] = false; $.VirtualMachineScaleSetUpdate.properties.properties["x-ms-client-flatten"] = false; + $.VirtualMachineScaleSetVM.properties.properties["x-ms-client-flatten"] = false; + $.VirtualMachineScaleSetVMProperties.additionalProperties = true; $.UpgradePolicy.additionalProperties = true; - from: computeRPCommon.json where: $.definitions.VMSizeProperties diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmCollection.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmCollection.cs index f900e37965eb..208c10d85a04 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmCollection.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmCollection.cs @@ -44,68 +44,63 @@ public async Task CreateOrUpdate_VirtualMachineScaleSetVMUpdateMaximumSetGen() string instanceId = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; VirtualMachineScaleSetVmData data = new VirtualMachineScaleSetVmData(new AzureLocation("westus")) { - Plan = new ComputePlan - { - Name = "aaaaaaaaaa", - Publisher = "aaaaaaaaaaaaaaaaaaaaaa", - Product = "aaaaaaaaaaaaaaaaaaaa", - PromotionCode = "aaaaaaaaaaaaaaaaaaaa", - }, - HardwareProfile = new VirtualMachineHardwareProfile + Properties = new VirtualMachineScaleSetVmProperties { - VmSize = VirtualMachineSizeType.BasicA0, - VmSizeProperties = new VirtualMachineSizeProperties + HardwareProfile = new VirtualMachineHardwareProfile { - VCpusAvailable = 9, - VCpusPerCore = 12, - }, - }, - StorageProfile = new VirtualMachineStorageProfile - { - ImageReference = new ImageReference - { - Publisher = "MicrosoftWindowsServer", - Offer = "WindowsServer", - Sku = "2012-R2-Datacenter", - Version = "4.127.20180315", - SharedGalleryImageUniqueId = "aaaaaaaaaaaaaaaaaaaa", - Id = new ResourceIdentifier("a"), - }, - OSDisk = new VirtualMachineOSDisk(DiskCreateOptionType.FromImage) - { - OSType = SupportedOperatingSystemType.Windows, - EncryptionSettings = new DiskEncryptionSettings + VmSize = VirtualMachineSizeType.BasicA0, + VmSizeProperties = new VirtualMachineSizeProperties { - DiskEncryptionKey = new KeyVaultSecretReference(new Uri("aaaaaaaa"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), - }), - KeyEncryptionKey = new KeyVaultKeyReference(new Uri("aaaaaaaaaaaaaa"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), - }), - Enabled = true, + VCpusAvailable = 9, + VCpusPerCore = 12, }, - Name = "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", - VhdUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), - ImageUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), - Caching = CachingType.None, - WriteAcceleratorEnabled = true, - DiffDiskSettings = new DiffDiskSettings + }, + StorageProfile = new VirtualMachineStorageProfile + { + ImageReference = new ImageReference { - Option = DiffDiskOption.Local, - Placement = DiffDiskPlacement.CacheDisk, + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2012-R2-Datacenter", + Version = "4.127.20180315", + SharedGalleryImageUniqueId = "aaaaaaaaaaaaaaaaaaaa", + Id = new ResourceIdentifier("a"), }, - DiskSizeGB = 127, - ManagedDisk = new VirtualMachineManagedDisk + OSDisk = new VirtualMachineOSDisk(DiskCreateOptionType.FromImage) { - StorageAccountType = StorageAccountType.StandardLrs, - DiskEncryptionSetId = new ResourceIdentifier("aaaaaaaaaaaa"), - Id = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc"), + OSType = SupportedOperatingSystemType.Windows, + EncryptionSettings = new DiskEncryptionSettings + { + DiskEncryptionKey = new KeyVaultSecretReference(new Uri("aaaaaaaa"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), + }), + KeyEncryptionKey = new KeyVaultKeyReference(new Uri("aaaaaaaaaaaaaa"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), + }), + Enabled = true, + }, + Name = "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + VhdUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), + ImageUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), + Caching = CachingType.None, + WriteAcceleratorEnabled = true, + DiffDiskSettings = new DiffDiskSettings + { + Option = DiffDiskOption.Local, + Placement = DiffDiskPlacement.CacheDisk, + }, + DiskSizeGB = 127, + ManagedDisk = new VirtualMachineManagedDisk + { + StorageAccountType = StorageAccountType.StandardLrs, + DiskEncryptionSetId = new ResourceIdentifier("aaaaaaaaaaaa"), + Id = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc"), + }, + DeleteOption = DiskDeleteOptionType.Delete, }, - DeleteOption = DiskDeleteOptionType.Delete, - }, - DataDisks = {new VirtualMachineDataDisk(1, DiskCreateOptionType.Empty) + DataDisks = {new VirtualMachineDataDisk(1, DiskCreateOptionType.Empty) { Name = "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", VhdUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), @@ -123,81 +118,81 @@ public async Task CreateOrUpdate_VirtualMachineScaleSetVMUpdateMaximumSetGen() DetachOption = DiskDetachOptionType.ForceDetach, DeleteOption = DiskDeleteOptionType.Delete, }}, - }, - AdditionalCapabilities = new AdditionalCapabilities - { - UltraSsdEnabled = true, - HibernationEnabled = true, - }, - OSProfile = new VirtualMachineOSProfile - { - ComputerName = "test000000", - AdminUsername = "Foo12", - AdminPassword = "aaaaaaaaaaaaaaaa", - CustomData = "aaaa", - WindowsConfiguration = new WindowsConfiguration + }, + AdditionalCapabilities = new AdditionalCapabilities { - ProvisionVmAgent = true, - IsAutomaticUpdatesEnabled = true, - TimeZone = "aaaaaaaaaaaaaaaaaaaaaaaaaaa", - AdditionalUnattendContent = {new AdditionalUnattendContent + UltraSsdEnabled = true, + HibernationEnabled = true, + }, + OSProfile = new VirtualMachineOSProfile + { + ComputerName = "test000000", + AdminUsername = "Foo12", + AdminPassword = "aaaaaaaaaaaaaaaa", + CustomData = "aaaa", + WindowsConfiguration = new WindowsConfiguration + { + ProvisionVmAgent = true, + IsAutomaticUpdatesEnabled = true, + TimeZone = "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + AdditionalUnattendContent = {new AdditionalUnattendContent { PassName = PassName.OobeSystem, ComponentName = ComponentName.MicrosoftWindowsShellSetup, SettingName = SettingName.AutoLogon, Content = "aaaaaaaaaaaaaaaaaaaa", }}, - PatchSettings = new PatchSettings - { - PatchMode = WindowsVmGuestPatchMode.Manual, - EnableHotpatching = true, - AssessmentMode = WindowsPatchAssessmentMode.ImageDefault, - }, - WinRMListeners = {new WinRMListener + PatchSettings = new PatchSettings + { + PatchMode = WindowsVmGuestPatchMode.Manual, + EnableHotpatching = true, + AssessmentMode = WindowsPatchAssessmentMode.ImageDefault, + }, + WinRMListeners = {new WinRMListener { Protocol = WinRMListenerProtocolType.Http, CertificateUri = new Uri("aaaaaaaaaaaaaaaaaaaaaa"), }}, - }, - LinuxConfiguration = new LinuxConfiguration - { - IsPasswordAuthenticationDisabled = true, - SshPublicKeys = {new SshPublicKeyConfiguration + }, + LinuxConfiguration = new LinuxConfiguration + { + IsPasswordAuthenticationDisabled = true, + SshPublicKeys = {new SshPublicKeyConfiguration { Path = "aaa", KeyData = "aaaaaa", }}, - ProvisionVmAgent = true, - PatchSettings = new LinuxPatchSettings - { - PatchMode = LinuxVmGuestPatchMode.ImageDefault, - AssessmentMode = LinuxPatchAssessmentMode.ImageDefault, + ProvisionVmAgent = true, + PatchSettings = new LinuxPatchSettings + { + PatchMode = LinuxVmGuestPatchMode.ImageDefault, + AssessmentMode = LinuxPatchAssessmentMode.ImageDefault, + }, }, + Secrets = { }, + AllowExtensionOperations = true, + RequireGuestProvisionSignal = true, }, - Secrets = { }, - AllowExtensionOperations = true, - RequireGuestProvisionSignal = true, - }, - SecurityProfile = new SecurityProfile - { - UefiSettings = new UefiSettings + SecurityProfile = new SecurityProfile { - IsSecureBootEnabled = true, - IsVirtualTpmEnabled = true, + UefiSettings = new UefiSettings + { + IsSecureBootEnabled = true, + IsVirtualTpmEnabled = true, + }, + EncryptionAtHost = true, + SecurityType = SecurityType.TrustedLaunch, }, - EncryptionAtHost = true, - SecurityType = SecurityType.TrustedLaunch, - }, - NetworkProfile = new VirtualMachineNetworkProfile - { - NetworkInterfaces = {new VirtualMachineNetworkInterfaceReference + NetworkProfile = new VirtualMachineNetworkProfile + { + NetworkInterfaces = {new VirtualMachineNetworkInterfaceReference { Primary = true, DeleteOption = ComputeDeleteOption.Delete, Id = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415"), }}, - NetworkApiVersion = NetworkApiVersion.v2020_11_01, - NetworkInterfaceConfigurations = {new VirtualMachineNetworkInterfaceConfiguration("aaaaaaaaaaa") + NetworkApiVersion = NetworkApiVersion.v2020_11_01, + NetworkInterfaceConfigurations = {new VirtualMachineNetworkInterfaceConfiguration("aaaaaaaaaaa") { Primary = true, DeleteOption = ComputeDeleteOption.Delete, @@ -245,8 +240,8 @@ public async Task CreateOrUpdate_VirtualMachineScaleSetVMUpdateMaximumSetGen() }}, DscpConfigurationId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), }}, - }, - NetworkInterfaceConfigurations = {new VirtualMachineScaleSetNetworkConfiguration("vmsstestnetconfig5415") + }, + NetworkInterfaceConfigurations = {new VirtualMachineScaleSetNetworkConfiguration("vmsstestnetconfig5415") { Primary = true, EnableAcceleratedNetworking = true, @@ -296,19 +291,27 @@ public async Task CreateOrUpdate_VirtualMachineScaleSetVMUpdateMaximumSetGen() EnableIPForwarding = true, DeleteOption = ComputeDeleteOption.Delete, }}, - BootDiagnostics = new BootDiagnostics - { - Enabled = true, - StorageUri = new Uri("aaaaaaaaaaaaa"), + BootDiagnostics = new BootDiagnostics + { + Enabled = true, + StorageUri = new Uri("aaaaaaaaaaaaa"), + }, + AvailabilitySetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), + LicenseType = "aaaaaaaaaa", + ProtectionPolicy = new VirtualMachineScaleSetVmProtectionPolicy + { + ProtectFromScaleIn = true, + ProtectFromScaleSetActions = true, + }, + UserData = "RXhhbXBsZSBVc2VyRGF0YQ==", }, - AvailabilitySetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), - LicenseType = "aaaaaaaaaa", - ProtectionPolicy = new VirtualMachineScaleSetVmProtectionPolicy + Plan = new ComputePlan { - ProtectFromScaleIn = true, - ProtectFromScaleSetActions = true, + Name = "aaaaaaaaaa", + Publisher = "aaaaaaaaaaaaaaaaaaaaaa", + Product = "aaaaaaaaaaaaaaaaaaaa", + PromotionCode = "aaaaaaaaaaaaaaaaaaaa", }, - UserData = "RXhhbXBsZSBVc2VyRGF0YQ==", Tags = { }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, instanceId, data); diff --git a/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmResource.cs b/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmResource.cs index 8970eb171076..5445dbb1704a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmResource.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/tests/Generated/Samples/Sample_VirtualMachineScaleSetVmResource.cs @@ -162,68 +162,63 @@ public async Task Update_VirtualMachineScaleSetVMUpdateMaximumSetGen() // invoke the operation VirtualMachineScaleSetVmData data = new VirtualMachineScaleSetVmData(new AzureLocation("westus")) { - Plan = new ComputePlan - { - Name = "aaaaaaaaaa", - Publisher = "aaaaaaaaaaaaaaaaaaaaaa", - Product = "aaaaaaaaaaaaaaaaaaaa", - PromotionCode = "aaaaaaaaaaaaaaaaaaaa", - }, - HardwareProfile = new VirtualMachineHardwareProfile + Properties = new VirtualMachineScaleSetVmProperties { - VmSize = VirtualMachineSizeType.BasicA0, - VmSizeProperties = new VirtualMachineSizeProperties + HardwareProfile = new VirtualMachineHardwareProfile { - VCpusAvailable = 9, - VCpusPerCore = 12, - }, - }, - StorageProfile = new VirtualMachineStorageProfile - { - ImageReference = new ImageReference - { - Publisher = "MicrosoftWindowsServer", - Offer = "WindowsServer", - Sku = "2012-R2-Datacenter", - Version = "4.127.20180315", - SharedGalleryImageUniqueId = "aaaaaaaaaaaaaaaaaaaa", - Id = new ResourceIdentifier("a"), - }, - OSDisk = new VirtualMachineOSDisk(DiskCreateOptionType.FromImage) - { - OSType = SupportedOperatingSystemType.Windows, - EncryptionSettings = new DiskEncryptionSettings + VmSize = VirtualMachineSizeType.BasicA0, + VmSizeProperties = new VirtualMachineSizeProperties { - DiskEncryptionKey = new KeyVaultSecretReference(new Uri("aaaaaaaa"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), - }), - KeyEncryptionKey = new KeyVaultKeyReference(new Uri("aaaaaaaaaaaaaa"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), - }), - Enabled = true, + VCpusAvailable = 9, + VCpusPerCore = 12, }, - Name = "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", - VhdUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), - ImageUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), - Caching = CachingType.None, - WriteAcceleratorEnabled = true, - DiffDiskSettings = new DiffDiskSettings + }, + StorageProfile = new VirtualMachineStorageProfile + { + ImageReference = new ImageReference { - Option = DiffDiskOption.Local, - Placement = DiffDiskPlacement.CacheDisk, + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2012-R2-Datacenter", + Version = "4.127.20180315", + SharedGalleryImageUniqueId = "aaaaaaaaaaaaaaaaaaaa", + Id = new ResourceIdentifier("a"), }, - DiskSizeGB = 127, - ManagedDisk = new VirtualMachineManagedDisk + OSDisk = new VirtualMachineOSDisk(DiskCreateOptionType.FromImage) { - StorageAccountType = StorageAccountType.StandardLrs, - DiskEncryptionSetId = new ResourceIdentifier("aaaaaaaaaaaa"), - Id = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc"), + OSType = SupportedOperatingSystemType.Windows, + EncryptionSettings = new DiskEncryptionSettings + { + DiskEncryptionKey = new KeyVaultSecretReference(new Uri("aaaaaaaa"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), + }), + KeyEncryptionKey = new KeyVaultKeyReference(new Uri("aaaaaaaaaaaaaa"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), + }), + Enabled = true, + }, + Name = "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + VhdUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), + ImageUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), + Caching = CachingType.None, + WriteAcceleratorEnabled = true, + DiffDiskSettings = new DiffDiskSettings + { + Option = DiffDiskOption.Local, + Placement = DiffDiskPlacement.CacheDisk, + }, + DiskSizeGB = 127, + ManagedDisk = new VirtualMachineManagedDisk + { + StorageAccountType = StorageAccountType.StandardLrs, + DiskEncryptionSetId = new ResourceIdentifier("aaaaaaaaaaaa"), + Id = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc"), + }, + DeleteOption = DiskDeleteOptionType.Delete, }, - DeleteOption = DiskDeleteOptionType.Delete, - }, - DataDisks = {new VirtualMachineDataDisk(1, DiskCreateOptionType.Empty) + DataDisks = {new VirtualMachineDataDisk(1, DiskCreateOptionType.Empty) { Name = "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", VhdUri = new Uri("https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd"), @@ -241,81 +236,81 @@ public async Task Update_VirtualMachineScaleSetVMUpdateMaximumSetGen() DetachOption = DiskDetachOptionType.ForceDetach, DeleteOption = DiskDeleteOptionType.Delete, }}, - }, - AdditionalCapabilities = new AdditionalCapabilities - { - UltraSsdEnabled = true, - HibernationEnabled = true, - }, - OSProfile = new VirtualMachineOSProfile - { - ComputerName = "test000000", - AdminUsername = "Foo12", - AdminPassword = "aaaaaaaaaaaaaaaa", - CustomData = "aaaa", - WindowsConfiguration = new WindowsConfiguration + }, + AdditionalCapabilities = new AdditionalCapabilities { - ProvisionVmAgent = true, - IsAutomaticUpdatesEnabled = true, - TimeZone = "aaaaaaaaaaaaaaaaaaaaaaaaaaa", - AdditionalUnattendContent = {new AdditionalUnattendContent + UltraSsdEnabled = true, + HibernationEnabled = true, + }, + OSProfile = new VirtualMachineOSProfile + { + ComputerName = "test000000", + AdminUsername = "Foo12", + AdminPassword = "aaaaaaaaaaaaaaaa", + CustomData = "aaaa", + WindowsConfiguration = new WindowsConfiguration + { + ProvisionVmAgent = true, + IsAutomaticUpdatesEnabled = true, + TimeZone = "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + AdditionalUnattendContent = {new AdditionalUnattendContent { PassName = PassName.OobeSystem, ComponentName = ComponentName.MicrosoftWindowsShellSetup, SettingName = SettingName.AutoLogon, Content = "aaaaaaaaaaaaaaaaaaaa", }}, - PatchSettings = new PatchSettings - { - PatchMode = WindowsVmGuestPatchMode.Manual, - EnableHotpatching = true, - AssessmentMode = WindowsPatchAssessmentMode.ImageDefault, - }, - WinRMListeners = {new WinRMListener + PatchSettings = new PatchSettings + { + PatchMode = WindowsVmGuestPatchMode.Manual, + EnableHotpatching = true, + AssessmentMode = WindowsPatchAssessmentMode.ImageDefault, + }, + WinRMListeners = {new WinRMListener { Protocol = WinRMListenerProtocolType.Http, CertificateUri = new Uri("aaaaaaaaaaaaaaaaaaaaaa"), }}, - }, - LinuxConfiguration = new LinuxConfiguration - { - IsPasswordAuthenticationDisabled = true, - SshPublicKeys = {new SshPublicKeyConfiguration + }, + LinuxConfiguration = new LinuxConfiguration + { + IsPasswordAuthenticationDisabled = true, + SshPublicKeys = {new SshPublicKeyConfiguration { Path = "aaa", KeyData = "aaaaaa", }}, - ProvisionVmAgent = true, - PatchSettings = new LinuxPatchSettings - { - PatchMode = LinuxVmGuestPatchMode.ImageDefault, - AssessmentMode = LinuxPatchAssessmentMode.ImageDefault, + ProvisionVmAgent = true, + PatchSettings = new LinuxPatchSettings + { + PatchMode = LinuxVmGuestPatchMode.ImageDefault, + AssessmentMode = LinuxPatchAssessmentMode.ImageDefault, + }, }, + Secrets = { }, + AllowExtensionOperations = true, + RequireGuestProvisionSignal = true, }, - Secrets = { }, - AllowExtensionOperations = true, - RequireGuestProvisionSignal = true, - }, - SecurityProfile = new SecurityProfile - { - UefiSettings = new UefiSettings + SecurityProfile = new SecurityProfile { - IsSecureBootEnabled = true, - IsVirtualTpmEnabled = true, + UefiSettings = new UefiSettings + { + IsSecureBootEnabled = true, + IsVirtualTpmEnabled = true, + }, + EncryptionAtHost = true, + SecurityType = SecurityType.TrustedLaunch, }, - EncryptionAtHost = true, - SecurityType = SecurityType.TrustedLaunch, - }, - NetworkProfile = new VirtualMachineNetworkProfile - { - NetworkInterfaces = {new VirtualMachineNetworkInterfaceReference + NetworkProfile = new VirtualMachineNetworkProfile + { + NetworkInterfaces = {new VirtualMachineNetworkInterfaceReference { Primary = true, DeleteOption = ComputeDeleteOption.Delete, Id = new ResourceIdentifier("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415"), }}, - NetworkApiVersion = NetworkApiVersion.v2020_11_01, - NetworkInterfaceConfigurations = {new VirtualMachineNetworkInterfaceConfiguration("aaaaaaaaaaa") + NetworkApiVersion = NetworkApiVersion.v2020_11_01, + NetworkInterfaceConfigurations = {new VirtualMachineNetworkInterfaceConfiguration("aaaaaaaaaaa") { Primary = true, DeleteOption = ComputeDeleteOption.Delete, @@ -363,8 +358,8 @@ public async Task Update_VirtualMachineScaleSetVMUpdateMaximumSetGen() }}, DscpConfigurationId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), }}, - }, - NetworkInterfaceConfigurations = {new VirtualMachineScaleSetNetworkConfiguration("vmsstestnetconfig5415") + }, + NetworkInterfaceConfigurations = {new VirtualMachineScaleSetNetworkConfiguration("vmsstestnetconfig5415") { Primary = true, EnableAcceleratedNetworking = true, @@ -414,19 +409,27 @@ public async Task Update_VirtualMachineScaleSetVMUpdateMaximumSetGen() EnableIPForwarding = true, DeleteOption = ComputeDeleteOption.Delete, }}, - BootDiagnostics = new BootDiagnostics - { - Enabled = true, - StorageUri = new Uri("aaaaaaaaaaaaa"), + BootDiagnostics = new BootDiagnostics + { + Enabled = true, + StorageUri = new Uri("aaaaaaaaaaaaa"), + }, + AvailabilitySetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), + LicenseType = "aaaaaaaaaa", + ProtectionPolicy = new VirtualMachineScaleSetVmProtectionPolicy + { + ProtectFromScaleIn = true, + ProtectFromScaleSetActions = true, + }, + UserData = "RXhhbXBsZSBVc2VyRGF0YQ==", }, - AvailabilitySetId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"), - LicenseType = "aaaaaaaaaa", - ProtectionPolicy = new VirtualMachineScaleSetVmProtectionPolicy + Plan = new ComputePlan { - ProtectFromScaleIn = true, - ProtectFromScaleSetActions = true, + Name = "aaaaaaaaaa", + Publisher = "aaaaaaaaaaaaaaaaaaaaaa", + Product = "aaaaaaaaaaaaaaaaaaaa", + PromotionCode = "aaaaaaaaaaaaaaaaaaaa", }, - UserData = "RXhhbXBsZSBVc2VyRGF0YQ==", Tags = { }, }; ArmOperation lro = await virtualMachineScaleSetVm.UpdateAsync(WaitUntil.Completed, data);