diff --git a/sdk/batch/Azure.ResourceManager.Batch/api/Azure.ResourceManager.Batch.netstandard2.0.cs b/sdk/batch/Azure.ResourceManager.Batch/api/Azure.ResourceManager.Batch.netstandard2.0.cs index 7784bdbb28f8..a01599194d0f 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/api/Azure.ResourceManager.Batch.netstandard2.0.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/api/Azure.ResourceManager.Batch.netstandard2.0.cs @@ -185,6 +185,7 @@ public BatchAccountPoolData() { } public Azure.ResourceManager.Batch.Models.NodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } public Azure.ResourceManager.Batch.Models.BatchNodeFillType? TaskSchedulingNodeFillType { get { throw null; } set { } } public int? TaskSlotsPerNode { get { throw null; } set { } } + public Azure.ResourceManager.Batch.Models.UpgradePolicy UpgradePolicy { get { throw null; } set { } } public System.Collections.Generic.IList UserAccounts { get { throw null; } } public string VmSize { get { throw null; } set { } } Azure.ResourceManager.Batch.BatchAccountPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -507,7 +508,9 @@ public static partial class ArmBatchModelFactory public static Azure.ResourceManager.Batch.Models.BatchAccountKeys BatchAccountKeys(string accountName = null, string primary = null, string secondary = null) { throw null; } public static Azure.ResourceManager.Batch.Models.BatchAccountOutboundEnvironmentEndpoint BatchAccountOutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.Batch.Models.BatchAccountPoolAutoScaleRun BatchAccountPoolAutoScaleRun(System.DateTimeOffset evaluationOn = default(System.DateTimeOffset), string results = null, Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.Batch.BatchAccountPoolData BatchAccountPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string displayName = null, System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.Batch.Models.BatchAccountPoolProvisioningState? provisioningState = default(Azure.ResourceManager.Batch.Models.BatchAccountPoolProvisioningState?), System.DateTimeOffset? provisioningStateTransitOn = default(System.DateTimeOffset?), Azure.ResourceManager.Batch.Models.BatchAccountPoolAllocationState? allocationState = default(Azure.ResourceManager.Batch.Models.BatchAccountPoolAllocationState?), System.DateTimeOffset? allocationStateTransitionOn = default(System.DateTimeOffset?), string vmSize = null, Azure.ResourceManager.Batch.Models.BatchDeploymentConfiguration deploymentConfiguration = null, int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), Azure.ResourceManager.Batch.Models.BatchAccountPoolScaleSettings scaleSettings = null, Azure.ResourceManager.Batch.Models.BatchAccountPoolAutoScaleRun autoScaleRun = null, Azure.ResourceManager.Batch.Models.InterNodeCommunicationState? interNodeCommunication = default(Azure.ResourceManager.Batch.Models.InterNodeCommunicationState?), Azure.ResourceManager.Batch.Models.BatchNetworkConfiguration networkConfiguration = null, int? taskSlotsPerNode = default(int?), Azure.ResourceManager.Batch.Models.BatchNodeFillType? taskSchedulingNodeFillType = default(Azure.ResourceManager.Batch.Models.BatchNodeFillType?), System.Collections.Generic.IEnumerable userAccounts = null, System.Collections.Generic.IEnumerable metadata = null, Azure.ResourceManager.Batch.Models.BatchAccountPoolStartTask startTask = null, System.Collections.Generic.IEnumerable certificates = null, System.Collections.Generic.IEnumerable applicationPackages = null, System.Collections.Generic.IEnumerable applicationLicenses = null, Azure.ResourceManager.Batch.Models.BatchResizeOperationStatus resizeOperationStatus = null, System.Collections.Generic.IEnumerable mountConfiguration = null, Azure.ResourceManager.Batch.Models.NodeCommunicationMode? targetNodeCommunicationMode = default(Azure.ResourceManager.Batch.Models.NodeCommunicationMode?), Azure.ResourceManager.Batch.Models.NodeCommunicationMode? currentNodeCommunicationMode = default(Azure.ResourceManager.Batch.Models.NodeCommunicationMode?), System.Collections.Generic.IDictionary resourceTags = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.Batch.BatchAccountPoolData BatchAccountPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string displayName = null, System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.Batch.Models.BatchAccountPoolProvisioningState? provisioningState = default(Azure.ResourceManager.Batch.Models.BatchAccountPoolProvisioningState?), System.DateTimeOffset? provisioningStateTransitOn = default(System.DateTimeOffset?), Azure.ResourceManager.Batch.Models.BatchAccountPoolAllocationState? allocationState = default(Azure.ResourceManager.Batch.Models.BatchAccountPoolAllocationState?), System.DateTimeOffset? allocationStateTransitionOn = default(System.DateTimeOffset?), string vmSize = null, Azure.ResourceManager.Batch.Models.BatchDeploymentConfiguration deploymentConfiguration = null, int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), Azure.ResourceManager.Batch.Models.BatchAccountPoolScaleSettings scaleSettings = null, Azure.ResourceManager.Batch.Models.BatchAccountPoolAutoScaleRun autoScaleRun = null, Azure.ResourceManager.Batch.Models.InterNodeCommunicationState? interNodeCommunication = default(Azure.ResourceManager.Batch.Models.InterNodeCommunicationState?), Azure.ResourceManager.Batch.Models.BatchNetworkConfiguration networkConfiguration = null, int? taskSlotsPerNode = default(int?), Azure.ResourceManager.Batch.Models.BatchNodeFillType? taskSchedulingNodeFillType = default(Azure.ResourceManager.Batch.Models.BatchNodeFillType?), System.Collections.Generic.IEnumerable userAccounts = null, System.Collections.Generic.IEnumerable metadata = null, Azure.ResourceManager.Batch.Models.BatchAccountPoolStartTask startTask = null, System.Collections.Generic.IEnumerable certificates = null, System.Collections.Generic.IEnumerable applicationPackages = null, System.Collections.Generic.IEnumerable applicationLicenses = null, Azure.ResourceManager.Batch.Models.BatchResizeOperationStatus resizeOperationStatus = null, System.Collections.Generic.IEnumerable mountConfiguration = null, Azure.ResourceManager.Batch.Models.NodeCommunicationMode? targetNodeCommunicationMode = default(Azure.ResourceManager.Batch.Models.NodeCommunicationMode?), Azure.ResourceManager.Batch.Models.NodeCommunicationMode? currentNodeCommunicationMode = default(Azure.ResourceManager.Batch.Models.NodeCommunicationMode?), Azure.ResourceManager.Batch.Models.UpgradePolicy upgradePolicy = null, System.Collections.Generic.IDictionary resourceTags = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Batch.BatchAccountPoolData BatchAccountPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string displayName, System.DateTimeOffset? lastModifiedOn, System.DateTimeOffset? createdOn, Azure.ResourceManager.Batch.Models.BatchAccountPoolProvisioningState? provisioningState, System.DateTimeOffset? provisioningStateTransitOn, Azure.ResourceManager.Batch.Models.BatchAccountPoolAllocationState? allocationState, System.DateTimeOffset? allocationStateTransitionOn, string vmSize, Azure.ResourceManager.Batch.Models.BatchDeploymentConfiguration deploymentConfiguration, int? currentDedicatedNodes, int? currentLowPriorityNodes, Azure.ResourceManager.Batch.Models.BatchAccountPoolScaleSettings scaleSettings, Azure.ResourceManager.Batch.Models.BatchAccountPoolAutoScaleRun autoScaleRun, Azure.ResourceManager.Batch.Models.InterNodeCommunicationState? interNodeCommunication, Azure.ResourceManager.Batch.Models.BatchNetworkConfiguration networkConfiguration, int? taskSlotsPerNode, Azure.ResourceManager.Batch.Models.BatchNodeFillType? taskSchedulingNodeFillType, System.Collections.Generic.IEnumerable userAccounts, System.Collections.Generic.IEnumerable metadata, Azure.ResourceManager.Batch.Models.BatchAccountPoolStartTask startTask, System.Collections.Generic.IEnumerable certificates, System.Collections.Generic.IEnumerable applicationPackages, System.Collections.Generic.IEnumerable applicationLicenses, Azure.ResourceManager.Batch.Models.BatchResizeOperationStatus resizeOperationStatus, System.Collections.Generic.IEnumerable mountConfiguration, Azure.ResourceManager.Batch.Models.NodeCommunicationMode? targetNodeCommunicationMode, Azure.ResourceManager.Batch.Models.NodeCommunicationMode? currentNodeCommunicationMode, System.Collections.Generic.IDictionary resourceTags, Azure.ETag? etag) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Batch.BatchAccountPoolData BatchAccountPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string displayName, System.DateTimeOffset? lastModifiedOn, System.DateTimeOffset? createdOn, Azure.ResourceManager.Batch.Models.BatchAccountPoolProvisioningState? provisioningState, System.DateTimeOffset? provisioningStateTransitOn, Azure.ResourceManager.Batch.Models.BatchAccountPoolAllocationState? allocationState, System.DateTimeOffset? allocationStateTransitionOn, string vmSize, Azure.ResourceManager.Batch.Models.BatchDeploymentConfiguration deploymentConfiguration, int? currentDedicatedNodes, int? currentLowPriorityNodes, Azure.ResourceManager.Batch.Models.BatchAccountPoolScaleSettings scaleSettings, Azure.ResourceManager.Batch.Models.BatchAccountPoolAutoScaleRun autoScaleRun, Azure.ResourceManager.Batch.Models.InterNodeCommunicationState? interNodeCommunication, Azure.ResourceManager.Batch.Models.BatchNetworkConfiguration networkConfiguration, int? taskSlotsPerNode, Azure.ResourceManager.Batch.Models.BatchNodeFillType? taskSchedulingNodeFillType, System.Collections.Generic.IEnumerable userAccounts, System.Collections.Generic.IEnumerable metadata, Azure.ResourceManager.Batch.Models.BatchAccountPoolStartTask startTask, System.Collections.Generic.IEnumerable certificates, System.Collections.Generic.IEnumerable applicationPackages, System.Collections.Generic.IEnumerable applicationLicenses, Azure.ResourceManager.Batch.Models.BatchResizeOperationStatus resizeOperationStatus, System.Collections.Generic.IEnumerable mountConfiguration, Azure.ResourceManager.Batch.Models.NodeCommunicationMode? targetNodeCommunicationMode, Azure.ResourceManager.Batch.Models.NodeCommunicationMode? currentNodeCommunicationMode, Azure.ETag? etag) { throw null; } public static Azure.ResourceManager.Batch.BatchApplicationData BatchApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, bool? allowUpdates = default(bool?), string defaultVersion = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } @@ -522,9 +525,24 @@ public static partial class ArmBatchModelFactory public static Azure.ResourceManager.Batch.Models.BatchPrivateLinkServiceConnectionState BatchPrivateLinkServiceConnectionState(Azure.ResourceManager.Batch.Models.BatchPrivateLinkServiceConnectionStatus status = Azure.ResourceManager.Batch.Models.BatchPrivateLinkServiceConnectionStatus.Approved, string description = null, string actionRequired = null) { throw null; } public static Azure.ResourceManager.Batch.Models.BatchResizeOperationStatus BatchResizeOperationStatus(int? targetDedicatedNodes = default(int?), int? targetLowPriorityNodes = default(int?), System.TimeSpan? resizeTimeout = default(System.TimeSpan?), Azure.ResourceManager.Batch.Models.BatchNodeDeallocationOption? nodeDeallocationOption = default(Azure.ResourceManager.Batch.Models.BatchNodeDeallocationOption?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Batch.Models.BatchSkuCapability BatchSkuCapability(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.Batch.Models.BatchSupportedSku BatchSupportedSku(string name = null, string familyName = null, System.Collections.Generic.IEnumerable capabilities = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Batch.Models.BatchSupportedSku BatchSupportedSku(string name, string familyName, System.Collections.Generic.IEnumerable capabilities) { throw null; } + public static Azure.ResourceManager.Batch.Models.BatchSupportedSku BatchSupportedSku(string name = null, string familyName = null, System.Collections.Generic.IEnumerable capabilities = null, System.DateTimeOffset? batchSupportEndOfLife = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Batch.Models.BatchVmFamilyCoreQuota BatchVmFamilyCoreQuota(string name = null, int? coreQuota = default(int?)) { throw null; } } + public partial class AutomaticOSUpgradePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutomaticOSUpgradePolicy() { } + public bool? DisableAutomaticRollback { get { throw null; } set { } } + public bool? EnableAutomaticOSUpgrade { get { throw null; } set { } } + public bool? OSRollingUpgradeDeferral { get { throw null; } set { } } + public bool? UseRollingUpgradePolicy { get { throw null; } set { } } + Azure.ResourceManager.Batch.Models.AutomaticOSUpgradePolicy 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.Batch.Models.AutomaticOSUpgradePolicy 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 BatchAccountAutoScaleSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BatchAccountAutoScaleSettings(string formula) { } @@ -1393,6 +1411,7 @@ public enum BatchStorageAccountType public partial class BatchSupportedSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal BatchSupportedSku() { } + public System.DateTimeOffset? BatchSupportEndOfLife { get { throw null; } } public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } public string FamilyName { get { throw null; } } public string Name { get { throw null; } } @@ -1585,4 +1604,38 @@ public enum NodeCommunicationMode Classic = 1, Simplified = 2, } + public partial class RollingUpgradePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RollingUpgradePolicy() { } + public bool? EnableCrossZoneUpgrade { get { throw null; } set { } } + public int? MaxBatchInstancePercent { get { throw null; } set { } } + public int? MaxUnhealthyInstancePercent { get { throw null; } set { } } + public int? MaxUnhealthyUpgradedInstancePercent { get { throw null; } set { } } + public string PauseTimeBetweenBatches { get { throw null; } set { } } + public bool? PrioritizeUnhealthyInstances { get { throw null; } set { } } + public bool? RollbackFailedInstancesOnPolicyBreach { get { throw null; } set { } } + Azure.ResourceManager.Batch.Models.RollingUpgradePolicy 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.Batch.Models.RollingUpgradePolicy 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 enum UpgradeMode + { + Automatic = 0, + Manual = 1, + Rolling = 2, + } + public partial class UpgradePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UpgradePolicy(Azure.ResourceManager.Batch.Models.UpgradeMode mode) { } + public Azure.ResourceManager.Batch.Models.AutomaticOSUpgradePolicy AutomaticOSUpgradePolicy { get { throw null; } set { } } + public Azure.ResourceManager.Batch.Models.UpgradeMode Mode { get { throw null; } set { } } + public Azure.ResourceManager.Batch.Models.RollingUpgradePolicy RollingUpgradePolicy { get { throw null; } set { } } + Azure.ResourceManager.Batch.Models.UpgradePolicy 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.Batch.Models.UpgradePolicy 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; } + } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/ArmBatchModelFactory.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/ArmBatchModelFactory.cs index 6660dc75f9d6..7a90b67ef09d 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/ArmBatchModelFactory.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/ArmBatchModelFactory.cs @@ -241,12 +241,13 @@ public static BatchLocationQuota BatchLocationQuota(int? accountQuota = null) /// The name of the SKU. /// The family name of the SKU. /// A collection of capabilities which this SKU supports. + /// The time when Azure Batch service will retire this SKU. /// A new instance for mocking. - public static BatchSupportedSku BatchSupportedSku(string name = null, string familyName = null, IEnumerable capabilities = null) + public static BatchSupportedSku BatchSupportedSku(string name = null, string familyName = null, IEnumerable capabilities = null, DateTimeOffset? batchSupportEndOfLife = null) { capabilities ??= new List(); - return new BatchSupportedSku(name, familyName, capabilities?.ToList(), serializedAdditionalRawData: null); + return new BatchSupportedSku(name, familyName, capabilities?.ToList(), batchSupportEndOfLife, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -425,10 +426,11 @@ public static BatchPrivateLinkResourceData BatchPrivateLinkResourceData(Resource /// This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. /// If omitted, the default value is Default. /// Determines how a pool communicates with the Batch service. + /// Describes an upgrade policy - automatic, manual, or rolling. /// The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. /// The ETag of the resource, used for concurrency statements. /// A new instance for mocking. - public static BatchAccountPoolData BatchAccountPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, string displayName = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? createdOn = null, BatchAccountPoolProvisioningState? provisioningState = null, DateTimeOffset? provisioningStateTransitOn = null, BatchAccountPoolAllocationState? allocationState = null, DateTimeOffset? allocationStateTransitionOn = null, string vmSize = null, BatchDeploymentConfiguration deploymentConfiguration = null, int? currentDedicatedNodes = null, int? currentLowPriorityNodes = null, BatchAccountPoolScaleSettings scaleSettings = null, BatchAccountPoolAutoScaleRun autoScaleRun = null, InterNodeCommunicationState? interNodeCommunication = null, BatchNetworkConfiguration networkConfiguration = null, int? taskSlotsPerNode = null, BatchNodeFillType? taskSchedulingNodeFillType = null, IEnumerable userAccounts = null, IEnumerable metadata = null, BatchAccountPoolStartTask startTask = null, IEnumerable certificates = null, IEnumerable applicationPackages = null, IEnumerable applicationLicenses = null, BatchResizeOperationStatus resizeOperationStatus = null, IEnumerable mountConfiguration = null, NodeCommunicationMode? targetNodeCommunicationMode = null, NodeCommunicationMode? currentNodeCommunicationMode = null, IDictionary resourceTags = null, ETag? etag = null) + public static BatchAccountPoolData BatchAccountPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedServiceIdentity identity = null, string displayName = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? createdOn = null, BatchAccountPoolProvisioningState? provisioningState = null, DateTimeOffset? provisioningStateTransitOn = null, BatchAccountPoolAllocationState? allocationState = null, DateTimeOffset? allocationStateTransitionOn = null, string vmSize = null, BatchDeploymentConfiguration deploymentConfiguration = null, int? currentDedicatedNodes = null, int? currentLowPriorityNodes = null, BatchAccountPoolScaleSettings scaleSettings = null, BatchAccountPoolAutoScaleRun autoScaleRun = null, InterNodeCommunicationState? interNodeCommunication = null, BatchNetworkConfiguration networkConfiguration = null, int? taskSlotsPerNode = null, BatchNodeFillType? taskSchedulingNodeFillType = null, IEnumerable userAccounts = null, IEnumerable metadata = null, BatchAccountPoolStartTask startTask = null, IEnumerable certificates = null, IEnumerable applicationPackages = null, IEnumerable applicationLicenses = null, BatchResizeOperationStatus resizeOperationStatus = null, IEnumerable mountConfiguration = null, NodeCommunicationMode? targetNodeCommunicationMode = null, NodeCommunicationMode? currentNodeCommunicationMode = null, UpgradePolicy upgradePolicy = null, IDictionary resourceTags = null, ETag? etag = null) { userAccounts ??= new List(); metadata ??= new List(); @@ -471,6 +473,7 @@ public static BatchAccountPoolData BatchAccountPoolData(ResourceIdentifier id = mountConfiguration?.ToList(), targetNodeCommunicationMode, currentNodeCommunicationMode, + upgradePolicy, resourceTags, etag, serializedAdditionalRawData: null); @@ -538,5 +541,61 @@ public static BatchEndpointDetail BatchEndpointDetail(int? port = null) { return new BatchEndpointDetail(port, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The name of the SKU. + /// The family name of the SKU. + /// A collection of capabilities which this SKU supports. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static BatchSupportedSku BatchSupportedSku(string name, string familyName, IEnumerable capabilities) + { + return BatchSupportedSku(name: name, familyName: familyName, capabilities: capabilities, batchSupportEndOfLife: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The type of identity used for the Batch Pool. Current supported identity types: UserAssigned, None. + /// The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state. + /// The creation time of the pool. + /// The current state of the pool. + /// The time at which the pool entered its current state. + /// Whether the pool is resizing. + /// The time at which the pool entered its current allocation state. + /// For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + /// Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS). + /// The number of dedicated compute nodes currently in the pool. + /// The number of Spot/low-priority compute nodes currently in the pool. + /// Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes. + /// This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. + /// This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. + /// The network configuration for a pool. + /// The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + /// If not specified, the default is spread. + /// The list of user accounts to be created on each node in the pool. + /// The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool. + /// + /// For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. + /// Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. + /// + /// Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool. + /// The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail. + /// Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady). + /// This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + /// If omitted, the default value is Default. + /// Determines how a pool communicates with the Batch service. + /// The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + /// The ETag of the resource, used for concurrency statements. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static BatchAccountPoolData BatchAccountPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string displayName, DateTimeOffset? lastModifiedOn, DateTimeOffset? createdOn, BatchAccountPoolProvisioningState? provisioningState, DateTimeOffset? provisioningStateTransitOn, BatchAccountPoolAllocationState? allocationState, DateTimeOffset? allocationStateTransitionOn, string vmSize, BatchDeploymentConfiguration deploymentConfiguration, int? currentDedicatedNodes, int? currentLowPriorityNodes, BatchAccountPoolScaleSettings scaleSettings, BatchAccountPoolAutoScaleRun autoScaleRun, InterNodeCommunicationState? interNodeCommunication, BatchNetworkConfiguration networkConfiguration, int? taskSlotsPerNode, BatchNodeFillType? taskSchedulingNodeFillType, IEnumerable userAccounts, IEnumerable metadata, BatchAccountPoolStartTask startTask, IEnumerable certificates, IEnumerable applicationPackages, IEnumerable applicationLicenses, BatchResizeOperationStatus resizeOperationStatus, IEnumerable mountConfiguration, NodeCommunicationMode? targetNodeCommunicationMode, NodeCommunicationMode? currentNodeCommunicationMode, IDictionary resourceTags, ETag? etag) + { + return BatchAccountPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, identity: identity, displayName: displayName, lastModifiedOn: lastModifiedOn, createdOn: createdOn, provisioningState: provisioningState, provisioningStateTransitOn: provisioningStateTransitOn, allocationState: allocationState, allocationStateTransitionOn: allocationStateTransitionOn, vmSize: vmSize, deploymentConfiguration: deploymentConfiguration, currentDedicatedNodes: currentDedicatedNodes, currentLowPriorityNodes: currentLowPriorityNodes, scaleSettings: scaleSettings, autoScaleRun: autoScaleRun, interNodeCommunication: interNodeCommunication, networkConfiguration: networkConfiguration, taskSlotsPerNode: taskSlotsPerNode, taskSchedulingNodeFillType: taskSchedulingNodeFillType, userAccounts: userAccounts, metadata: metadata, startTask: startTask, certificates: certificates, applicationPackages: applicationPackages, applicationLicenses: applicationLicenses, resizeOperationStatus: resizeOperationStatus, mountConfiguration: mountConfiguration, targetNodeCommunicationMode: targetNodeCommunicationMode, currentNodeCommunicationMode: currentNodeCommunicationMode, upgradePolicy: default, resourceTags: resourceTags, etag: etag); + } } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateCollection.cs index e12af51fcb33..572c416adbd4 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateCollection.cs @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -128,7 +128,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual Response Get(string certificateN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual AsyncPageable GetAllAsync(int? m /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual Pageable GetAll(int? maxresults /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> ExistsAsync(string certificateName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual Response Exists(string certificateName, CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -511,7 +511,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.cs index c277d8c206a8..44d84919d60e 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual Response Update(BatchAccountCert /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> CancelDelet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCollection.cs index 1de09fa6fa9b..f7be2657baae 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -127,7 +127,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -238,7 +238,7 @@ public virtual async Task> GetAsync(string accoun /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual Response Get(string accountName, Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task> ExistsAsync(string accountName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual Response Exists(string accountName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorCollection.cs index 16dce802591f..aec03e93c79a 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response Get(string detectorId, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual async Task> ExistsAsync(string detectorId, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -330,7 +330,7 @@ public virtual Response Exists(string detectorId, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.cs index c25ee8fd0810..913c99e5e3fb 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolCollection.cs index 70cb7b87c710..1a82303e878a 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -127,7 +127,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -240,7 +240,7 @@ public virtual async Task> GetAsync(string po /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual Response Get(string poolName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual AsyncPageable GetAllAsync(int? maxresul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual Pageable GetAll(int? maxresults = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.Serialization.cs index 0e052e8416c2..859b19309c17 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.Serialization.cs @@ -233,6 +233,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("currentNodeCommunicationMode"); } } + if (UpgradePolicy != null) + { + writer.WritePropertyName("upgradePolicy"u8); + writer.WriteObjectValue(UpgradePolicy); + } if (!(ResourceTags is ChangeTrackingDictionary collection5 && collection5.IsUndefined)) { writer.WritePropertyName("resourceTags"u8); @@ -316,6 +321,7 @@ internal static BatchAccountPoolData DeserializeBatchAccountPoolData(JsonElement IList mountConfiguration = default; NodeCommunicationMode? targetNodeCommunicationMode = default; NodeCommunicationMode? currentNodeCommunicationMode = default; + UpgradePolicy upgradePolicy = default; IDictionary resourceTags = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -638,6 +644,15 @@ internal static BatchAccountPoolData DeserializeBatchAccountPoolData(JsonElement currentNodeCommunicationMode = property0.Value.GetString().ToNodeCommunicationMode(); continue; } + if (property0.NameEquals("upgradePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePolicy = UpgradePolicy.DeserializeUpgradePolicy(property0.Value, options); + continue; + } if (property0.NameEquals("resourceTags"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -694,6 +709,7 @@ internal static BatchAccountPoolData DeserializeBatchAccountPoolData(JsonElement mountConfiguration ?? new ChangeTrackingList(), targetNodeCommunicationMode, currentNodeCommunicationMode, + upgradePolicy, resourceTags ?? new ChangeTrackingDictionary(), etag, serializedAdditionalRawData); diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.cs index 7c7f8c8378bd..996052add235 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolData.cs @@ -101,10 +101,11 @@ public BatchAccountPoolData() /// This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. /// If omitted, the default value is Default. /// Determines how a pool communicates with the Batch service. + /// Describes an upgrade policy - automatic, manual, or rolling. /// The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. /// The ETag of the resource, used for concurrency statements. /// Keeps track of any properties unknown to the library. - internal BatchAccountPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string displayName, DateTimeOffset? lastModifiedOn, DateTimeOffset? createdOn, BatchAccountPoolProvisioningState? provisioningState, DateTimeOffset? provisioningStateTransitOn, BatchAccountPoolAllocationState? allocationState, DateTimeOffset? allocationStateTransitionOn, string vmSize, BatchDeploymentConfiguration deploymentConfiguration, int? currentDedicatedNodes, int? currentLowPriorityNodes, BatchAccountPoolScaleSettings scaleSettings, BatchAccountPoolAutoScaleRun autoScaleRun, InterNodeCommunicationState? interNodeCommunication, BatchNetworkConfiguration networkConfiguration, int? taskSlotsPerNode, TaskSchedulingPolicy taskSchedulingPolicy, IList userAccounts, IList metadata, BatchAccountPoolStartTask startTask, IList certificates, IList applicationPackages, IList applicationLicenses, BatchResizeOperationStatus resizeOperationStatus, IList mountConfiguration, NodeCommunicationMode? targetNodeCommunicationMode, NodeCommunicationMode? currentNodeCommunicationMode, IDictionary resourceTags, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal BatchAccountPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string displayName, DateTimeOffset? lastModifiedOn, DateTimeOffset? createdOn, BatchAccountPoolProvisioningState? provisioningState, DateTimeOffset? provisioningStateTransitOn, BatchAccountPoolAllocationState? allocationState, DateTimeOffset? allocationStateTransitionOn, string vmSize, BatchDeploymentConfiguration deploymentConfiguration, int? currentDedicatedNodes, int? currentLowPriorityNodes, BatchAccountPoolScaleSettings scaleSettings, BatchAccountPoolAutoScaleRun autoScaleRun, InterNodeCommunicationState? interNodeCommunication, BatchNetworkConfiguration networkConfiguration, int? taskSlotsPerNode, TaskSchedulingPolicy taskSchedulingPolicy, IList userAccounts, IList metadata, BatchAccountPoolStartTask startTask, IList certificates, IList applicationPackages, IList applicationLicenses, BatchResizeOperationStatus resizeOperationStatus, IList mountConfiguration, NodeCommunicationMode? targetNodeCommunicationMode, NodeCommunicationMode? currentNodeCommunicationMode, UpgradePolicy upgradePolicy, IDictionary resourceTags, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Identity = identity; DisplayName = displayName; @@ -134,6 +135,7 @@ internal BatchAccountPoolData(ResourceIdentifier id, string name, ResourceType r MountConfiguration = mountConfiguration; TargetNodeCommunicationMode = targetNodeCommunicationMode; CurrentNodeCommunicationMode = currentNodeCommunicationMode; + UpgradePolicy = upgradePolicy; ResourceTags = resourceTags; ETag = etag; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -209,6 +211,8 @@ public BatchNodeFillType? TaskSchedulingNodeFillType public NodeCommunicationMode? TargetNodeCommunicationMode { get; set; } /// Determines how a pool communicates with the Batch service. public NodeCommunicationMode? CurrentNodeCommunicationMode { get; } + /// Describes an upgrade policy - automatic, manual, or rolling. + public UpgradePolicy UpgradePolicy { get; set; } /// The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. public IDictionary ResourceTags { get; } /// The ETag of the resource, used for concurrency statements. diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.cs index e4b019b9c0a2..03a0df65c67f 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(BatchA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual Response Update(BatchAccountPoolData da /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> DisableAutoScaleAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -435,7 +435,7 @@ public virtual Response DisableAutoScale(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -473,7 +473,7 @@ public virtual async Task> StopResizeAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.cs index 685b2a4545f3..c0d161093b05 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.cs @@ -113,7 +113,7 @@ public virtual BatchAccountDetectorCollection GetBatchAccountDetectors() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetBatchAccoun /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual BatchApplicationCollection GetBatchApplications() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetBatchApplicatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual BatchAccountCertificateCollection GetBatchAccountCertificates() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetBatchAcc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual BatchPrivateLinkResourceCollection GetBatchPrivateLinkResources() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetBatchPrivateLin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual BatchPrivateEndpointConnectionCollection GetBatchPrivateEndpointC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> GetB /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual BatchAccountPoolCollection GetBatchAccountPools() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual async Task> GetBatchAccountPoo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -520,7 +520,7 @@ public virtual Response GetBatchAccountPool(string poo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -600,7 +600,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -642,7 +642,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -684,7 +684,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -729,7 +729,7 @@ public virtual async Task> UpdateAsync(BatchAccou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -774,7 +774,7 @@ public virtual Response Update(BatchAccountPatch patch, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -812,7 +812,7 @@ public virtual async Task SynchronizeAutoStorageKeysAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -850,7 +850,7 @@ public virtual Response SynchronizeAutoStorageKeys(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -895,7 +895,7 @@ public virtual async Task> RegenerateKeyAsync(BatchAc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -940,7 +940,7 @@ public virtual Response RegenerateKey(BatchAccountRegenerateKe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -978,7 +978,7 @@ public virtual async Task> GetKeysAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1016,7 +1016,7 @@ public virtual Response GetKeys(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1046,7 +1046,7 @@ public virtual AsyncPageable GetOutboun /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1076,7 +1076,7 @@ public virtual Pageable GetOutboundNetw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1144,7 +1144,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1212,7 +1212,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1272,7 +1272,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1332,7 +1332,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -1395,7 +1395,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationCollection.cs index a02ec7fbd7a6..7f6e4e035806 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -125,7 +125,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task> GetAsync(string ap /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual Response Get(string applicationName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual AsyncPageable GetAllAsync(int? maxresul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual Pageable GetAll(int? maxresults = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task> ExistsAsync(string applicationName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual Response Exists(string applicationName, CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageCollection.cs index c9ba29d77a77..f0ba1d3e75f0 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -125,7 +125,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual Response Get(string versionName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual AsyncPageable GetAllAsync(int? m /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual Pageable GetAll(int? maxresults /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task> ExistsAsync(string versionName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual Response Exists(string versionName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.cs index 416356a50ab8..6e842156d1bc 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> ActivateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.cs index 483ab79e4e91..5fad3acf2ed8 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.cs @@ -110,7 +110,7 @@ public virtual BatchApplicationPackageCollection GetBatchApplicationPackages() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetBatchApp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetBatchApplicationPack /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> UpdateAsync(BatchA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionCollection.cs index fddbb4b0c4fb..9b91172968c7 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response Get(string priva /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -201,7 +201,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual Pageable GetAll(int? maxr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -332,7 +332,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.cs index d86568f8251a..792d2f05b72f 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.cs index c1c37553e23a..54f0c8c599a9 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResourceCollection.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResourceCollection.cs index f0d164fa8ae3..40d4bbfb329b 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResourceCollection.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResourceCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> GetAsync(string pr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response Get(string privateLinkResource /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -201,7 +201,7 @@ public virtual AsyncPageable GetAllAsync(int? maxresul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual Pageable GetAll(int? maxresults = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -332,7 +332,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/BatchExtensions.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/BatchExtensions.cs index 729acc97a97d..b57d2cc62785 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/BatchExtensions.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/BatchExtensions.cs @@ -244,7 +244,7 @@ public static BatchAccountCollection GetBatchAccounts(this ResourceGroupResource /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -285,7 +285,7 @@ public static async Task> GetBatchAccountAsync(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -326,7 +326,7 @@ public static Response GetBatchAccount(this ResourceGroupR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -365,7 +365,7 @@ public static AsyncPageable GetBatchAccountsAsync(this Sub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -404,7 +404,7 @@ public static Pageable GetBatchAccounts(this SubscriptionR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -439,7 +439,7 @@ public static async Task> GetBatchQuotasAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -474,7 +474,7 @@ public static Response GetBatchQuotas(this SubscriptionResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -512,7 +512,7 @@ public static AsyncPageable GetBatchSupportedVirtualMachineSk /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -550,7 +550,7 @@ public static Pageable GetBatchSupportedVirtualMachineSkus(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -588,7 +588,7 @@ public static AsyncPageable GetBatchSupportedCloudServiceSkus /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -626,7 +626,7 @@ public static Pageable GetBatchSupportedCloudServiceSkus(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -662,7 +662,7 @@ public static async Task> CheckBatchNameAv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchResourceGroupResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchResourceGroupResource.cs index 1e8e3bf96b6e..7bb9c8ecdbae 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchResourceGroupResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchResourceGroupResource.cs @@ -56,7 +56,7 @@ public virtual BatchAccountCollection GetBatchAccounts() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -87,7 +87,7 @@ public virtual async Task> GetBatchAccountAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchSubscriptionResource.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchSubscriptionResource.cs index b39dbe3f29f3..900678a37fcf 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchSubscriptionResource.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Extensions/MockableBatchSubscriptionResource.cs @@ -62,7 +62,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -92,7 +92,7 @@ public virtual AsyncPageable GetBatchAccountsAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual Pageable GetBatchAccounts(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -157,7 +157,7 @@ public virtual async Task> GetBatchQuotasAsync(Azur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -192,7 +192,7 @@ public virtual Response GetBatchQuotas(AzureLocation locatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -221,7 +221,7 @@ public virtual AsyncPageable GetBatchSupportedVirtualMachineS /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -250,7 +250,7 @@ public virtual Pageable GetBatchSupportedVirtualMachineSkus(A /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -279,7 +279,7 @@ public virtual AsyncPageable GetBatchSupportedCloudServiceSku /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -308,7 +308,7 @@ public virtual Pageable GetBatchSupportedCloudServiceSkus(Azu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// @@ -350,7 +350,7 @@ public virtual async Task> CheckBatchNameA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-02-01 /// /// /// diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs new file mode 100644 index 000000000000..c2713141446f --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/AutomaticOSUpgradePolicy.Serialization.cs @@ -0,0 +1,171 @@ +// 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; + +namespace Azure.ResourceManager.Batch.Models +{ + public partial class AutomaticOSUpgradePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutomaticOSUpgradePolicy)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (DisableAutomaticRollback.HasValue) + { + writer.WritePropertyName("disableAutomaticRollback"u8); + writer.WriteBooleanValue(DisableAutomaticRollback.Value); + } + if (EnableAutomaticOSUpgrade.HasValue) + { + writer.WritePropertyName("enableAutomaticOSUpgrade"u8); + writer.WriteBooleanValue(EnableAutomaticOSUpgrade.Value); + } + if (UseRollingUpgradePolicy.HasValue) + { + writer.WritePropertyName("useRollingUpgradePolicy"u8); + writer.WriteBooleanValue(UseRollingUpgradePolicy.Value); + } + if (OSRollingUpgradeDeferral.HasValue) + { + writer.WritePropertyName("osRollingUpgradeDeferral"u8); + writer.WriteBooleanValue(OSRollingUpgradeDeferral.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutomaticOSUpgradePolicy 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(AutomaticOSUpgradePolicy)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutomaticOSUpgradePolicy(document.RootElement, options); + } + + internal static AutomaticOSUpgradePolicy DeserializeAutomaticOSUpgradePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? disableAutomaticRollback = default; + bool? enableAutomaticOSUpgrade = default; + bool? useRollingUpgradePolicy = default; + bool? osRollingUpgradeDeferral = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disableAutomaticRollback"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableAutomaticRollback = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableAutomaticOSUpgrade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutomaticOSUpgrade = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("useRollingUpgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useRollingUpgradePolicy = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("osRollingUpgradeDeferral"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osRollingUpgradeDeferral = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new AutomaticOSUpgradePolicy(disableAutomaticRollback, enableAutomaticOSUpgrade, useRollingUpgradePolicy, osRollingUpgradeDeferral, serializedAdditionalRawData); + } + + 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); + default: + throw new FormatException($"The model {nameof(AutomaticOSUpgradePolicy)} does not support '{options.Format}' format."); + } + } + + AutomaticOSUpgradePolicy 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); + return DeserializeAutomaticOSUpgradePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutomaticOSUpgradePolicy)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/AutomaticOSUpgradePolicy.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/AutomaticOSUpgradePolicy.cs new file mode 100644 index 000000000000..2a35975bc69c --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/AutomaticOSUpgradePolicy.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Batch.Models +{ + /// The configuration parameters used for performing automatic OS upgrade. + public partial class AutomaticOSUpgradePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutomaticOSUpgradePolicy() + { + } + + /// Initializes a new instance of . + /// Whether OS image rollback feature should be disabled. + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration) cannot be set to true. + /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. + /// Defer OS upgrades on the TVMs if they are running tasks. + /// Keeps track of any properties unknown to the library. + internal AutomaticOSUpgradePolicy(bool? disableAutomaticRollback, bool? enableAutomaticOSUpgrade, bool? useRollingUpgradePolicy, bool? osRollingUpgradeDeferral, IDictionary serializedAdditionalRawData) + { + DisableAutomaticRollback = disableAutomaticRollback; + EnableAutomaticOSUpgrade = enableAutomaticOSUpgrade; + UseRollingUpgradePolicy = useRollingUpgradePolicy; + OSRollingUpgradeDeferral = osRollingUpgradeDeferral; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether OS image rollback feature should be disabled. + public bool? DisableAutomaticRollback { get; set; } + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration) cannot be set to true. + public bool? EnableAutomaticOSUpgrade { get; set; } + /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. + public bool? UseRollingUpgradePolicy { get; set; } + /// Defer OS upgrades on the TVMs if they are running tasks. + public bool? OSRollingUpgradeDeferral { get; set; } + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.Serialization.cs index e920a381759c..15bcb3282f45 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.Serialization.cs @@ -46,6 +46,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndArray(); } + if (options.Format != "W" && BatchSupportEndOfLife.HasValue) + { + writer.WritePropertyName("batchSupportEndOfLife"u8); + writer.WriteStringValue(BatchSupportEndOfLife.Value, "O"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -87,6 +92,7 @@ internal static BatchSupportedSku DeserializeBatchSupportedSku(JsonElement eleme string name = default; string familyName = default; IReadOnlyList capabilities = default; + DateTimeOffset? batchSupportEndOfLife = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -115,13 +121,22 @@ internal static BatchSupportedSku DeserializeBatchSupportedSku(JsonElement eleme capabilities = array; continue; } + if (property.NameEquals("batchSupportEndOfLife"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + batchSupportEndOfLife = property.Value.GetDateTimeOffset("O"); + continue; + } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new BatchSupportedSku(name, familyName, capabilities ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new BatchSupportedSku(name, familyName, capabilities ?? new ChangeTrackingList(), batchSupportEndOfLife, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.cs index 88b5214d9c1d..f2b7a0161f0a 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/BatchSupportedSku.cs @@ -56,12 +56,14 @@ internal BatchSupportedSku() /// The name of the SKU. /// The family name of the SKU. /// A collection of capabilities which this SKU supports. + /// The time when Azure Batch service will retire this SKU. /// Keeps track of any properties unknown to the library. - internal BatchSupportedSku(string name, string familyName, IReadOnlyList capabilities, IDictionary serializedAdditionalRawData) + internal BatchSupportedSku(string name, string familyName, IReadOnlyList capabilities, DateTimeOffset? batchSupportEndOfLife, IDictionary serializedAdditionalRawData) { Name = name; FamilyName = familyName; Capabilities = capabilities; + BatchSupportEndOfLife = batchSupportEndOfLife; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -71,5 +73,7 @@ internal BatchSupportedSku(string name, string familyName, IReadOnlyList A collection of capabilities which this SKU supports. public IReadOnlyList Capabilities { get; } + /// The time when Azure Batch service will retire this SKU. + public DateTimeOffset? BatchSupportEndOfLife { get; } } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/RollingUpgradePolicy.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/RollingUpgradePolicy.Serialization.cs new file mode 100644 index 000000000000..354c1d1a2f77 --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/RollingUpgradePolicy.Serialization.cs @@ -0,0 +1,220 @@ +// 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; + +namespace Azure.ResourceManager.Batch.Models +{ + public partial class RollingUpgradePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (EnableCrossZoneUpgrade.HasValue) + { + writer.WritePropertyName("enableCrossZoneUpgrade"u8); + writer.WriteBooleanValue(EnableCrossZoneUpgrade.Value); + } + if (MaxBatchInstancePercent.HasValue) + { + writer.WritePropertyName("maxBatchInstancePercent"u8); + writer.WriteNumberValue(MaxBatchInstancePercent.Value); + } + if (MaxUnhealthyInstancePercent.HasValue) + { + writer.WritePropertyName("maxUnhealthyInstancePercent"u8); + writer.WriteNumberValue(MaxUnhealthyInstancePercent.Value); + } + if (MaxUnhealthyUpgradedInstancePercent.HasValue) + { + writer.WritePropertyName("maxUnhealthyUpgradedInstancePercent"u8); + writer.WriteNumberValue(MaxUnhealthyUpgradedInstancePercent.Value); + } + if (PauseTimeBetweenBatches != null) + { + writer.WritePropertyName("pauseTimeBetweenBatches"u8); + writer.WriteStringValue(PauseTimeBetweenBatches); + } + if (PrioritizeUnhealthyInstances.HasValue) + { + writer.WritePropertyName("prioritizeUnhealthyInstances"u8); + writer.WriteBooleanValue(PrioritizeUnhealthyInstances.Value); + } + if (RollbackFailedInstancesOnPolicyBreach.HasValue) + { + writer.WritePropertyName("rollbackFailedInstancesOnPolicyBreach"u8); + writer.WriteBooleanValue(RollbackFailedInstancesOnPolicyBreach.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RollingUpgradePolicy 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(RollingUpgradePolicy)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRollingUpgradePolicy(document.RootElement, options); + } + + internal static RollingUpgradePolicy DeserializeRollingUpgradePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enableCrossZoneUpgrade = default; + int? maxBatchInstancePercent = default; + int? maxUnhealthyInstancePercent = default; + int? maxUnhealthyUpgradedInstancePercent = default; + string pauseTimeBetweenBatches = default; + bool? prioritizeUnhealthyInstances = default; + bool? rollbackFailedInstancesOnPolicyBreach = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableCrossZoneUpgrade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableCrossZoneUpgrade = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxBatchInstancePercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxBatchInstancePercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxUnhealthyInstancePercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxUnhealthyInstancePercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxUnhealthyUpgradedInstancePercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxUnhealthyUpgradedInstancePercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("pauseTimeBetweenBatches"u8)) + { + pauseTimeBetweenBatches = property.Value.GetString(); + continue; + } + if (property.NameEquals("prioritizeUnhealthyInstances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prioritizeUnhealthyInstances = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("rollbackFailedInstancesOnPolicyBreach"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rollbackFailedInstancesOnPolicyBreach = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new RollingUpgradePolicy( + enableCrossZoneUpgrade, + maxBatchInstancePercent, + maxUnhealthyInstancePercent, + maxUnhealthyUpgradedInstancePercent, + pauseTimeBetweenBatches, + prioritizeUnhealthyInstances, + rollbackFailedInstancesOnPolicyBreach, + serializedAdditionalRawData); + } + + 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); + default: + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support '{options.Format}' format."); + } + } + + RollingUpgradePolicy 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); + return DeserializeRollingUpgradePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/RollingUpgradePolicy.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/RollingUpgradePolicy.cs new file mode 100644 index 000000000000..c834278d06ab --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/RollingUpgradePolicy.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Batch.Models +{ + /// The configuration parameters used while performing a rolling upgrade. + public partial class RollingUpgradePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RollingUpgradePolicy() + { + } + + /// Initializes a new instance of . + /// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. If this field is not set, Azure Azure Batch will not set its default value. The value of enableCrossZoneUpgrade on the created VirtualMachineScaleSet will be decided by the default configurations on VirtualMachineScaleSet. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. + /// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + /// The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + /// The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive. + /// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. + /// Upgrade all unhealthy instances in a scale set before any healthy instances. + /// Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + /// Keeps track of any properties unknown to the library. + internal RollingUpgradePolicy(bool? enableCrossZoneUpgrade, int? maxBatchInstancePercent, int? maxUnhealthyInstancePercent, int? maxUnhealthyUpgradedInstancePercent, string pauseTimeBetweenBatches, bool? prioritizeUnhealthyInstances, bool? rollbackFailedInstancesOnPolicyBreach, IDictionary serializedAdditionalRawData) + { + EnableCrossZoneUpgrade = enableCrossZoneUpgrade; + MaxBatchInstancePercent = maxBatchInstancePercent; + MaxUnhealthyInstancePercent = maxUnhealthyInstancePercent; + MaxUnhealthyUpgradedInstancePercent = maxUnhealthyUpgradedInstancePercent; + PauseTimeBetweenBatches = pauseTimeBetweenBatches; + PrioritizeUnhealthyInstances = prioritizeUnhealthyInstances; + RollbackFailedInstancesOnPolicyBreach = rollbackFailedInstancesOnPolicyBreach; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. If this field is not set, Azure Azure Batch will not set its default value. The value of enableCrossZoneUpgrade on the created VirtualMachineScaleSet will be decided by the default configurations on VirtualMachineScaleSet. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. + public bool? EnableCrossZoneUpgrade { get; set; } + /// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + public int? MaxBatchInstancePercent { get; set; } + /// The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + public int? MaxUnhealthyInstancePercent { get; set; } + /// The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive. + public int? MaxUnhealthyUpgradedInstancePercent { get; set; } + /// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. + public string PauseTimeBetweenBatches { get; set; } + /// Upgrade all unhealthy instances in a scale set before any healthy instances. + public bool? PrioritizeUnhealthyInstances { get; set; } + /// Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + public bool? RollbackFailedInstancesOnPolicyBreach { get; set; } + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradeMode.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradeMode.Serialization.cs new file mode 100644 index 000000000000..1a408c278e6c --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradeMode.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Batch.Models +{ + internal static partial class UpgradeModeExtensions + { + public static string ToSerialString(this UpgradeMode value) => value switch + { + UpgradeMode.Automatic => "automatic", + UpgradeMode.Manual => "manual", + UpgradeMode.Rolling => "rolling", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UpgradeMode value.") + }; + + public static UpgradeMode ToUpgradeMode(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "automatic")) return UpgradeMode.Automatic; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "manual")) return UpgradeMode.Manual; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "rolling")) return UpgradeMode.Rolling; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UpgradeMode value."); + } + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradeMode.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradeMode.cs new file mode 100644 index 000000000000..77365854eee4 --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradeMode.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Batch.Models +{ + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + public enum UpgradeMode + { + /// All virtual machines in the scale set are automatically updated at the same time. + Automatic, + /// You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. + Manual, + /// The existing instances in a scale set are brought down in batches to be upgraded. Once the upgraded batch is complete, the instances will begin taking traffic again and the next batch will begin. This continues until all instances brought up-to-date. + Rolling + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradePolicy.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradePolicy.Serialization.cs new file mode 100644 index 000000000000..b8057bc20b75 --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradePolicy.Serialization.cs @@ -0,0 +1,149 @@ +// 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; + +namespace Azure.ResourceManager.Batch.Models +{ + public partial class UpgradePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToSerialString()); + if (AutomaticOSUpgradePolicy != null) + { + writer.WritePropertyName("automaticOSUpgradePolicy"u8); + writer.WriteObjectValue(AutomaticOSUpgradePolicy); + } + if (RollingUpgradePolicy != null) + { + writer.WritePropertyName("rollingUpgradePolicy"u8); + writer.WriteObjectValue(RollingUpgradePolicy); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UpgradePolicy 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(UpgradePolicy)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUpgradePolicy(document.RootElement, options); + } + + internal static UpgradePolicy DeserializeUpgradePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + UpgradeMode mode = default; + AutomaticOSUpgradePolicy automaticOSUpgradePolicy = default; + RollingUpgradePolicy rollingUpgradePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = property.Value.GetString().ToUpgradeMode(); + continue; + } + if (property.NameEquals("automaticOSUpgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + automaticOSUpgradePolicy = AutomaticOSUpgradePolicy.DeserializeAutomaticOSUpgradePolicy(property.Value, options); + continue; + } + if (property.NameEquals("rollingUpgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rollingUpgradePolicy = RollingUpgradePolicy.DeserializeRollingUpgradePolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new UpgradePolicy(mode, automaticOSUpgradePolicy, rollingUpgradePolicy, serializedAdditionalRawData); + } + + 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); + default: + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support '{options.Format}' format."); + } + } + + UpgradePolicy 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); + return DeserializeUpgradePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradePolicy.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradePolicy.cs new file mode 100644 index 000000000000..8471c9e7eccb --- /dev/null +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/Models/UpgradePolicy.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Batch.Models +{ + /// Describes an upgrade policy - automatic, manual, or rolling. + public partial class UpgradePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// 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" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + public UpgradePolicy(UpgradeMode mode) + { + Mode = mode; + } + + /// Initializes a new instance of . + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + /// The configuration parameters used for performing automatic OS upgrade. + /// This property is only supported on Pools with the virtualMachineConfiguration property. + /// Keeps track of any properties unknown to the library. + internal UpgradePolicy(UpgradeMode mode, AutomaticOSUpgradePolicy automaticOSUpgradePolicy, RollingUpgradePolicy rollingUpgradePolicy, IDictionary serializedAdditionalRawData) + { + Mode = mode; + AutomaticOSUpgradePolicy = automaticOSUpgradePolicy; + RollingUpgradePolicy = rollingUpgradePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UpgradePolicy() + { + } + + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + public UpgradeMode Mode { get; set; } + /// The configuration parameters used for performing automatic OS upgrade. + public AutomaticOSUpgradePolicy AutomaticOSUpgradePolicy { get; set; } + /// This property is only supported on Pools with the virtualMachineConfiguration property. + public RollingUpgradePolicy RollingUpgradePolicy { get; set; } + } +} diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationPackageRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationPackageRestOperations.cs index a0eb48db0ac9..6f5bded9af3b 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationPackageRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationPackageRestOperations.cs @@ -33,7 +33,7 @@ public ApplicationPackageRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationRestOperations.cs index 3e73960234ad..1aaa7b7c51c9 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/ApplicationRestOperations.cs @@ -33,7 +33,7 @@ public ApplicationRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/BatchAccountRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/BatchAccountRestOperations.cs index d15c14618697..3705b442fc2f 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/BatchAccountRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/BatchAccountRestOperations.cs @@ -33,7 +33,7 @@ public BatchAccountRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/CertificateRestOperations.cs index 85ac3e0f4124..f7261f7c82c2 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/CertificateRestOperations.cs @@ -33,7 +33,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/LocationRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/LocationRestOperations.cs index e2e88ecab390..922915c5548f 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/LocationRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/LocationRestOperations.cs @@ -33,7 +33,7 @@ public LocationRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PoolRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PoolRestOperations.cs index 0857a20e2bf0..0fbb4b6a0410 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PoolRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PoolRestOperations.cs @@ -33,7 +33,7 @@ public PoolRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs index 70413bcff99e..80ab5bbe1f8e 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateLinkResourceRestOperations.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateLinkResourceRestOperations.cs index b4a8dcc111a4..d6910c59f217 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateLinkResourceRestOperations.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/RestOperations/PrivateLinkResourceRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourceRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/autorest.md b/sdk/batch/Azure.ResourceManager.Batch/src/autorest.md index d0daf1cfb78b..950f7d47f460 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/autorest.md +++ b/sdk/batch/Azure.ResourceManager.Batch/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Batch namespace: Azure.ResourceManager.Batch -require: https://github.com/Azure/azure-rest-api-specs/blob/408db257fe67fc66d8c66c10881be8d414d5e5f3/specification/batch/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/batch/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true