diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs index 454fab20d2b7..e89914d13c51 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.net8.0.cs @@ -246,6 +246,7 @@ public ServiceFabricManagedClusterData(Azure.Core.AzureLocation location, Azure. public string SubnetId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy UpgradeDescription { get { throw null; } set { } } public bool? UseCustomVnet { get { throw null; } set { } } + public string VmImage { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? ZonalUpdateMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -267,6 +268,10 @@ protected ServiceFabricManagedClusterResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedAzResiliencyStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedAzResiliencyStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedMaintenanceWindowStatu(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -288,6 +293,10 @@ protected ServiceFabricManagedClusterResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData 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.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -310,6 +319,12 @@ public static partial class ServiceFabricManagedClustersExtensions public static System.Threading.Tasks.Task> GetManagedUnsupportedVmSizeAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string vmSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetManagedUnsupportedVmSizes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetManagedUnsupportedVmSizesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ArmOperation GetOperationResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task GetOperationResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetOperations(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOperationsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetOperationStatu(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetOperationStatuAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -370,6 +385,7 @@ public ServiceFabricManagedNodeTypeData() { } public System.Collections.Generic.IList NetworkSecurityRules { get { throw null; } } public System.Collections.Generic.IDictionary PlacementProperties { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType? SecurityEncryptionType { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? SecurityType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku Sku { get { throw null; } set { } } @@ -393,6 +409,7 @@ public ServiceFabricManagedNodeTypeData() { } public System.Collections.Generic.IList VmSetupActions { get { throw null; } } public Azure.Core.ResourceIdentifier VmSharedGalleryImageId { get { throw null; } set { } } public string VmSize { get { throw null; } set { } } + public bool? ZoneBalance { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -410,6 +427,8 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deallocate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation DeleteNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -418,6 +437,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAvailableSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ReimageAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -426,6 +451,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData 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.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -524,9 +555,19 @@ protected MockableServiceFabricManagedClustersSubscriptionResource() { } public virtual System.Threading.Tasks.Task> GetManagedUnsupportedVmSizeAsync(Azure.Core.AzureLocation location, string vmSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetManagedUnsupportedVmSizes(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetManagedUnsupportedVmSizesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetOperationResult(Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetOperationResultAsync(Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOperationStatu(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetOperationStatuAsync(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetServiceFabricManagedClusters(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetServiceFabricManagedClustersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableServiceFabricManagedClustersTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableServiceFabricManagedClustersTenantResource() { } + public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -589,24 +630,32 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ArmServiceFabricManagedClustersModelFactory { + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay AvailableOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError ErrorModelError(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation FaultSimulation(string simulationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails details = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, System.Collections.Generic.IEnumerable nodeTypeFaultSimulation = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.LongRunningOperationResult LongRunningOperationResult(string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), string status = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError error = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedAzResiliencyStatus ManagedAzResiliencyStatus(System.Collections.Generic.IEnumerable baseResourceStatus = null, bool? isClusterZoneResilient = default(bool?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool? isWindowEnabled = default(bool?), bool? isRegionReady = default(bool?), bool? isWindowActive = default(bool?), bool? canApplyUpdates = default(bool?), System.DateTimeOffset? lastWindowStatusUpdatedOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowEndOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeAvailableSku NodeTypeAvailableSku(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku sku = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity capacity = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), string operationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? operationStatus = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType? scaleType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, string publisher = null, string vmssExtensionPropertiesType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, string forceUpdateTag = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null, string provisioningState = null, bool? isAutomaticUpgradeEnabled = default(bool?), System.Collections.Generic.IEnumerable setupOrder = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.OperationResult OperationResult(string name = null, bool? isDataAction = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay display = null, string origin = null, string nextLink = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ResourceAzStatus ResourceAzStatus(string resourceName = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), bool? isZoneResilient = default(bool?), string details = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, System.Collections.Generic.IEnumerable managedIdentities = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable managedIdentities = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, System.Uri appPackageUri = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, System.Net.IPAddress ipv4Address, System.Guid? clusterId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState, System.Collections.Generic.IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, System.Collections.Generic.IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable clients, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory, System.Collections.Generic.IEnumerable fabricSettings, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence, System.Collections.Generic.IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, System.Collections.Generic.IEnumerable ipTags, System.Net.IPAddress ipv6Address, bool? isServicePublicIPEnabled, System.Collections.Generic.IEnumerable auxiliarySubnets, System.Collections.Generic.IEnumerable serviceEndpoints, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, Azure.Core.ResourceIdentifier publicIPPrefixId, Azure.Core.ResourceIdentifier publicIPv6PrefixId, Azure.Core.ResourceIdentifier ddosProtectionPlanId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, Azure.ETag? etag) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?), string dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), string vmImage = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterCodeVersion = null, System.DateTimeOffset? versionSupportExpireOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType? osType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, System.Collections.Generic.IDictionary placementProperties, System.Collections.Generic.IDictionary capacities, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, System.Collections.Generic.IEnumerable vmSecrets, System.Collections.Generic.IEnumerable vmExtensions, System.Collections.Generic.IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, System.Collections.Generic.IEnumerable frontendConfigurations, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, System.Collections.Generic.IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy, Azure.Core.ResourceIdentifier vmImageResourceId, Azure.Core.ResourceIdentifier subnetId, System.Collections.Generic.IEnumerable vmSetupActions, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, Azure.Core.ResourceIdentifier vmSharedGalleryImageId, Azure.Core.ResourceIdentifier natGatewayId, System.Collections.Generic.IEnumerable natConfigurations, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan, Azure.Core.ResourceIdentifier serviceArtifactReferenceId, Azure.Core.ResourceIdentifier dscpConfigurationId, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, System.Collections.Generic.IDictionary tags) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType? securityEncryptionType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, bool? zoneBalance = default(bool?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedServiceData ServiceFabricManagedServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties properties = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string vmSize = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null, bool? hasPersistedState = default(bool?), int? targetReplicaSetSize = default(int?), int? minReplicaSetSize = default(int?), System.TimeSpan? replicaRestartWaitDuration = default(System.TimeSpan?), System.TimeSpan? quorumLossWaitDuration = default(System.TimeSpan?), System.TimeSpan? standByReplicaKeepDuration = default(System.TimeSpan?), System.TimeSpan? servicePlacementTimeLimit = default(System.TimeSpan?)) { throw null; } @@ -632,6 +681,20 @@ public static partial class ArmServiceFabricManagedClustersModelFactory public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } public override string ToString() { throw null; } } + public partial class AvailableOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AvailableOperationDisplay() { } + public string Description { get { throw null; } } + public string Operation { get { throw null; } } + public string Provider { get { throw null; } } + public string Resource { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay 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.ServiceFabricManagedClusters.Models.AvailableOperationDisplay 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 AveragePartitionLoadScalingTrigger : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThreshold, double upperLoadThreshold, string scaleInterval) { } @@ -697,6 +760,119 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ErrorModelError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ErrorModelError() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError 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.ServiceFabricManagedClusters.Models.ErrorModelError 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 FaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulation() { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails Details { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string SimulationId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation 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.ServiceFabricManagedClusters.Models.FaultSimulation 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 abstract partial class FaultSimulationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected FaultSimulationContent() { } + public System.DateTimeOffset? ConstraintsExpireOn { get { throw null; } set { } } + public bool? Force { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent 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.ServiceFabricManagedClusters.Models.FaultSimulationContent 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 FaultSimulationContentWrapper : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationContentWrapper(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters) { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper 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.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper 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 FaultSimulationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulationDetails() { } + public string ClusterId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NodeTypeFaultSimulation { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails 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.ServiceFabricManagedClusters.Models.FaultSimulationDetails 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 FaultSimulationIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationIdContent(string simulationId) { } + public string SimulationId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent 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.ServiceFabricManagedClusters.Models.FaultSimulationIdContent 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaultSimulationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaultSimulationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Active { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Done { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StartFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Starting { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StopFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LongRunningOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LongRunningOperationResult() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError Error { get { throw null; } } + public string Name { get { throw null; } } + public double? PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.LongRunningOperationResult 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.ServiceFabricManagedClusters.Models.LongRunningOperationResult 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 ManagedAzResiliencyStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ManagedAzResiliencyStatus() { } @@ -1229,6 +1405,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NodeTypeFaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NodeTypeFaultSimulation() { } + public string NodeTypeName { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? OperationStatus { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation 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.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation 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 NodeTypeFrontendConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NodeTypeFrontendConfiguration() { } @@ -1392,6 +1582,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OperationResult() { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay Display { get { throw null; } } + public bool? IsDataAction { get { throw null; } } + public string Name { get { throw null; } } + public string NextLink { get { throw null; } } + public string Origin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.OperationResult 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.ServiceFabricManagedClusters.Models.OperationResult 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 PartitionInstanceCountScalingMechanism : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingMechanism, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartitionInstanceCountScalingMechanism(int minInstanceCount, int maxInstanceCount, int scaleIncrement) { } @@ -1482,6 +1687,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecurityEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecurityEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType DiskWithVmGuestState { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType VmGuestStateOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ServiceFabricManagedApplicationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServiceFabricManagedApplicationPatch() { } @@ -1615,6 +1838,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ServiceFabricManagedClusterSecurityType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType ConfidentialVm { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType Standard { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType TrustedLaunch { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType other) { throw null; } @@ -1716,6 +1940,9 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write private readonly int _dummyPrimitive; public ServiceFabricManagedDataDiskType(string value) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumLrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumV2LRS { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZRS { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardLrs { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardSsdLrs { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType other) { throw null; } @@ -1974,6 +2201,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SfmcOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SfmcOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Aborted { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Created { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Started { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class SingletonPartitionScheme : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SingletonPartitionScheme() { } @@ -2112,4 +2361,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode right) { throw null; } public override string ToString() { throw null; } } + public partial class ZoneFaultSimulationContent : Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ZoneFaultSimulationContent() { } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent 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.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs index 454fab20d2b7..e89914d13c51 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/api/Azure.ResourceManager.ServiceFabricManagedClusters.netstandard2.0.cs @@ -246,6 +246,7 @@ public ServiceFabricManagedClusterData(Azure.Core.AzureLocation location, Azure. public string SubnetId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy UpgradeDescription { get { throw null; } set { } } public bool? UseCustomVnet { get { throw null; } set { } } + public string VmImage { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? ZonalUpdateMode { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -267,6 +268,10 @@ protected ServiceFabricManagedClusterResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedAzResiliencyStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetManagedAzResiliencyStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetManagedMaintenanceWindowStatu(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -288,6 +293,10 @@ protected ServiceFabricManagedClusterResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData 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.ServiceFabricManagedClusters.ServiceFabricManagedClusterData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -310,6 +319,12 @@ public static partial class ServiceFabricManagedClustersExtensions public static System.Threading.Tasks.Task> GetManagedUnsupportedVmSizeAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string vmSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetManagedUnsupportedVmSizes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetManagedUnsupportedVmSizesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ArmOperation GetOperationResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task GetOperationResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetOperations(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOperationsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetOperationStatu(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetOperationStatuAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -370,6 +385,7 @@ public ServiceFabricManagedNodeTypeData() { } public System.Collections.Generic.IList NetworkSecurityRules { get { throw null; } } public System.Collections.Generic.IDictionary PlacementProperties { get { throw null; } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType? SecurityEncryptionType { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? SecurityType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ServiceArtifactReferenceId { get { throw null; } set { } } public Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku Sku { get { throw null; } set { } } @@ -393,6 +409,7 @@ public ServiceFabricManagedNodeTypeData() { } public System.Collections.Generic.IList VmSetupActions { get { throw null; } } public Azure.Core.ResourceIdentifier VmSharedGalleryImageId { get { throw null; } set { } } public string VmSize { get { throw null; } set { } } + public bool? ZoneBalance { get { throw null; } set { } } public System.Collections.Generic.IList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -410,6 +427,8 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deallocate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeallocateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation DeleteNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -418,6 +437,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAvailableSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFaultSimulation(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetFaultSimulation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFaultSimulationAsync(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFaultSimulationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ReimageAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -426,6 +451,12 @@ protected ServiceFabricManagedNodeTypeResource() { } public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StartFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper faultSimulationContentWrapper, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation StopFaultSimulation(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StopFaultSimulationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData 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.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -524,9 +555,19 @@ protected MockableServiceFabricManagedClustersSubscriptionResource() { } public virtual System.Threading.Tasks.Task> GetManagedUnsupportedVmSizeAsync(Azure.Core.AzureLocation location, string vmSize, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetManagedUnsupportedVmSizes(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetManagedUnsupportedVmSizesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetOperationResult(Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetOperationResultAsync(Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOperationStatu(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetOperationStatuAsync(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetServiceFabricManagedClusters(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetServiceFabricManagedClustersAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableServiceFabricManagedClustersTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableServiceFabricManagedClustersTenantResource() { } + public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -589,24 +630,32 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ArmServiceFabricManagedClustersModelFactory { + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay AvailableOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError ErrorModelError(string code = null, string message = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation FaultSimulation(string simulationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails details = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, System.Collections.Generic.IEnumerable nodeTypeFaultSimulation = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.LongRunningOperationResult LongRunningOperationResult(string name = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), double? percentComplete = default(double?), string status = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError error = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedAzResiliencyStatus ManagedAzResiliencyStatus(System.Collections.Generic.IEnumerable baseResourceStatus = null, bool? isClusterZoneResilient = default(bool?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool? isWindowEnabled = default(bool?), bool? isRegionReady = default(bool?), bool? isWindowActive = default(bool?), bool? canApplyUpdates = default(bool?), System.DateTimeOffset? lastWindowStatusUpdatedOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastWindowEndOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeAvailableSku NodeTypeAvailableSku(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku sku = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity capacity = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? status = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus?), string operationId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? operationStatus = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType? scaleType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSkuScaleType?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, string publisher = null, string vmssExtensionPropertiesType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = default(bool?), System.BinaryData settings = null, System.BinaryData protectedSettings = null, string forceUpdateTag = null, System.Collections.Generic.IEnumerable provisionAfterExtensions = null, string provisioningState = null, bool? isAutomaticUpgradeEnabled = default(bool?), System.Collections.Generic.IEnumerable setupOrder = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.OperationResult OperationResult(string name = null, bool? isDataAction = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay display = null, string origin = null, string nextLink = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ResourceAzStatus ResourceAzStatus(string resourceName = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), bool? isZoneResilient = default(bool?), string details = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, System.Collections.Generic.IEnumerable managedIdentities = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable managedIdentities = null, string provisioningState = null, string version = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ApplicationUpgradePolicy upgradePolicy = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, System.Uri appPackageUri = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, System.Net.IPAddress ipv4Address, System.Guid? clusterId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState, System.Collections.Generic.IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, System.Collections.Generic.IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable clients, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory, System.Collections.Generic.IEnumerable fabricSettings, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence, System.Collections.Generic.IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, System.Collections.Generic.IEnumerable ipTags, System.Net.IPAddress ipv6Address, bool? isServicePublicIPEnabled, System.Collections.Generic.IEnumerable auxiliarySubnets, System.Collections.Generic.IEnumerable serviceEndpoints, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, Azure.Core.ResourceIdentifier publicIPPrefixId, Azure.Core.ResourceIdentifier publicIPv6PrefixId, Azure.Core.ResourceIdentifier ddosProtectionPlanId, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, Azure.ETag? etag) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?), string dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string dnsName = null, string fqdn = null, System.Net.IPAddress ipv4Address = null, System.Guid? clusterId = default(System.Guid?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState? clusterState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterState?), System.Collections.Generic.IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = default(int?), int? httpGatewayConnectionPort = default(int?), string adminUserName = null, string adminPassword = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = default(bool?), System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable clients = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterAzureActiveDirectory azureActiveDirectory = null, System.Collections.Generic.IEnumerable fabricSettings = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), string clusterCodeVersion = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode? clusterUpgradeMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeMode?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence? clusterUpgradeCadence = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradeCadence?), System.Collections.Generic.IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = default(bool?), bool? hasZoneResiliency = default(bool?), int? maxUnusedVersionsToKeep = default(int?), bool? isIPv6Enabled = default(bool?), string subnetId = null, System.Collections.Generic.IEnumerable ipTags = null, System.Net.IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = default(bool?), System.Collections.Generic.IEnumerable auxiliarySubnets = null, System.Collections.Generic.IEnumerable serviceEndpoints = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode? zonalUpdateMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode?), bool? useCustomVnet = default(bool?), Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier publicIPv6PrefixId = null, Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = default(int?), bool? isHttpGatewayExclusiveAuthModeEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope?), int? allocatedOutboundPorts = default(int?), string vmImage = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName? skuName = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClustersSkuName?)) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterCodeVersion = null, System.DateTimeOffset? versionSupportExpireOn = default(System.DateTimeOffset?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType? osType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterOSType?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, System.Collections.Generic.IDictionary placementProperties, System.Collections.Generic.IDictionary capacities, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, System.Collections.Generic.IEnumerable vmSecrets, System.Collections.Generic.IEnumerable vmExtensions, System.Collections.Generic.IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, System.Collections.Generic.IEnumerable frontendConfigurations, System.Collections.Generic.IEnumerable networkSecurityRules, System.Collections.Generic.IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, System.Collections.Generic.IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy, Azure.Core.ResourceIdentifier vmImageResourceId, Azure.Core.ResourceIdentifier subnetId, System.Collections.Generic.IEnumerable vmSetupActions, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, Azure.Core.ResourceIdentifier vmSharedGalleryImageId, Azure.Core.ResourceIdentifier natGatewayId, System.Collections.Generic.IEnumerable natConfigurations, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan, Azure.Core.ResourceIdentifier serviceArtifactReferenceId, Azure.Core.ResourceIdentifier dscpConfigurationId, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, System.Collections.Generic.IDictionary tags) { throw null; } - public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isPrimary = default(bool?), int? vmInstanceCount = default(int?), int? dataDiskSizeInGB = default(int?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType? dataDiskType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType?), string dataDiskLetter = null, System.Collections.Generic.IDictionary placementProperties = null, System.Collections.Generic.IDictionary capacities = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription applicationPorts = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, System.Collections.Generic.IEnumerable vmSecrets = null, System.Collections.Generic.IEnumerable vmExtensions = null, System.Collections.Generic.IEnumerable userAssignedIdentities = null, bool? isStateless = default(bool?), bool? hasMultiplePlacementGroups = default(bool?), System.Collections.Generic.IEnumerable frontendConfigurations = null, System.Collections.Generic.IEnumerable networkSecurityRules = null, System.Collections.Generic.IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = default(bool?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedResourceProvisioningState?), bool? isAcceleratedNetworkingEnabled = default(bool?), bool? useDefaultPublicLoadBalancer = default(bool?), bool? useTempDataDisk = default(bool?), bool? isOverProvisioningEnabled = default(bool?), System.Collections.Generic.IEnumerable zones = null, bool? isSpotVm = default(bool?), string hostGroupId = null, bool? useEphemeralOSDisk = default(bool?), string spotRestoreTimeout = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType? evictionPolicy = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SpotNodeVmEvictionPolicyType?), Azure.Core.ResourceIdentifier vmImageResourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Collections.Generic.IEnumerable vmSetupActions = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType? securityType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType?), Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType? securityEncryptionType = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType?), bool? isSecureBootEnabled = default(bool?), bool? isNodePublicIPEnabled = default(bool?), bool? isNodePublicIPv6Enabled = default(bool?), Azure.Core.ResourceIdentifier vmSharedGalleryImageId = null, Azure.Core.ResourceIdentifier natGatewayId = null, System.Collections.Generic.IEnumerable natConfigurations = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.VmImagePlan vmImagePlan = null, Azure.Core.ResourceIdentifier serviceArtifactReferenceId = null, Azure.Core.ResourceIdentifier dscpConfigurationId = null, System.Collections.Generic.IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, System.Collections.Generic.IEnumerable vmApplications = null, bool? zoneBalance = default(bool?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeSku sku = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.ServiceFabricManagedServiceData ServiceFabricManagedServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceProperties properties = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string vmSize = null) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, System.Collections.Generic.IEnumerable correlationScheme = null, System.Collections.Generic.IEnumerable serviceLoadMetrics = null, System.Collections.Generic.IEnumerable servicePlacementPolicies = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost? defaultMoveCost = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedServiceMoveCost?), System.Collections.Generic.IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme partitionDescription = null, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode? servicePackageActivationMode = default(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePackageActivationMode?), string serviceDnsName = null, bool? hasPersistedState = default(bool?), int? targetReplicaSetSize = default(int?), int? minReplicaSetSize = default(int?), System.TimeSpan? replicaRestartWaitDuration = default(System.TimeSpan?), System.TimeSpan? quorumLossWaitDuration = default(System.TimeSpan?), System.TimeSpan? standByReplicaKeepDuration = default(System.TimeSpan?), System.TimeSpan? servicePlacementTimeLimit = default(System.TimeSpan?)) { throw null; } @@ -632,6 +681,20 @@ public static partial class ArmServiceFabricManagedClustersModelFactory public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } public override string ToString() { throw null; } } + public partial class AvailableOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AvailableOperationDisplay() { } + public string Description { get { throw null; } } + public string Operation { get { throw null; } } + public string Provider { get { throw null; } } + public string Resource { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay 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.ServiceFabricManagedClusters.Models.AvailableOperationDisplay 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 AveragePartitionLoadScalingTrigger : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThreshold, double upperLoadThreshold, string scaleInterval) { } @@ -697,6 +760,119 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ErrorModelError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ErrorModelError() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError 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.ServiceFabricManagedClusters.Models.ErrorModelError 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 FaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulation() { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails Details { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string SimulationId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulation 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.ServiceFabricManagedClusters.Models.FaultSimulation 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 abstract partial class FaultSimulationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected FaultSimulationContent() { } + public System.DateTimeOffset? ConstraintsExpireOn { get { throw null; } set { } } + public bool? Force { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent 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.ServiceFabricManagedClusters.Models.FaultSimulationContent 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 FaultSimulationContentWrapper : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationContentWrapper(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent parameters) { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper 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.ServiceFabricManagedClusters.Models.FaultSimulationContentWrapper 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 FaultSimulationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaultSimulationDetails() { } + public string ClusterId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NodeTypeFaultSimulation { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent Parameters { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationDetails 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.ServiceFabricManagedClusters.Models.FaultSimulationDetails 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 FaultSimulationIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FaultSimulationIdContent(string simulationId) { } + public string SimulationId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationIdContent 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.ServiceFabricManagedClusters.Models.FaultSimulationIdContent 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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaultSimulationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaultSimulationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Active { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Done { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StartFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Starting { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus StopFailed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus Stopping { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LongRunningOperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LongRunningOperationResult() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.ErrorModelError Error { get { throw null; } } + public string Name { get { throw null; } } + public double? PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.LongRunningOperationResult 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.ServiceFabricManagedClusters.Models.LongRunningOperationResult 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 ManagedAzResiliencyStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ManagedAzResiliencyStatus() { } @@ -1229,6 +1405,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NodeTypeFaultSimulation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NodeTypeFaultSimulation() { } + public string NodeTypeName { get { throw null; } } + public string OperationId { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus? OperationStatus { get { throw null; } } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation 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.ServiceFabricManagedClusters.Models.NodeTypeFaultSimulation 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 NodeTypeFrontendConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NodeTypeFrontendConfiguration() { } @@ -1392,6 +1582,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OperationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OperationResult() { } + public Azure.ResourceManager.ServiceFabricManagedClusters.Models.AvailableOperationDisplay Display { get { throw null; } } + public bool? IsDataAction { get { throw null; } } + public string Name { get { throw null; } } + public string NextLink { get { throw null; } } + public string Origin { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.OperationResult 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.ServiceFabricManagedClusters.Models.OperationResult 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 PartitionInstanceCountScalingMechanism : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServiceScalingMechanism, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PartitionInstanceCountScalingMechanism(int minInstanceCount, int maxInstanceCount, int scaleIncrement) { } @@ -1482,6 +1687,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecurityEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecurityEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType DiskWithVmGuestState { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType VmGuestStateOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SecurityEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ServiceFabricManagedApplicationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServiceFabricManagedApplicationPatch() { } @@ -1615,6 +1838,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ServiceFabricManagedClusterSecurityType(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType ConfidentialVm { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType Standard { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType TrustedLaunch { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedClusterSecurityType other) { throw null; } @@ -1716,6 +1940,9 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write private readonly int _dummyPrimitive; public ServiceFabricManagedDataDiskType(string value) { throw null; } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumLrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumV2LRS { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZrs { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType PremiumZRS { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardLrs { get { throw null; } } public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType StandardSsdLrs { get { throw null; } } public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ServiceFabricManagedDataDiskType other) { throw null; } @@ -1974,6 +2201,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SfmcOperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SfmcOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Aborted { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Created { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Failed { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Started { get { throw null; } } + public static Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.SfmcOperationStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class SingletonPartitionScheme : Azure.ResourceManager.ServiceFabricManagedClusters.Models.ManagedServicePartitionScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SingletonPartitionScheme() { } @@ -2112,4 +2361,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode left, Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZonalUpdateMode right) { throw null; } public override string ToString() { throw null; } } + public partial class ZoneFaultSimulationContent : Azure.ResourceManager.ServiceFabricManagedClusters.Models.FaultSimulationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ZoneFaultSimulationContent() { } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent 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.ServiceFabricManagedClusters.Models.ZoneFaultSimulationContent 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json index 2ba2d3c5d25c..df78396f0e1a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters", - "Tag": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters_1a660306c4" + "Tag": "net/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters_95465ae123" } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs similarity index 78% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs index f93bc022e2e0..84b9e5db92e0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs @@ -7,10 +7,8 @@ using System; using System.Threading.Tasks; -using System.Xml; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -21,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json - // this example is just showing the usage of "Applications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPutOperation_example_max.json + // this example is just showing the usage of "ApplicationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -42,41 +40,7 @@ public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() // invoke the operation string applicationName = "myApp"; - ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")) - { - Version = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - Parameters = -{ -["param1"] = "value1" -}, - UpgradePolicy = new ApplicationUpgradePolicy - { - ApplicationHealthPolicy = new ApplicationHealthPolicy(true, 0) - { - DefaultServiceTypeHealthPolicy = new ServiceTypeHealthPolicy(0, 0, 0), - ServiceTypeHealthPolicyMap = -{ -["service1"] = new ServiceTypeHealthPolicy(30, 30, 30) -}, - }, - ForceRestart = false, - RollingUpgradeMonitoringPolicy = new RollingUpgradeMonitoringPolicy( - PolicyViolationCompensationAction.Rollback, - XmlConvert.ToTimeSpan("00:02:00"), - XmlConvert.ToTimeSpan("00:05:00"), - XmlConvert.ToTimeSpan("00:10:00"), - XmlConvert.ToTimeSpan("01:00:00"), - XmlConvert.ToTimeSpan("00:15:00")), - InstanceCloseDelayDurationInSeconds = 600L, - UpgradeMode = RollingUpgradeMode.UnmonitoredAuto, - UpgradeReplicaSetCheckTimeout = 3600L, - RecreateApplication = false, - }, - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationName, data); ServiceFabricManagedApplicationResource result = lro.Value; @@ -91,8 +55,8 @@ public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json - // this example is just showing the usage of "Applications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPutOperation_example_min.json + // this example is just showing the usage of "ApplicationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -112,10 +76,7 @@ public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() // invoke the operation string applicationName = "myApp"; - ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")) - { - Version = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; + ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationName, data); ServiceFabricManagedApplicationResource result = lro.Value; @@ -130,8 +91,8 @@ public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -164,8 +125,8 @@ public async Task Get_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json - // this example is just showing the usage of "Applications_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationListOperation_example.json + // this example is just showing the usage of "ApplicationResource_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -200,8 +161,8 @@ public async Task GetAll_GetAListOfApplicationResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -230,8 +191,8 @@ public async Task Exists_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs similarity index 86% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs index 984161f5498b..1d336c0f4fa5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json - // this example is just showing the usage of "Applications_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationDeleteOperation_example.json + // this example is just showing the usage of "ApplicationResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnApplication() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json - // this example is just showing the usage of "Applications_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPatchOperation_example.json + // this example is just showing the usage of "ApplicationResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -96,13 +96,7 @@ public async Task Update_PatchAnApplication() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - ServiceFabricManagedApplicationPatch patch = new ServiceFabricManagedApplicationPatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationPatch patch = new ServiceFabricManagedApplicationPatch(); ServiceFabricManagedApplicationResource result = await serviceFabricManagedApplication.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well @@ -116,7 +110,7 @@ public async Task Update_PatchAnApplication() [Ignore("Only validating compilation of examples")] public async Task ReadUpgrade_GetAnApplicationUpgrade() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json + // Generated from example definition: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json // this example is just showing the usage of "Applications_ReadUpgrade" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,10 +135,10 @@ public async Task ReadUpgrade_GetAnApplicationUpgrade() [Test] [Ignore("Only validating compilation of examples")] - public async Task StartRollback_StartAnApplicationUpgradeRollback() + public async Task ResumeUpgrade_ResumeUpgrade() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json - // this example is just showing the usage of "Applications_StartRollback" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json + // this example is just showing the usage of "Applications_ResumeUpgrade" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -161,17 +155,18 @@ public async Task StartRollback_StartAnApplicationUpgradeRollback() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - await serviceFabricManagedApplication.StartRollbackAsync(WaitUntil.Completed); + RuntimeResumeApplicationUpgradeContent content = new RuntimeResumeApplicationUpgradeContent(); + await serviceFabricManagedApplication.ResumeUpgradeAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task ResumeUpgrade_ResumeUpgrade() + public async Task StartRollback_StartAnApplicationUpgradeRollback() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json - // this example is just showing the usage of "Applications_ResumeUpgrade" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationActionStartRollback_example.json + // this example is just showing the usage of "Applications_StartRollback" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -188,11 +183,7 @@ public async Task ResumeUpgrade_ResumeUpgrade() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - RuntimeResumeApplicationUpgradeContent content = new RuntimeResumeApplicationUpgradeContent - { - UpgradeDomainName = "UD1", - }; - await serviceFabricManagedApplication.ResumeUpgradeAsync(WaitUntil.Completed, content); + await serviceFabricManagedApplication.StartRollbackAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs similarity index 87% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs index 44dcc5178039..f89ba3d5db81 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json - // this example is just showing the usage of "ApplicationTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -40,7 +40,7 @@ public async Task CreateOrUpdate_PutAnApplicationType() // invoke the operation string applicationTypeName = "myAppType"; - ServiceFabricManagedApplicationTypeData data = new ServiceFabricManagedApplicationTypeData(new AzureLocation("eastus")); + ServiceFabricManagedApplicationTypeData data = new ServiceFabricManagedApplicationTypeData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationTypeName, data); ServiceFabricManagedApplicationTypeResource result = lro.Value; @@ -55,8 +55,8 @@ public async Task CreateOrUpdate_PutAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -89,8 +89,8 @@ public async Task Get_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationTypeNameResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json - // this example is just showing the usage of "ApplicationTypes_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -125,8 +125,8 @@ public async Task GetAll_GetAListOfApplicationTypeNameResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -155,8 +155,8 @@ public async Task Exists_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs similarity index 85% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs index cc07507171b4..572b52eff874 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -96,13 +96,7 @@ public async Task Update_PatchAnApplicationType() ServiceFabricManagedApplicationTypeResource serviceFabricManagedApplicationType = client.GetServiceFabricManagedApplicationTypeResource(serviceFabricManagedApplicationTypeResourceId); // invoke the operation - ServiceFabricManagedApplicationTypePatch patch = new ServiceFabricManagedApplicationTypePatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationTypePatch patch = new ServiceFabricManagedApplicationTypePatch(); ServiceFabricManagedApplicationTypeResource result = await serviceFabricManagedApplicationType.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs similarity index 87% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs index 2c05e6979767..a13e71f11c4d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeVersionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -41,10 +41,7 @@ public async Task CreateOrUpdate_PutAnApplicationTypeVersion() // invoke the operation string version = "1.0"; - ServiceFabricManagedApplicationTypeVersionData data = new ServiceFabricManagedApplicationTypeVersionData(new AzureLocation("eastus")) - { - AppPackageUri = new Uri("http://fakelink.test.com/MyAppType"), - }; + ServiceFabricManagedApplicationTypeVersionData data = new ServiceFabricManagedApplicationTypeVersionData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); ServiceFabricManagedApplicationTypeVersionResource result = lro.Value; @@ -59,8 +56,8 @@ public async Task CreateOrUpdate_PutAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -94,8 +91,8 @@ public async Task Get_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationTypeVersionResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_ListByApplicationTypes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_ListByApplicationTypes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -131,8 +128,8 @@ public async Task GetAll_GetAListOfApplicationTypeVersionResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -162,8 +159,8 @@ public async Task Exists_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs similarity index 85% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs index 3e6d04f5d223..754e61f68d13 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -52,8 +52,8 @@ public async Task Get_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -80,8 +80,8 @@ public async Task Delete_DeleteAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -99,13 +99,7 @@ public async Task Update_PatchAnApplicationTypeVersion() ServiceFabricManagedApplicationTypeVersionResource serviceFabricManagedApplicationTypeVersion = client.GetServiceFabricManagedApplicationTypeVersionResource(serviceFabricManagedApplicationTypeVersionResourceId); // invoke the operation - ServiceFabricManagedApplicationTypeVersionPatch patch = new ServiceFabricManagedApplicationTypeVersionPatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationTypeVersionPatch patch = new ServiceFabricManagedApplicationTypeVersionPatch(); ServiceFabricManagedApplicationTypeVersionResource result = await serviceFabricManagedApplicationTypeVersion.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs similarity index 62% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs index 0836901ac378..2e9969295105 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs @@ -7,7 +7,6 @@ using System; using System.Threading.Tasks; -using System.Xml; using Azure.Core; using Azure.Identity; using Azure.ResourceManager.Resources; @@ -22,8 +21,8 @@ public partial class Sample_ServiceFabricManagedClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json - // this example is just showing the usage of "ManagedClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json + // this example is just showing the usage of "ManagedCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -42,84 +41,7 @@ public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() // invoke the operation string clusterName = "mycluster"; - ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)) - { - DnsName = "mycluster", - ClientConnectionPort = 19000, - HttpGatewayConnectionPort = 19080, - AdminUserName = "vmadmin", - AdminPassword = "{vm-password}", - LoadBalancingRules = {new ManagedClusterLoadBalancingRule(80, 80, new ManagedClusterLoadBalancingRuleTransportProtocol("http"), ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 80, -}, new ManagedClusterLoadBalancingRule(443, 443, new ManagedClusterLoadBalancingRuleTransportProtocol("http"), ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 443, -}, new ManagedClusterLoadBalancingRule(10000, 10000, ManagedClusterLoadBalancingRuleTransportProtocol.Tcp, ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 10000, -LoadDistribution = "Default", -}}, - IsRdpAccessAllowed = true, - NetworkSecurityRules = {new ServiceFabricManagedNetworkSecurityRule("TestName", ServiceFabricManagedNsgProtocol.Tcp, ServiceFabricManagedNetworkTrafficAccess.Allow, 1010, ServiceFabricManagedNetworkSecurityRuleDirection.Inbound) -{ -Description = "Test description", -SourceAddressPrefixes = {"*"}, -DestinationAddressPrefixes = {"*"}, -SourcePortRanges = {"*"}, -DestinationPortRanges = {"*"}, -}, new ServiceFabricManagedNetworkSecurityRule("AllowARM", new ServiceFabricManagedNsgProtocol("*"), ServiceFabricManagedNetworkTrafficAccess.Allow, 2002, ServiceFabricManagedNetworkSecurityRuleDirection.Inbound) -{ -SourceAddressPrefix = "AzureResourceManager", -DestinationAddressPrefix = "*", -SourcePortRange = "*", -DestinationPortRange = "33500-33699", -}}, - FabricSettings = {new ClusterFabricSettingsSection("ManagedIdentityTokenService", new ClusterFabricSettingsParameterDescription[] -{ -new ClusterFabricSettingsParameterDescription("IsEnabled", "true") -})}, - ClusterCodeVersion = "7.1.168.9494", - ClusterUpgradeMode = ManagedClusterUpgradeMode.Manual, - AddOnFeatures = { ManagedClusterAddOnFeature.DnsService, ManagedClusterAddOnFeature.BackupRestoreService, ManagedClusterAddOnFeature.ResourceMonitorService }, - IsAutoOSUpgradeEnabled = true, - HasZoneResiliency = true, - MaxUnusedVersionsToKeep = 3, - IsIPv6Enabled = true, - IPTags = { new ManagedClusterIPTag("FirstPartyUsage", "SQL") }, - AuxiliarySubnets = {new ManagedClusterSubnet("testSubnet1") -{ -IsIPv6Enabled = true, -PrivateEndpointNetworkPolicies = ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.Enabled, -PrivateLinkServiceNetworkPolicies = ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.Enabled, -NetworkSecurityGroupId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"), -}}, - ServiceEndpoints = {new ManagedClusterServiceEndpoint("Microsoft.Storage") -{ -Locations = {new AzureLocation("eastus2"), new AzureLocation("usnorth")}, -}}, - ZonalUpdateMode = ZonalUpdateMode.Fast, - UseCustomVnet = true, - PublicIPPrefixId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix"), - PublicIPv6PrefixId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix"), - DdosProtectionPlanId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan"), - UpgradeDescription = new ManagedClusterUpgradePolicy - { - ForceRestart = false, - HealthPolicy = new ManagedClusterHealthPolicy(10, 30), - DeltaHealthPolicy = new ManagedClusterUpgradeDeltaHealthPolicy(20) - { - MaxPercentUpgradeDomainDeltaUnhealthyNodes = 40, - MaxPercentDeltaUnhealthyApplications = 40, - }, - MonitoringPolicy = new ManagedClusterMonitoringPolicy(XmlConvert.ToTimeSpan("00:05:00"), XmlConvert.ToTimeSpan("00:45:00"), "00:55:00", "12:00:00", "03:00:00"), - }, - HttpGatewayTokenAuthConnectionPort = 19081, - IsHttpGatewayExclusiveAuthModeEnabled = true, - AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.SubscriptionReuse, - AllocatedOutboundPorts = 0, - Tags = { }, - }; + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(default, null); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); ServiceFabricManagedClusterResource result = lro.Value; @@ -134,8 +56,8 @@ public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json - // this example is just showing the usage of "ManagedClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + // this example is just showing the usage of "ManagedCluster_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -154,18 +76,7 @@ public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() // invoke the operation string clusterName = "myCluster"; - ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)) - { - DnsName = "myCluster", - AdminUserName = "vmadmin", - AdminPassword = "{vm-password}", - FabricSettings = {new ClusterFabricSettingsSection("ManagedIdentityTokenService", new ClusterFabricSettingsParameterDescription[] -{ -new ClusterFabricSettingsParameterDescription("IsEnabled", "true") -})}, - ClusterUpgradeMode = ManagedClusterUpgradeMode.Automatic, - ClusterUpgradeCadence = ManagedClusterUpgradeCadence.Wave1, - }; + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(default, null); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); ServiceFabricManagedClusterResource result = lro.Value; @@ -180,8 +91,8 @@ public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -213,8 +124,8 @@ public async Task Get_GetACluster() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListClusterByResourceGroup() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json - // this example is just showing the usage of "ManagedClusters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + // this example is just showing the usage of "ManagedCluster_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -248,8 +159,8 @@ public async Task GetAll_ListClusterByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -277,8 +188,8 @@ public async Task Exists_GetACluster() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs similarity index 82% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs index 0bd17f608f82..f11f0cd9fc89 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -50,8 +50,8 @@ public async Task Get_GetACluster() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json - // this example is just showing the usage of "ManagedClusters_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json + // this example is just showing the usage of "ManagedCluster_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -76,8 +76,8 @@ public async Task Delete_DeleteACluster() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAManagedCluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json - // this example is just showing the usage of "ManagedClusters_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + // this example is just showing the usage of "ManagedCluster_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -93,13 +93,7 @@ public async Task Update_PatchAManagedCluster() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - ServiceFabricManagedClusterPatch patch = new ServiceFabricManagedClusterPatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedClusterPatch patch = new ServiceFabricManagedClusterPatch(); ServiceFabricManagedClusterResource result = await serviceFabricManagedCluster.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well @@ -113,8 +107,8 @@ public async Task Update_PatchAManagedCluster() [Ignore("Only validating compilation of examples")] public async Task GetManagedAzResiliencyStatus_AzResiliencyStatusOfBaseResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json - // this example is just showing the usage of "managedAzResiliencyStatus_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json + // this example is just showing the usage of "ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -137,10 +131,10 @@ public async Task GetManagedAzResiliencyStatus_AzResiliencyStatusOfBaseResources [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedMaintenanceWindowStatu_MaintenanceWindowStatus() + public async Task PostManagedApplyMaintenanceWindow_ApplyMaintenanceWindowStatus() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json - // this example is just showing the usage of "managedMaintenanceWindowStatus_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json + // this example is just showing the usage of "ManagedApplyMaintenanceWindow_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -156,17 +150,17 @@ public async Task GetManagedMaintenanceWindowStatu_MaintenanceWindowStatus() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - ManagedMaintenanceWindowStatus result = await serviceFabricManagedCluster.GetManagedMaintenanceWindowStatuAsync(); + await serviceFabricManagedCluster.PostManagedApplyMaintenanceWindowAsync(); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task PostManagedApplyMaintenanceWindow_MaintenanceWindowStatus() + public async Task GetManagedMaintenanceWindowStatu_GetMaintenanceWindowStatus() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json - // this example is just showing the usage of "managedApplyMaintenanceWindow_Post" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json + // this example is just showing the usage of "ManagedMaintenanceWindowStatus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -182,9 +176,9 @@ public async Task PostManagedApplyMaintenanceWindow_MaintenanceWindowStatus() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - await serviceFabricManagedCluster.PostManagedApplyMaintenanceWindowAsync(); + ManagedMaintenanceWindowStatus result = await serviceFabricManagedCluster.GetManagedMaintenanceWindowStatuAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs similarity index 63% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs index c26b9a8525cc..ccf71141da5b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs @@ -9,8 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.Resources.Models; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -21,8 +19,8 @@ public partial class Sample_ServiceFabricManagedNodeTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -42,43 +40,7 @@ public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = -1, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.PremiumLrs, - PlacementProperties = -{ -["HasSSD"] = "true", -["NodeColor"] = "green", -["SomeProperty"] = "5" -}, - Capacities = -{ -["ClientConnections"] = "65536" -}, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmSecrets = {new NodeTypeVaultSecretGroup(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault"), -}, new NodeTypeVaultCertificate[] -{ -new NodeTypeVaultCertificate(new Uri("https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c"), "My") -})}, - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -}}, - UserAssignedIdentities = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2") }, - IsStateless = true, - HasMultiplePlacementGroups = true, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -91,10 +53,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() + public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -113,110 +75,8 @@ public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() ServiceFabricManagedNodeTypeCollection collection = serviceFabricManagedCluster.GetServiceFabricManagedNodeTypes(); // invoke the operation - string nodeTypeName = "BE-testResourceGroup-testRegion-test"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.PremiumLrs, - DataDiskLetter = "S", - PlacementProperties = -{ -["HasSSD"] = "true", -["NodeColor"] = "green", -["SomeProperty"] = "5" -}, - Capacities = -{ -["ClientConnections"] = "65536" -}, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmSecrets = {new NodeTypeVaultSecretGroup(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault"), -}, new NodeTypeVaultCertificate[] -{ -new NodeTypeVaultCertificate(new Uri("https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c"), "My") -})}, - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -ForceUpdateTag = "v.1.0", -IsAutomaticUpgradeEnabled = true, -SetupOrder = {VmssExtensionSetupOrder.BeforeSFRuntime}, -}}, - UserAssignedIdentities = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2") }, - IsStateless = true, - HasMultiplePlacementGroups = true, - FrontendConfigurations = {new NodeTypeFrontendConfiguration -{ -LoadBalancerBackendAddressPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"), -LoadBalancerInboundNatPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"), -ApplicationGatewayBackendAddressPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"), -}}, - AdditionalDataDisks = { new NodeTypeVmssDataDisk(1, 256, ServiceFabricManagedDataDiskType.StandardSsdLrs, "F"), new NodeTypeVmssDataDisk(2, 150, ServiceFabricManagedDataDiskType.PremiumLrs, "G") }, - IsEncryptionAtHostEnabled = true, - IsAcceleratedNetworkingEnabled = true, - UseDefaultPublicLoadBalancer = true, - IsOverProvisioningEnabled = false, - IsSpotVm = true, - UseEphemeralOSDisk = true, - SpotRestoreTimeout = "PT30M", - EvictionPolicy = SpotNodeVmEvictionPolicyType.Deallocate, - SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), - VmSetupActions = { VmSetupAction.EnableContainers, VmSetupAction.EnableHyperV }, - SecurityType = ServiceFabricManagedClusterSecurityType.TrustedLaunch, - IsSecureBootEnabled = true, - IsNodePublicIPEnabled = true, - IsNodePublicIPv6Enabled = true, - NatGatewayId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway"), - ServiceArtifactReferenceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile"), - DscpConfigurationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig"), - AdditionalNetworkInterfaceConfigurations = {new AdditionalNetworkInterfaceConfiguration("nic-1", new ServiceFabricManagedClusterIPConfiguration[] -{ -new ServiceFabricManagedClusterIPConfiguration("ipconfig-1") -{ -ApplicationGatewayBackendAddressPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"), -}}, -LoadBalancerBackendAddressPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"), -}}, -LoadBalancerInboundNatPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"), -}}, -SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), -PrivateIPAddressVersion = ServiceFabricManagedClusterPrivateIPAddressVersion.IPv4, -PublicIPAddressConfiguration = new ServiceFabricManagedClusterPublicIPAddressConfiguration("publicip-1") -{ -IPTags = {new ManagedClusterIPTag("RoutingPreference", "Internet")}, -PublicIPAddressVersion = ServiceFabricManagedClusterPublicIPAddressVersion.IPv4, -}, -} -}) -{ -EnableAcceleratedNetworking = true, -DscpConfigurationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig"), -}}, - ComputerNamePrefix = "BE", - VmApplications = {new ServiceFabricManagedVmApplication(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0")) -{ -ConfigurationReference = new Uri("https://mystorageaccount.blob.core.windows.net/containername/blobname"), -EnableAutomaticUpgrade = true, -Order = 1, -VmGalleryTags = "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}", -TreatFailureAsDeploymentFailure = false, -}}, - }; + string nodeTypeName = "BE"; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -229,10 +89,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() + public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -252,17 +112,7 @@ public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -275,10 +125,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() + public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -298,25 +148,7 @@ public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServi // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -}}, - IsStateless = true, - HasMultiplePlacementGroups = true, - IsEncryptionAtHostEnabled = true, - UseTempDataDisk = true, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -329,10 +161,10 @@ public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServi [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() + public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationStateless_example.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -352,14 +184,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImageResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC"), - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -372,10 +197,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() + public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -395,22 +220,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.StandardSsdLrs, - PlacementProperties = { }, - Capacities = { }, - VmSize = "Standard_D8s_v3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2019-Datacenter", - VmImageVersion = "latest", - Zones = { "1" }, - HostGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -423,10 +233,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() + public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperation_example_max.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -445,15 +255,8 @@ public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() ServiceFabricManagedNodeTypeCollection collection = serviceFabricManagedCluster.GetServiceFabricManagedNodeTypes(); // invoke the operation - string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmSharedGalleryImageId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest"), - }; + string nodeTypeName = "BE-testResourceGroup-testRegion-test"; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -466,10 +269,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() + public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperation_example_min.json + // this example is just showing the usage of "NodeType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -489,23 +292,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImagePublisher = "testpublisher", - VmImageOffer = "windows_2022_test", - VmImageSku = "win_2022_test_20_10_gen2", - VmImageVersion = "latest", - VmImagePlan = new VmImagePlan - { - Name = "win_2022_test_20_10_gen2", - Product = "windows_2022_test", - Publisher = "testpublisher", - }, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -520,8 +307,8 @@ public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() [Ignore("Only validating compilation of examples")] public async Task Get_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -554,8 +341,8 @@ public async Task Get_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNodeTypeOfTheSpecifiedManagedCluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json - // this example is just showing the usage of "NodeTypes_ListByManagedClusters" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeListOperation_example.json + // this example is just showing the usage of "NodeType_ListByManagedClusters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -590,8 +377,8 @@ public async Task GetAll_ListNodeTypeOfTheSpecifiedManagedCluster() [Ignore("Only validating compilation of examples")] public async Task Exists_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -620,8 +407,8 @@ public async Task Exists_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs similarity index 65% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs index d2d06d2fa684..a43aea0d4ab0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedNodeTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json - // this example is just showing the usage of "NodeTypes_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeDeleteOperation_example.json + // this example is just showing the usage of "NodeType_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -76,10 +76,10 @@ public async Task Delete_DeleteANodeType() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchANodeType() + public async Task Update_PatchANodeTypeWhileAutoScaling() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json - // this example is just showing the usage of "NodeTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json + // this example is just showing the usage of "NodeType_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -96,13 +96,7 @@ public async Task Update_PatchANodeType() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch(); ArmOperation lro = await serviceFabricManagedNodeType.UpdateAsync(WaitUntil.Completed, patch); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -115,10 +109,10 @@ public async Task Update_PatchANodeType() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchANodeTypeWhileAutoScaling() + public async Task Update_PatchANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json - // this example is just showing the usage of "NodeTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePatchOperation_example.json + // this example is just showing the usage of "NodeType_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -135,18 +129,7 @@ public async Task Update_PatchANodeTypeWhileAutoScaling() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch - { - Tags = -{ -["a"] = "b" -}, - Sku = new NodeTypeSku(10) - { - Name = "Standard_S0", - Tier = "Standard", - }, - }; + ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch(); ArmOperation lro = await serviceFabricManagedNodeType.UpdateAsync(WaitUntil.Completed, patch); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -159,10 +142,10 @@ public async Task Update_PatchANodeTypeWhileAutoScaling() [Test] [Ignore("Only validating compilation of examples")] - public async Task Restart_RestartNodes() + public async Task Deallocate_DeallocateNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json - // this example is just showing the usage of "NodeTypes_Restart" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/DeallocateNodes_example.json + // this example is just showing the usage of "NodeTypes_Deallocate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -179,11 +162,92 @@ public async Task Restart_RestartNodes() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - Nodes = { "BE_0", "BE_3" }, - }; - await serviceFabricManagedNodeType.RestartAsync(WaitUntil.Completed, content); + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.DeallocateAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DeleteNode_DeleteNodes() + { + // Generated from example definition: 2025-03-01-preview/DeleteNodes_example.json + // this example is just showing the usage of "NodeTypes_DeleteNode" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.DeleteNodeAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_RedeployAllNodesByUpgradeDomain() + { + // Generated from example definition: 2025-03-01-preview/RedeployNodes_UD_example.json + // this example is just showing the usage of "NodeTypes_Redeploy" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.RedeployAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_RedeployNodes() + { + // Generated from example definition: 2025-03-01-preview/RedeployNodes_example.json + // this example is just showing the usage of "NodeTypes_Redeploy" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.RedeployAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -192,7 +256,7 @@ public async Task Restart_RestartNodes() [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimageAllNodesByUpgradeDomain() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json + // Generated from example definition: 2025-03-01-preview/ReimageNodes_UD_example.json // this example is just showing the usage of "NodeTypes_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,10 +274,7 @@ public async Task Reimage_ReimageAllNodesByUpgradeDomain() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - UpdateType = ServiceFabricManagedClusterUpdateType.ByUpgradeDomain, - }; + NodeTypeActionContent content = new NodeTypeActionContent(); await serviceFabricManagedNodeType.ReimageAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); @@ -223,7 +284,7 @@ public async Task Reimage_ReimageAllNodesByUpgradeDomain() [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimageNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json + // Generated from example definition: 2025-03-01-preview/ReimageNodes_example.json // this example is just showing the usage of "NodeTypes_Reimage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,10 +302,7 @@ public async Task Reimage_ReimageNodes() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - Nodes = { "BE_0", "BE_3" }, - }; + NodeTypeActionContent content = new NodeTypeActionContent(); await serviceFabricManagedNodeType.ReimageAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); @@ -252,10 +310,10 @@ public async Task Reimage_ReimageNodes() [Test] [Ignore("Only validating compilation of examples")] - public async Task DeleteNode_DeleteNodes() + public async Task Restart_RestartNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json - // this example is just showing the usage of "NodeTypes_DeleteNode" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/RestartNodes_example.json + // this example is just showing the usage of "NodeTypes_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -272,11 +330,36 @@ public async Task DeleteNode_DeleteNodes() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - Nodes = { "BE_0", "BE_3" }, - }; - await serviceFabricManagedNodeType.DeleteNodeAsync(WaitUntil.Completed, content); + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.RestartAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartNodes() + { + // Generated from example definition: 2025-03-01-preview/StartNodes_example.json + // this example is just showing the usage of "NodeTypes_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.StartAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -285,8 +368,8 @@ public async Task DeleteNode_DeleteNodes() [Ignore("Only validating compilation of examples")] public async Task GetAvailableSkus_ListANodeTypeSKUs() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json - // this example is just showing the usage of "NodeTypeSkus_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeSkusListOperation_example.json + // this example is just showing the usage of "NodeTypeSkus_GetAvailableSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs similarity index 80% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs index 040de985dfa1..e5ba908b63cd 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -20,8 +19,8 @@ public partial class Sample_ServiceFabricManagedServiceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePutOperation_example_max.json + // this example is just showing the usage of "ServiceResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -42,30 +41,7 @@ public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() // invoke the operation string serviceName = "myService"; - ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(new AzureLocation("eastus")) - { - Properties = new StatelessServiceProperties("myServiceType", new SingletonPartitionScheme(), 5) - { - MinInstanceCount = 3, - MinInstancePercentage = 30, - ServicePackageActivationMode = ManagedServicePackageActivationMode.SharedProcess, - ServiceDnsName = "myservicednsname.myApp", - PlacementConstraints = "NodeType==frontend", - CorrelationScheme = { new ManagedServiceCorrelation(ManagedServiceCorrelationScheme.AlignedAffinity, "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1") }, - ServiceLoadMetrics = {new ManagedServiceLoadMetric("metric1") -{ -Weight = ManagedServiceLoadMetricWeight.Low, -DefaultLoad = 3, -}}, - ServicePlacementPolicies = { new ServicePlacementNonPartiallyPlaceServicePolicy() }, - DefaultMoveCost = ServiceFabricManagedServiceMoveCost.Medium, - ScalingPolicies = { new ManagedServiceScalingPolicy(new PartitionInstanceCountScalingMechanism(3, 9, 2), new AveragePartitionLoadScalingTrigger("metricName", 2, 8, "00:01:00")) }, - }, - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); ServiceFabricManagedServiceResource result = lro.Value; @@ -80,8 +56,8 @@ public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePutOperation_example_min.json + // this example is just showing the usage of "ServiceResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -102,10 +78,7 @@ public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() // invoke the operation string serviceName = "myService"; - ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(new AzureLocation("eastus")) - { - Properties = new StatelessServiceProperties("myServiceType", new SingletonPartitionScheme(), 1), - }; + ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); ServiceFabricManagedServiceResource result = lro.Value; @@ -120,8 +93,8 @@ public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -155,8 +128,8 @@ public async Task Get_GetAService() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfServiceResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json - // this example is just showing the usage of "Services_ListByApplications" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceListOperation_example.json + // this example is just showing the usage of "ServiceResource_ListByApplications" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -192,8 +165,8 @@ public async Task GetAll_GetAListOfServiceResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -223,8 +196,8 @@ public async Task Exists_GetAService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs similarity index 86% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs index 9a829cfa3055..5759f07d68e2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -52,8 +52,8 @@ public async Task Get_GetAService() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json - // this example is just showing the usage of "Services_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceDeleteOperation_example.json + // this example is just showing the usage of "ServiceResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -80,8 +80,8 @@ public async Task Delete_DeleteAService() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json - // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePatchOperation_example.json + // this example is just showing the usage of "ServiceResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -99,13 +99,7 @@ public async Task Update_PatchAService() ServiceFabricManagedServiceResource serviceFabricManagedService = client.GetServiceFabricManagedServiceResource(serviceFabricManagedServiceResourceId); // invoke the operation - ServiceFabricManagedServicePatch patch = new ServiceFabricManagedServicePatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedServicePatch patch = new ServiceFabricManagedServicePatch(); ServiceFabricManagedServiceResource result = await serviceFabricManagedService.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 64% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 180082f38b89..67227b59444a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetServiceFabricManagedClusters_ListManagedClusters() + public async Task GetManagedClusterVersion_GetClusterVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json - // this example is just showing the usage of "ManagedClusters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionGet_example.json + // this example is just showing the usage of "ManagedClusterVersion_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -35,25 +35,20 @@ public async Task GetServiceFabricManagedClusters_ListManagedClusters() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (ServiceFabricManagedClusterResource item in subscriptionResource.GetServiceFabricManagedClustersAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ServiceFabricManagedClusterData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string clusterVersion = "7.2.477.9590"; + ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionAsync(location, clusterVersion); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersion_GetClusterVersion() + public async Task GetManagedClusterVersions_ListClusterVersions() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json - // this example is just showing the usage of "ManagedClusterVersion_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionList_example.json + // this example is just showing the usage of "ManagedClusterVersion_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -66,20 +61,22 @@ public async Task GetManagedClusterVersion_GetClusterVersion() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation + // invoke the operation and iterate over the result AzureLocation location = new AzureLocation("eastus"); - string clusterVersion = "7.2.477.9590"; - ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionAsync(location, clusterVersion); + await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvironment() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json - // this example is just showing the usage of "ManagedClusterVersion_GetByEnvironment" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json + // this example is just showing the usage of "ManagedClusterVersion_GetManagedClusterVersionByEnvironment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -103,10 +100,10 @@ public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvir [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersions_ListClusterVersions() + public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEnvironment() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json - // this example is just showing the usage of "ManagedClusterVersion_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + // this example is just showing the usage of "ManagedClusterVersion_ListByEnvironment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -121,7 +118,8 @@ public async Task GetManagedClusterVersions_ListClusterVersions() // invoke the operation and iterate over the result AzureLocation location = new AzureLocation("eastus"); - await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsAsync(location)) + ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; + await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsByEnvironmentAsync(location, environment)) { Console.WriteLine($"Succeeded: {item}"); } @@ -131,10 +129,36 @@ public async Task GetManagedClusterVersions_ListClusterVersions() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEnvironment() + public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json - // this example is just showing the usage of "ManagedClusterVersion_ListByEnvironment" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json + // this example is just showing the usage of "ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string vmSize = "Standard_B1ls1"; + ServiceFabricManagedUnsupportedVmSize result = await subscriptionResource.GetManagedUnsupportedVmSizeAsync(location, vmSize); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() + { + // Generated from example definition: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json + // this example is just showing the usage of "ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -149,8 +173,7 @@ public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEn // invoke the operation and iterate over the result AzureLocation location = new AzureLocation("eastus"); - ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; - await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsByEnvironmentAsync(location, environment)) + await foreach (ServiceFabricManagedUnsupportedVmSize item in subscriptionResource.GetManagedUnsupportedVmSizesAsync(location)) { Console.WriteLine($"Succeeded: {item}"); } @@ -160,10 +183,10 @@ public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEn [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() + public async Task GetServiceFabricManagedClusters_ListManagedClusters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json - // this example is just showing the usage of "managedUnsupportedVMSizes_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + // this example is just showing the usage of "ManagedCluster_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -177,10 +200,13 @@ public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("eastus"); - await foreach (ServiceFabricManagedUnsupportedVmSize item in subscriptionResource.GetManagedUnsupportedVmSizesAsync(location)) + await foreach (ServiceFabricManagedClusterResource item in subscriptionResource.GetServiceFabricManagedClustersAsync()) { - Console.WriteLine($"Succeeded: {item}"); + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ServiceFabricManagedClusterData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); @@ -188,10 +214,10 @@ public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() + public async Task GetOperationResult_GetLongRunningOperationResult() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json - // this example is just showing the usage of "managedUnsupportedVMSizes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/OperationResultsGet_example.json + // this example is just showing the usage of "OperationResults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -206,8 +232,60 @@ public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() // invoke the operation AzureLocation location = new AzureLocation("eastus"); - string vmSize = "Standard_B1ls1"; - ServiceFabricManagedUnsupportedVmSize result = await subscriptionResource.GetManagedUnsupportedVmSizeAsync(location, vmSize); + string operationId = "00000000-0000-0000-0000-000000001234"; + await subscriptionResource.GetOperationResultAsync(WaitUntil.Completed, location, operationId); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperationStatu_ErrorResponseDescribingWhyTheOperationFailed() + { + // Generated from example definition: 2025-03-01-preview/OperationStatusFailed_example.json + // this example is just showing the usage of "OperationStatus_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string operationId = "00000000-0000-0000-0000-000000001234"; + LongRunningOperationResult result = await subscriptionResource.GetOperationStatuAsync(location, operationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperationStatu_OKTheRequestHasSucceeded() + { + // Generated from example definition: 2025-03-01-preview/OperationStatusSucceeded_example.json + // this example is just showing the usage of "OperationStatus_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string operationId = "00000000-0000-0000-0000-000000001234"; + LongRunningOperationResult result = await subscriptionResource.GetOperationStatuAsync(location, operationId); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_TenantResourceExtensions.cs new file mode 100644 index 000000000000..09f73e427457 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples +{ + public partial class Sample_TenantResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperations_ListTheOperationsForTheProvider() + { + // Generated from example definition: 2025-03-01-preview/OperationsList_example.json + // this example is just showing the usage of "Operations_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + TenantResource tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation and iterate over the result + await foreach (OperationResult item in tenantResource.GetOperationsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownPartition.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownPartition.cs new file mode 100644 index 000000000000..da35805ae4a3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownPartition.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServicePartitionScheme")] + internal partial class UnknownPartition + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingMechanism.cs new file mode 100644 index 000000000000..4e5d958928df --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingMechanism.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServiceScalingMechanism")] + internal partial class UnknownScalingMechanism + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingTrigger.cs new file mode 100644 index 000000000000..0a87b4cfe62e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownScalingTrigger.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServiceScalingTrigger")] + internal partial class UnknownScalingTrigger + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownServicePlacementPolicy.cs new file mode 100644 index 000000000000..18b3a6147cae --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/Models/UnknownServicePlacementPolicy.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [CodeGenModel("UnknownManagedServicePlacementPolicy")] + internal partial class UnknownServicePlacementPolicy + { + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/ServiceFabricManagedApplicationData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/ServiceFabricManagedApplicationData.cs new file mode 100644 index 000000000000..a37c541f1978 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Customization/ServiceFabricManagedApplicationData.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Net; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Model factory for models. + public static partial class ArmServiceFabricManagedClustersModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Describes the managed identities for an Azure resource. + /// The current deployment or provisioning state, which only appears in the response. + /// + /// The version of the application type as defined in the application manifest. + /// This name must be the full Arm Resource ID for the referenced application type version. + /// + /// List of application parameters with overridden values from their default values specified in the application manifest. + /// Describes the policy for a monitored application upgrade. + /// List of user assigned identities for the application, each mapped to a friendly name. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, IEnumerable managedIdentities = null) + { + tags ??= new Dictionary(); + managedIdentities ??= new List(); + parameters ??= new Dictionary(); + + return new ServiceFabricManagedApplicationData( + id, + name, + resourceType, + systemData, + tags, + location, + managedIdentities?.ToList(), + provisioningState, + version, + parameters, + upgradePolicy, + identity, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs index 7e369b07153d..c1b2ea9bf8e4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs @@ -18,31 +18,75 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// Model factory for models. public static partial class ArmServiceFabricManagedClustersModelFactory { - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The name of the operation. + /// Indicates whether the operation is a data action. + /// The object that represents the operation. + /// Origin result. + /// The URL to use for getting the next set of results. + /// A new instance for mocking. + public static OperationResult OperationResult(string name = null, bool? isDataAction = null, AvailableOperationDisplay display = null, string origin = null, string nextLink = null) + { + return new OperationResult( + name, + isDataAction, + display, + origin, + nextLink, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the provider. + /// The resource on which the operation is performed. + /// The operation that can be performed. + /// Operation description. + /// A new instance for mocking. + public static AvailableOperationDisplay AvailableOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) + { + return new AvailableOperationDisplay(provider, resource, operation, description, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. + /// List of user assigned identities for the application, each mapped to a friendly name. /// The current deployment or provisioning state, which only appears in the response. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) + /// + /// The version of the application type as defined in the application manifest. + /// This name must be the full Arm Resource ID for the referenced application type version. + /// + /// List of application parameters with overridden values from their default values specified in the application manifest. + /// Describes the policy for a monitored application upgrade. + /// Describes the managed identities for an Azure resource. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable managedIdentities = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); + managedIdentities ??= new List(); + parameters ??= new Dictionary(); - return new ServiceFabricManagedApplicationTypeData( + return new ServiceFabricManagedApplicationData( id, name, resourceType, systemData, tags, location, + managedIdentities?.ToList(), provisioningState, + version, + parameters, + upgradePolicy, + identity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -50,13 +94,12 @@ public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplic /// The tags. /// The location. /// The current deployment or provisioning state, which only appears in the response. - /// The URL to the application package. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, Uri appPackageUri = null) + /// A new instance for mocking. + public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) { tags ??= new Dictionary(); - return new ServiceFabricManagedApplicationTypeVersionData( + return new ServiceFabricManagedApplicationTypeData( id, name, resourceType, @@ -64,47 +107,32 @@ public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManage tags, location, provisioningState, - appPackageUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Describes the managed identities for an Azure resource. /// The current deployment or provisioning state, which only appears in the response. - /// - /// The version of the application type as defined in the application manifest. - /// This name must be the full Arm Resource ID for the referenced application type version. - /// - /// - /// List of application parameters with overridden values from their default values specified in the application manifest. - /// Describes the policy for a monitored application upgrade. - /// List of user assigned identities for the application, each mapped to a friendly name. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, IEnumerable managedIdentities = null) + /// The URL to the application package. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, Uri appPackageUri = null) { tags ??= new Dictionary(); - parameters ??= new Dictionary(); - managedIdentities ??= new List(); - return new ServiceFabricManagedApplicationData( + return new ServiceFabricManagedApplicationTypeVersionData( id, name, resourceType, systemData, tags, location, - identity, provisioningState, - version, - parameters, - upgradePolicy, - managedIdentities?.ToList(), + appPackageUri, serializedAdditionalRawData: null); } @@ -160,7 +188,6 @@ public static ServiceFabricManagedServiceData ServiceFabricManagedServiceData(Re /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// A new instance for mocking. public static ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null) @@ -186,6 +213,162 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement serviceDnsName); } + /// Initializes a new instance of . + /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + /// A list that describes the correlation of the service with other services. + /// The service load metrics is given as an array of ServiceLoadMetric objects. + /// + /// A list that describes the correlation of the service with other services. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// Specifies the move cost for the service. + /// Scaling policies for this service. + /// The current deployment or provisioning state, which only appears in the response. + /// The name of the service type. + /// + /// Describes how the service is partitioned. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// The activation Mode of the service package. + /// + /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + /// + /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. + /// The target replica set size as a number. + /// The minimum replica set size as a number. + /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". + /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". + /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". + /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". + /// A new instance for mocking. + public static StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, bool? hasPersistedState = null, int? targetReplicaSetSize = null, int? minReplicaSetSize = null, TimeSpan? replicaRestartWaitDuration = null, TimeSpan? quorumLossWaitDuration = null, TimeSpan? standByReplicaKeepDuration = null, TimeSpan? servicePlacementTimeLimit = null) + { + correlationScheme ??= new List(); + serviceLoadMetrics ??= new List(); + servicePlacementPolicies ??= new List(); + scalingPolicies ??= new List(); + + return new StatefulServiceProperties( + placementConstraints, + correlationScheme?.ToList(), + serviceLoadMetrics?.ToList(), + servicePlacementPolicies?.ToList(), + defaultMoveCost, + scalingPolicies?.ToList(), + serializedAdditionalRawData: null, + provisioningState, + ServiceKind.Stateful, + serviceTypeName, + partitionDescription, + servicePackageActivationMode, + serviceDnsName, + hasPersistedState, + targetReplicaSetSize, + minReplicaSetSize, + replicaRestartWaitDuration, + quorumLossWaitDuration, + standByReplicaKeepDuration, + servicePlacementTimeLimit); + } + + /// Initializes a new instance of . + /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + /// A list that describes the correlation of the service with other services. + /// The service load metrics is given as an array of ServiceLoadMetric objects. + /// + /// A list that describes the correlation of the service with other services. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// Specifies the move cost for the service. + /// Scaling policies for this service. + /// The current deployment or provisioning state, which only appears in the response. + /// The name of the service type. + /// + /// Describes how the service is partitioned. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// The activation Mode of the service package. + /// + /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + /// + /// The instance count. + /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + /// MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + /// A new instance for mocking. + public static StatelessServiceProperties StatelessServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, int instanceCount = default, int? minInstanceCount = null, int? minInstancePercentage = null) + { + correlationScheme ??= new List(); + serviceLoadMetrics ??= new List(); + servicePlacementPolicies ??= new List(); + scalingPolicies ??= new List(); + + return new StatelessServiceProperties( + placementConstraints, + correlationScheme?.ToList(), + serviceLoadMetrics?.ToList(), + servicePlacementPolicies?.ToList(), + defaultMoveCost, + scalingPolicies?.ToList(), + serializedAdditionalRawData: null, + provisioningState, + ServiceKind.Stateless, + serviceTypeName, + partitionDescription, + servicePackageActivationMode, + serviceDnsName, + instanceCount, + minInstanceCount, + minInstancePercentage); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Service Fabric runtime version of the cluster. + /// The date of expiry of support of the version. + /// Cluster operating system, the default will be Windows. + /// A new instance for mocking. + public static ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterCodeVersion = null, DateTimeOffset? versionSupportExpireOn = null, ServiceFabricManagedClusterOSType? osType = null) + { + return new ServiceFabricManagedClusterVersion( + id, + name, + resourceType, + systemData, + clusterCodeVersion, + versionSupportExpireOn, + osType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// VM Size properties. + /// A new instance for mocking. + public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vmSize = null) + { + return new ServiceFabricManagedUnsupportedVmSize( + id, + name, + resourceType, + systemData, + vmSize != null ? new VmSize(vmSize, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -193,7 +376,6 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// The systemData. /// The tags. /// The location. - /// The sku of the managed cluster. /// The cluster dns name. /// The fully qualified domain name associated with the public load balancer of the cluster. /// The IPv4 address associated with the public load balancer of the cluster. @@ -212,10 +394,7 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// The list of custom fabric settings to configure the cluster. /// The provisioning state of the managed cluster resource. /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. /// List of add-on features to enable on the cluster. /// Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. @@ -238,9 +417,11 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. /// This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",. + /// The sku of the managed cluster. /// A new instance for mocking. - public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ServiceFabricManagedClustersSkuName? skuName = null, string dnsName = null, string fqdn = null, IPAddress ipv4Address = null, Guid? clusterId = null, ServiceFabricManagedClusterState? clusterState = null, IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = null, int? httpGatewayConnectionPort = null, string adminUserName = null, string adminPassword = null, IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = null, IEnumerable networkSecurityRules = null, IEnumerable clients = null, ManagedClusterAzureActiveDirectory azureActiveDirectory = null, IEnumerable fabricSettings = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, string clusterCodeVersion = null, ManagedClusterUpgradeMode? clusterUpgradeMode = null, ManagedClusterUpgradeCadence? clusterUpgradeCadence = null, IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = null, bool? hasZoneResiliency = null, int? maxUnusedVersionsToKeep = null, bool? isIPv6Enabled = null, string subnetId = null, IEnumerable ipTags = null, IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = null, IEnumerable auxiliarySubnets = null, IEnumerable serviceEndpoints = null, ZonalUpdateMode? zonalUpdateMode = null, bool? useCustomVnet = null, ResourceIdentifier publicIPPrefixId = null, ResourceIdentifier publicIPv6PrefixId = null, ResourceIdentifier ddosProtectionPlanId = null, ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = null, bool? isHttpGatewayExclusiveAuthModeEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, int? allocatedOutboundPorts = null, ETag? etag = null) + public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string dnsName = null, string fqdn = null, IPAddress ipv4Address = null, Guid? clusterId = null, ServiceFabricManagedClusterState? clusterState = null, IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = null, int? httpGatewayConnectionPort = null, string adminUserName = null, string adminPassword = null, IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = null, IEnumerable networkSecurityRules = null, IEnumerable clients = null, ManagedClusterAzureActiveDirectory azureActiveDirectory = null, IEnumerable fabricSettings = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, string clusterCodeVersion = null, ManagedClusterUpgradeMode? clusterUpgradeMode = null, ManagedClusterUpgradeCadence? clusterUpgradeCadence = null, IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = null, bool? hasZoneResiliency = null, int? maxUnusedVersionsToKeep = null, bool? isIPv6Enabled = null, string subnetId = null, IEnumerable ipTags = null, IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = null, IEnumerable auxiliarySubnets = null, IEnumerable serviceEndpoints = null, ZonalUpdateMode? zonalUpdateMode = null, bool? useCustomVnet = null, ResourceIdentifier publicIPPrefixId = null, ResourceIdentifier publicIPv6PrefixId = null, ResourceIdentifier ddosProtectionPlanId = null, ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = null, bool? isHttpGatewayExclusiveAuthModeEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, int? allocatedOutboundPorts = null, string vmImage = null, ETag? etag = null, ServiceFabricManagedClustersSkuName? skuName = null) { tags ??= new Dictionary(); clusterCertificateThumbprints ??= new List(); @@ -260,7 +441,6 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re systemData, tags, location, - skuName.HasValue ? new ServiceFabricManagedClustersSku(skuName.Value, serializedAdditionalRawData: null) : null, dnsName, fqdn, ipv4Address, @@ -302,10 +482,58 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope, allocatedOutboundPorts, + vmImage, etag, + skuName.HasValue ? new ServiceFabricManagedClustersSku(skuName.Value, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// A new instance for mocking. + public static FaultSimulation FaultSimulation(string simulationId = null, FaultSimulationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, FaultSimulationDetails details = null) + { + return new FaultSimulation( + simulationId, + status, + startOn, + endOn, + details, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// + /// Fault simulation parameters. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, IEnumerable nodeTypeFaultSimulation = null, FaultSimulationContent parameters = null) + { + nodeTypeFaultSimulation ??= new List(); + + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation?.ToList(), parameters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// A new instance for mocking. + public static NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, FaultSimulationStatus? status = null, string operationId = null, SfmcOperationStatus? operationStatus = null) + { + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// List of Managed VM Sizes for Service Fabric Managed Clusters. /// URL to get the next set of Managed VM Sizes if there are any. @@ -350,54 +578,13 @@ public static ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Service Fabric runtime version of the cluster. - /// The date of expiry of support of the version. - /// Cluster operating system, the default will be Windows. - /// A new instance for mocking. - public static ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterCodeVersion = null, DateTimeOffset? versionSupportExpireOn = null, ServiceFabricManagedClusterOSType? osType = null) - { - return new ServiceFabricManagedClusterVersion( - id, - name, - resourceType, - systemData, - clusterCodeVersion, - versionSupportExpireOn, - osType, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// VM Size properties. - /// A new instance for mocking. - public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vmSize = null) - { - return new ServiceFabricManagedUnsupportedVmSize( - id, - name, - resourceType, - systemData, - vmSize != null ? new VmSize(vmSize, serializedAdditionalRawData: null) : null, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The node type sku. /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. /// Disk size for the managed disk attached to the vms on the node type in GBs. /// Managed data disk type. Specifies the storage account type for the managed disk. /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. @@ -433,8 +620,9 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// Indicates the resource id of the vm image. This parameter is used for custom vm image. /// Indicates the resource id of the subnet for the node type. /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. @@ -446,9 +634,11 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// Specifies the settings for any additional secondary network interfaces to attach to the node type. /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. /// Specifies the gallery applications that should be made available to the underlying VMSS. - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Resource tags. + /// The node type sku. /// A new instance for mocking. - public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NodeTypeSku sku = null, bool? isPrimary = null, int? vmInstanceCount = null, int? dataDiskSizeInGB = null, ServiceFabricManagedDataDiskType? dataDiskType = null, string dataDiskLetter = null, IDictionary placementProperties = null, IDictionary capacities = null, EndpointRangeDescription applicationPorts = null, EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, IEnumerable vmSecrets = null, IEnumerable vmExtensions = null, IEnumerable userAssignedIdentities = null, bool? isStateless = null, bool? hasMultiplePlacementGroups = null, IEnumerable frontendConfigurations = null, IEnumerable networkSecurityRules = null, IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, bool? isAcceleratedNetworkingEnabled = null, bool? useDefaultPublicLoadBalancer = null, bool? useTempDataDisk = null, bool? isOverProvisioningEnabled = null, IEnumerable zones = null, bool? isSpotVm = null, string hostGroupId = null, bool? useEphemeralOSDisk = null, string spotRestoreTimeout = null, SpotNodeVmEvictionPolicyType? evictionPolicy = null, ResourceIdentifier vmImageResourceId = null, ResourceIdentifier subnetId = null, IEnumerable vmSetupActions = null, ServiceFabricManagedClusterSecurityType? securityType = null, bool? isSecureBootEnabled = null, bool? isNodePublicIPEnabled = null, bool? isNodePublicIPv6Enabled = null, ResourceIdentifier vmSharedGalleryImageId = null, ResourceIdentifier natGatewayId = null, IEnumerable natConfigurations = null, VmImagePlan vmImagePlan = null, ResourceIdentifier serviceArtifactReferenceId = null, ResourceIdentifier dscpConfigurationId = null, IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, IEnumerable vmApplications = null, IDictionary tags = null) + public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isPrimary = null, int? vmInstanceCount = null, int? dataDiskSizeInGB = null, ServiceFabricManagedDataDiskType? dataDiskType = null, string dataDiskLetter = null, IDictionary placementProperties = null, IDictionary capacities = null, EndpointRangeDescription applicationPorts = null, EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, IEnumerable vmSecrets = null, IEnumerable vmExtensions = null, IEnumerable userAssignedIdentities = null, bool? isStateless = null, bool? hasMultiplePlacementGroups = null, IEnumerable frontendConfigurations = null, IEnumerable networkSecurityRules = null, IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, bool? isAcceleratedNetworkingEnabled = null, bool? useDefaultPublicLoadBalancer = null, bool? useTempDataDisk = null, bool? isOverProvisioningEnabled = null, IEnumerable zones = null, bool? isSpotVm = null, string hostGroupId = null, bool? useEphemeralOSDisk = null, string spotRestoreTimeout = null, SpotNodeVmEvictionPolicyType? evictionPolicy = null, ResourceIdentifier vmImageResourceId = null, ResourceIdentifier subnetId = null, IEnumerable vmSetupActions = null, ServiceFabricManagedClusterSecurityType? securityType = null, SecurityEncryptionType? securityEncryptionType = null, bool? isSecureBootEnabled = null, bool? isNodePublicIPEnabled = null, bool? isNodePublicIPv6Enabled = null, ResourceIdentifier vmSharedGalleryImageId = null, ResourceIdentifier natGatewayId = null, IEnumerable natConfigurations = null, VmImagePlan vmImagePlan = null, ResourceIdentifier serviceArtifactReferenceId = null, ResourceIdentifier dscpConfigurationId = null, IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, IEnumerable vmApplications = null, bool? zoneBalance = null, IDictionary tags = null, NodeTypeSku sku = null) { placementProperties ??= new Dictionary(); capacities ??= new Dictionary(); @@ -470,7 +660,6 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( name, resourceType, systemData, - sku, isPrimary, vmInstanceCount, dataDiskSizeInGB, @@ -509,6 +698,7 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( subnetId, vmSetupActions?.ToList(), securityType, + securityEncryptionType, isSecureBootEnabled, isNodePublicIPEnabled, isNodePublicIPv6Enabled, @@ -521,7 +711,9 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( additionalNetworkInterfaceConfigurations?.ToList(), computerNamePrefix, vmApplications?.ToList(), + zoneBalance, tags, + sku, serializedAdditionalRawData: null); } @@ -561,7 +753,7 @@ public static NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, st } /// Initializes a new instance of . - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. /// The supported SKU for a for node type. /// Provides information about how the node count can be scaled. /// A new instance for mocking. @@ -572,7 +764,7 @@ public static NodeTypeAvailableSku NodeTypeAvailableSku(ResourceType? resourceTy /// Initializes a new instance of . /// The sku name. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. /// A new instance for mocking. public static NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { @@ -590,122 +782,33 @@ public static NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = null, int? return new NodeTypeSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". - /// A list that describes the correlation of the service with other services. - /// The service load metrics is given as an array of ServiceLoadMetric objects. - /// - /// A list that describes the correlation of the service with other services. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Specifies the move cost for the service. - /// Scaling policies for this service. - /// The current deployment or provisioning state, which only appears in the response. - /// The name of the service type. - /// - /// Describes how the service is partitioned. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// The activation Mode of the service package. - /// - /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// - /// - /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. - /// The target replica set size as a number. - /// The minimum replica set size as a number. - /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". - /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". - /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". - /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". - /// A new instance for mocking. - public static StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, bool? hasPersistedState = null, int? targetReplicaSetSize = null, int? minReplicaSetSize = null, TimeSpan? replicaRestartWaitDuration = null, TimeSpan? quorumLossWaitDuration = null, TimeSpan? standByReplicaKeepDuration = null, TimeSpan? servicePlacementTimeLimit = null) + /// Initializes a new instance of . + /// The name of the operation. + /// The start time of the operation. + /// The end time of the operation. + /// The completion percentage of the operation. + /// The status of the operation. + /// The operation error. + /// A new instance for mocking. + public static LongRunningOperationResult LongRunningOperationResult(string name = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, double? percentComplete = null, string status = null, ErrorModelError error = null) { - correlationScheme ??= new List(); - serviceLoadMetrics ??= new List(); - servicePlacementPolicies ??= new List(); - scalingPolicies ??= new List(); - - return new StatefulServiceProperties( - placementConstraints, - correlationScheme?.ToList(), - serviceLoadMetrics?.ToList(), - servicePlacementPolicies?.ToList(), - defaultMoveCost, - scalingPolicies?.ToList(), - serializedAdditionalRawData: null, - provisioningState, - ServiceKind.Stateful, - serviceTypeName, - partitionDescription, - servicePackageActivationMode, - serviceDnsName, - hasPersistedState, - targetReplicaSetSize, - minReplicaSetSize, - replicaRestartWaitDuration, - quorumLossWaitDuration, - standByReplicaKeepDuration, - servicePlacementTimeLimit); + return new LongRunningOperationResult( + name, + startOn, + endOn, + percentComplete, + status, + error, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". - /// A list that describes the correlation of the service with other services. - /// The service load metrics is given as an array of ServiceLoadMetric objects. - /// - /// A list that describes the correlation of the service with other services. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Specifies the move cost for the service. - /// Scaling policies for this service. - /// The current deployment or provisioning state, which only appears in the response. - /// The name of the service type. - /// - /// Describes how the service is partitioned. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// The activation Mode of the service package. - /// - /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// - /// - /// The instance count. - /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. - /// MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. - /// A new instance for mocking. - public static StatelessServiceProperties StatelessServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, int instanceCount = default, int? minInstanceCount = null, int? minInstancePercentage = null) + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// A new instance for mocking. + public static ErrorModelError ErrorModelError(string code = null, string message = null) { - correlationScheme ??= new List(); - serviceLoadMetrics ??= new List(); - servicePlacementPolicies ??= new List(); - scalingPolicies ??= new List(); - - return new StatelessServiceProperties( - placementConstraints, - correlationScheme?.ToList(), - serviceLoadMetrics?.ToList(), - servicePlacementPolicies?.ToList(), - defaultMoveCost, - scalingPolicies?.ToList(), - serializedAdditionalRawData: null, - provisioningState, - ServiceKind.Stateless, - serviceTypeName, - partitionDescription, - servicePackageActivationMode, - serviceDnsName, - instanceCount, - minInstanceCount, - minInstancePercentage); + return new ErrorModelError(code, message, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -762,7 +865,7 @@ public static StatelessServiceProperties StatelessServiceProperties(string place [EditorBrowsable(EditorBrowsableState.Never)] public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, IEnumerable networkSecurityRules, IEnumerable clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IEnumerable fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, IEnumerable ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IEnumerable auxiliarySubnets, IEnumerable serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, ETag? etag) { - return ServiceFabricManagedClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, skuName: skuName, dnsName: dnsName, fqdn: fqdn, ipv4Address: ipv4Address, clusterId: clusterId, clusterState: clusterState, clusterCertificateThumbprints: clusterCertificateThumbprints, clientConnectionPort: clientConnectionPort, httpGatewayConnectionPort: httpGatewayConnectionPort, adminUserName: adminUserName, adminPassword: adminPassword, loadBalancingRules: loadBalancingRules, isRdpAccessAllowed: isRdpAccessAllowed, networkSecurityRules: networkSecurityRules, clients: clients, azureActiveDirectory: azureActiveDirectory, fabricSettings: fabricSettings, provisioningState: provisioningState, clusterCodeVersion: clusterCodeVersion, clusterUpgradeMode: clusterUpgradeMode, clusterUpgradeCadence: clusterUpgradeCadence, addOnFeatures: addOnFeatures, isAutoOSUpgradeEnabled: isAutoOSUpgradeEnabled, hasZoneResiliency: hasZoneResiliency, maxUnusedVersionsToKeep: maxUnusedVersionsToKeep, isIPv6Enabled: isIPv6Enabled, subnetId: subnetId, ipTags: ipTags, ipv6Address: ipv6Address, isServicePublicIPEnabled: isServicePublicIPEnabled, auxiliarySubnets: auxiliarySubnets, serviceEndpoints: serviceEndpoints, zonalUpdateMode: zonalUpdateMode, useCustomVnet: useCustomVnet, publicIPPrefixId: publicIPPrefixId, publicIPv6PrefixId: publicIPv6PrefixId, ddosProtectionPlanId: ddosProtectionPlanId, upgradeDescription: upgradeDescription, httpGatewayTokenAuthConnectionPort: httpGatewayTokenAuthConnectionPort, isHttpGatewayExclusiveAuthModeEnabled: isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope: default, allocatedOutboundPorts: default, etag: etag); + return ServiceFabricManagedClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, dnsName: dnsName, fqdn: fqdn, ipv4Address: ipv4Address, clusterId: clusterId, clusterState: clusterState, clusterCertificateThumbprints: clusterCertificateThumbprints, clientConnectionPort: clientConnectionPort, httpGatewayConnectionPort: httpGatewayConnectionPort, adminUserName: adminUserName, adminPassword: adminPassword, loadBalancingRules: loadBalancingRules, isRdpAccessAllowed: isRdpAccessAllowed, networkSecurityRules: networkSecurityRules, clients: clients, azureActiveDirectory: azureActiveDirectory, fabricSettings: fabricSettings, provisioningState: provisioningState, clusterCodeVersion: clusterCodeVersion, clusterUpgradeMode: clusterUpgradeMode, clusterUpgradeCadence: clusterUpgradeCadence, addOnFeatures: addOnFeatures, isAutoOSUpgradeEnabled: isAutoOSUpgradeEnabled, hasZoneResiliency: hasZoneResiliency, maxUnusedVersionsToKeep: maxUnusedVersionsToKeep, isIPv6Enabled: isIPv6Enabled, subnetId: subnetId, ipTags: ipTags, ipv6Address: ipv6Address, isServicePublicIPEnabled: isServicePublicIPEnabled, auxiliarySubnets: auxiliarySubnets, serviceEndpoints: serviceEndpoints, zonalUpdateMode: zonalUpdateMode, useCustomVnet: useCustomVnet, publicIPPrefixId: publicIPPrefixId, publicIPv6PrefixId: publicIPv6PrefixId, ddosProtectionPlanId: ddosProtectionPlanId, upgradeDescription: upgradeDescription, httpGatewayTokenAuthConnectionPort: httpGatewayTokenAuthConnectionPort, isHttpGatewayExclusiveAuthModeEnabled: isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope: default, allocatedOutboundPorts: default, vmImage: default, etag: etag, skuName: skuName); } /// Initializes a new instance of . @@ -825,7 +928,7 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re [EditorBrowsable(EditorBrowsableState.Never)] public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IEnumerable vmSecrets, IEnumerable vmExtensions, IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, IEnumerable frontendConfigurations, IEnumerable networkSecurityRules, IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IEnumerable vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IEnumerable natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, IDictionary tags) { - return ServiceFabricManagedNodeTypeData(id: id, name: name, resourceType: resourceType, systemData: systemData, sku: sku, isPrimary: isPrimary, vmInstanceCount: vmInstanceCount, dataDiskSizeInGB: dataDiskSizeInGB, dataDiskType: dataDiskType, dataDiskLetter: dataDiskLetter, placementProperties: placementProperties, capacities: capacities, applicationPorts: applicationPorts, ephemeralPorts: ephemeralPorts, vmSize: vmSize, vmImagePublisher: vmImagePublisher, vmImageOffer: vmImageOffer, vmImageSku: vmImageSku, vmImageVersion: vmImageVersion, vmSecrets: vmSecrets, vmExtensions: vmExtensions, userAssignedIdentities: userAssignedIdentities, isStateless: isStateless, hasMultiplePlacementGroups: hasMultiplePlacementGroups, frontendConfigurations: frontendConfigurations, networkSecurityRules: networkSecurityRules, additionalDataDisks: additionalDataDisks, isEncryptionAtHostEnabled: isEncryptionAtHostEnabled, provisioningState: provisioningState, isAcceleratedNetworkingEnabled: isAcceleratedNetworkingEnabled, useDefaultPublicLoadBalancer: useDefaultPublicLoadBalancer, useTempDataDisk: useTempDataDisk, isOverProvisioningEnabled: isOverProvisioningEnabled, zones: zones, isSpotVm: isSpotVm, hostGroupId: hostGroupId, useEphemeralOSDisk: useEphemeralOSDisk, spotRestoreTimeout: spotRestoreTimeout, evictionPolicy: evictionPolicy, vmImageResourceId: vmImageResourceId, subnetId: subnetId, vmSetupActions: vmSetupActions, securityType: securityType, isSecureBootEnabled: isSecureBootEnabled, isNodePublicIPEnabled: isNodePublicIPEnabled, isNodePublicIPv6Enabled: isNodePublicIPv6Enabled, vmSharedGalleryImageId: vmSharedGalleryImageId, natGatewayId: natGatewayId, natConfigurations: natConfigurations, vmImagePlan: vmImagePlan, serviceArtifactReferenceId: serviceArtifactReferenceId, dscpConfigurationId: dscpConfigurationId, additionalNetworkInterfaceConfigurations: additionalNetworkInterfaceConfigurations, computerNamePrefix: computerNamePrefix, vmApplications: default, tags: tags); + return ServiceFabricManagedNodeTypeData(id: id, name: name, resourceType: resourceType, systemData: systemData, isPrimary: isPrimary, vmInstanceCount: vmInstanceCount, dataDiskSizeInGB: dataDiskSizeInGB, dataDiskType: dataDiskType, dataDiskLetter: dataDiskLetter, placementProperties: placementProperties, capacities: capacities, applicationPorts: applicationPorts, ephemeralPorts: ephemeralPorts, vmSize: vmSize, vmImagePublisher: vmImagePublisher, vmImageOffer: vmImageOffer, vmImageSku: vmImageSku, vmImageVersion: vmImageVersion, vmSecrets: vmSecrets, vmExtensions: vmExtensions, userAssignedIdentities: userAssignedIdentities, isStateless: isStateless, hasMultiplePlacementGroups: hasMultiplePlacementGroups, frontendConfigurations: frontendConfigurations, networkSecurityRules: networkSecurityRules, additionalDataDisks: additionalDataDisks, isEncryptionAtHostEnabled: isEncryptionAtHostEnabled, provisioningState: provisioningState, isAcceleratedNetworkingEnabled: isAcceleratedNetworkingEnabled, useDefaultPublicLoadBalancer: useDefaultPublicLoadBalancer, useTempDataDisk: useTempDataDisk, isOverProvisioningEnabled: isOverProvisioningEnabled, zones: zones, isSpotVm: isSpotVm, hostGroupId: hostGroupId, useEphemeralOSDisk: useEphemeralOSDisk, spotRestoreTimeout: spotRestoreTimeout, evictionPolicy: evictionPolicy, vmImageResourceId: vmImageResourceId, subnetId: subnetId, vmSetupActions: vmSetupActions, securityType: securityType, securityEncryptionType: default, isSecureBootEnabled: isSecureBootEnabled, isNodePublicIPEnabled: isNodePublicIPEnabled, isNodePublicIPv6Enabled: isNodePublicIPv6Enabled, vmSharedGalleryImageId: vmSharedGalleryImageId, natGatewayId: natGatewayId, natConfigurations: natConfigurations, vmImagePlan: vmImagePlan, serviceArtifactReferenceId: serviceArtifactReferenceId, dscpConfigurationId: dscpConfigurationId, additionalNetworkInterfaceConfigurations: additionalNetworkInterfaceConfigurations, computerNamePrefix: computerNamePrefix, vmApplications: default, zoneBalance: default, tags: tags, sku: sku); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs index 7d80fd5be0e9..a0e589cecd55 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(ResourceIdentifier id) + { + ServiceFabricManagedApplicationResource.ValidateResourceId(id); + return new ServiceFabricManagedApplicationResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -58,18 +70,6 @@ public virtual ServiceFabricManagedApplicationTypeVersionResource GetServiceFabr return new ServiceFabricManagedApplicationTypeVersionResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(ResourceIdentifier id) - { - ServiceFabricManagedApplicationResource.ValidateResourceId(id); - return new ServiceFabricManagedApplicationResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs index e77ca51e1c64..c1d7741186f2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual ServiceFabricManagedClusterCollection GetServiceFabricManagedClus /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetServ /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs index 4695cc8855df..926196c73a50 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs @@ -18,12 +18,16 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableServiceFabricManagedClustersSubscriptionResource : ArmResource { - private ClientDiagnostics _serviceFabricManagedClusterManagedClustersClientDiagnostics; - private ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; private ClientDiagnostics _managedClusterVersionClientDiagnostics; private ManagedClusterVersionRestOperations _managedClusterVersionRestClient; private ClientDiagnostics _managedUnsupportedVmSizesClientDiagnostics; private ManagedUnsupportedVMSizesRestOperations _managedUnsupportedVmSizesRestClient; + private ClientDiagnostics _serviceFabricManagedClusterManagedClustersClientDiagnostics; + private ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; + private ClientDiagnostics _operationResultsClientDiagnostics; + private OperationResultsRestOperations _operationResultsRestClient; + private ClientDiagnostics _operationStatusClientDiagnostics; + private OperationStatusRestOperations _operationStatusRestClient; /// Initializes a new instance of the class for mocking. protected MockableServiceFabricManagedClustersSubscriptionResource() @@ -37,12 +41,16 @@ internal MockableServiceFabricManagedClustersSubscriptionResource(ArmClient clie { } - private ClientDiagnostics ServiceFabricManagedClusterManagedClustersClientDiagnostics => _serviceFabricManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); - private ManagedClustersRestOperations ServiceFabricManagedClusterManagedClustersRestClient => _serviceFabricManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceFabricManagedClusterResource.ResourceType)); private ClientDiagnostics ManagedClusterVersionClientDiagnostics => _managedClusterVersionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); private ManagedClusterVersionRestOperations ManagedClusterVersionRestClient => _managedClusterVersionRestClient ??= new ManagedClusterVersionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics managedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVmSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ManagedUnsupportedVMSizesRestOperations managedUnsupportedVMSizesRestClient => _managedUnsupportedVmSizesRestClient ??= new ManagedUnsupportedVMSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ManagedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVmSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ManagedUnsupportedVMSizesRestOperations ManagedUnsupportedVMSizesRestClient => _managedUnsupportedVmSizesRestClient ??= new ManagedUnsupportedVMSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ServiceFabricManagedClusterManagedClustersClientDiagnostics => _serviceFabricManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); + private ManagedClustersRestOperations ServiceFabricManagedClusterManagedClustersRestClient => _serviceFabricManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceFabricManagedClusterResource.ResourceType)); + private ClientDiagnostics OperationResultsClientDiagnostics => _operationResultsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationResultsRestOperations OperationResultsRestClient => _operationResultsRestClient ??= new OperationResultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics OperationStatusClientDiagnostics => _operationStatusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationStatusRestOperations OperationStatusRestClient => _operationStatusRestClient ??= new OperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -50,66 +58,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters - /// - /// - /// Operation Id - /// ManagedClusters_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetServiceFabricManagedClustersAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); - } - - /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters - /// - /// - /// Operation Id - /// ManagedClusters_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetServiceFabricManagedClusters(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); - } - /// /// Gets information about an available Service Fabric managed cluster code version. /// @@ -123,7 +71,7 @@ public virtual Pageable GetServiceFabricMan /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -163,7 +111,7 @@ public virtual async Task> GetManag /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -190,6 +138,58 @@ public virtual Response GetManagedClusterVer } } + /// + /// Gets all available code versions for Service Fabric cluster resources by location. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// + /// + /// Operation Id + /// ManagedClusterVersion_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedClusterVersionsAsync(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + } + + /// + /// Gets all available code versions for Service Fabric cluster resources by location. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// + /// + /// Operation Id + /// ManagedClusterVersion_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedClusterVersions(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + } + /// /// Gets information about an available Service Fabric cluster code version by environment. /// @@ -199,16 +199,16 @@ public virtual Response GetManagedClusterVer /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -221,7 +221,7 @@ public virtual async Task> GetManag scope.Start(); try { - var response = await ManagedClusterVersionRestClient.GetByEnvironmentAsync(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken).ConfigureAwait(false); + var response = await ManagedClusterVersionRestClient.GetManagedClusterVersionByEnvironmentAsync(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -240,16 +240,16 @@ public virtual async Task> GetManag /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -262,7 +262,7 @@ public virtual Response GetManagedClusterVer scope.Start(); try { - var response = ManagedClusterVersionRestClient.GetByEnvironment(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken); + var response = ManagedClusterVersionRestClient.GetManagedClusterVersionByEnvironment(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken); return response; } catch (Exception e) @@ -273,109 +273,137 @@ public virtual Response GetManagedClusterVer } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedClusterVersionsAsync(AzureLocation location, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedClusterVersions(AzureLocation location, CancellationToken cancellationToken = default) + public virtual Pageable GetManagedClusterVersionsByEnvironment(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetManagedUnsupportedVmSizeAsync(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + + using var scope = ManagedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + scope.Start(); + try + { + var response = await ManagedUnsupportedVMSizesRestClient.GetManagedUnsupportedVmSizeAsync(Id.SubscriptionId, location, vmSize, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedClusterVersionsByEnvironment(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetManagedUnsupportedVmSize(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + + using var scope = ManagedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + scope.Start(); + try + { + var response = ManagedUnsupportedVMSizesRestClient.GetManagedUnsupportedVmSize(Id.SubscriptionId, location, vmSize, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// @@ -387,11 +415,11 @@ public virtual Pageable GetManagedClusterVer /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -400,9 +428,9 @@ public virtual Pageable GetManagedClusterVer /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetManagedUnsupportedVmSizesAsync(AzureLocation location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => managedUnsupportedVMSizesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => managedUnsupportedVMSizesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), managedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); } /// @@ -414,11 +442,11 @@ public virtual AsyncPageable GetManagedUn /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -427,42 +455,190 @@ public virtual AsyncPageable GetManagedUn /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetManagedUnsupportedVmSizes(AzureLocation location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => managedUnsupportedVMSizesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => managedUnsupportedVMSizesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), managedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetManagedUnsupportedVmSizeAsync(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetServiceFabricManagedClustersAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// + /// + /// Operation Id + /// ManagedCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetServiceFabricManagedClusters(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); + } - using var scope = managedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + /// + /// Get long running operation result. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task GetOperationResultAsync(WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationResultsClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationResult"); + scope.Start(); + try + { + var response = await OperationResultsRestClient.GetAsync(Id.SubscriptionId, location, operationId, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(OperationResultsClientDiagnostics, Pipeline, OperationResultsRestClient.CreateGetRequest(Id.SubscriptionId, location, operationId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get long running operation result. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation GetOperationResult(WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationResultsClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationResult"); scope.Start(); try { - var response = await managedUnsupportedVMSizesRestClient.GetAsync(Id.SubscriptionId, location, vmSize, cancellationToken).ConfigureAwait(false); + var response = OperationResultsRestClient.Get(Id.SubscriptionId, location, operationId, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(OperationResultsClientDiagnostics, Pipeline, OperationResultsRestClient.CreateGetRequest(Id.SubscriptionId, location, operationId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get long running operation status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} + /// + /// + /// Operation Id + /// OperationStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetOperationStatuAsync(AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationStatusClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationStatu"); + scope.Start(); + try + { + var response = await OperationStatusRestClient.GetAsync(Id.SubscriptionId, location, operationId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -473,36 +649,36 @@ public virtual async Task> GetMa } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Get long running operation status. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// OperationStatus_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. + /// The name of the Azure region. + /// operation identifier. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetManagedUnsupportedVmSize(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetOperationStatu(AzureLocation location, string operationId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var scope = managedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + using var scope = OperationStatusClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationStatu"); scope.Start(); try { - var response = managedUnsupportedVMSizesRestClient.Get(Id.SubscriptionId, location, vmSize, cancellationToken); + var response = OperationStatusRestClient.Get(Id.SubscriptionId, location, operationId, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersTenantResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersTenantResource.cs new file mode 100644 index 000000000000..7bc177363baf --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersTenantResource.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Mocking +{ + /// A class to add extension methods to TenantResource. + public partial class MockableServiceFabricManagedClustersTenantResource : ArmResource + { + private ClientDiagnostics _operationsClientDiagnostics; + private OperationsRestOperations _operationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableServiceFabricManagedClustersTenantResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableServiceFabricManagedClustersTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics OperationsClientDiagnostics => _operationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationsRestOperations OperationsRestClient => _operationsRestClient ??= new OperationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest(); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OperationResult.DeserializeOperationResult(e), OperationsClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersTenantResource.GetOperations", "value", "nextLink", cancellationToken); + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOperations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest(); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OperationResult.DeserializeOperationResult(e), OperationsClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersTenantResource.GetOperations", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs index b1d39a7ef13d..531d090ef160 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs @@ -33,61 +33,66 @@ private static MockableServiceFabricManagedClustersSubscriptionResource GetMocka return resource.GetCachedClient(client => new MockableServiceFabricManagedClustersSubscriptionResource(client, resource.Id)); } + private static MockableServiceFabricManagedClustersTenantResource GetMockableServiceFabricManagedClustersTenantResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableServiceFabricManagedClustersTenantResource(client, resource.Id)); + } + /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeVersionResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeVersionResource(id); } /// @@ -173,11 +178,11 @@ public static ServiceFabricManagedClusterCollection GetServiceFabricManagedClust /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -211,11 +216,11 @@ public static async Task> GetServi /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -241,143 +246,137 @@ public static Response GetServiceFabricMana } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetServiceFabricManagedClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetManagedClusterVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClustersAsync(cancellationToken); + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionAsync(location, clusterVersion, cancellationToken).ConfigureAwait(false); } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetServiceFabricManagedClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetManagedClusterVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClusters(cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersion(location, clusterVersion, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedClusterVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetManagedClusterVersionsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionAsync(location, clusterVersion, cancellationToken).ConfigureAwait(false); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsAsync(location, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedClusterVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetManagedClusterVersions(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersion(location, clusterVersion, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersions(location, cancellationToken); } /// @@ -389,11 +388,11 @@ public static Response GetManagedClusterVers /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -403,7 +402,7 @@ public static Response GetManagedClusterVers /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -424,11 +423,11 @@ public static async Task> GetManage /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -438,7 +437,7 @@ public static async Task> GetManage /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -451,137 +450,139 @@ public static Response GetManagedClusterVers } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedClusterVersionsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsAsync(location, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironmentAsync(location, environment, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedClusterVersions(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static Pageable GetManagedClusterVersionsByEnvironment(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersions(location, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironment(location, environment, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetManagedUnsupportedVmSizeAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironmentAsync(location, environment, cancellationToken); + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSizeAsync(location, vmSize, cancellationToken).ConfigureAwait(false); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedClusterVersionsByEnvironment(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetManagedUnsupportedVmSize(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironment(location, environment, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSize(location, vmSize, cancellationToken); } /// @@ -593,11 +594,11 @@ public static Pageable GetManagedClusterVers /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -626,11 +627,11 @@ public static AsyncPageable GetManagedUns /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -651,71 +652,277 @@ public static Pageable GetManagedUnsuppor } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedUnsupportedVmSizeAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetServiceFabricManagedClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSizeAsync(location, vmSize, cancellationToken).ConfigureAwait(false); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClustersAsync(cancellationToken); } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedUnsupportedVmSize(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetServiceFabricManagedClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSize(location, vmSize, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClusters(cancellationToken); + } + + /// + /// Get long running operation result. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task GetOperationResultAsync(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationResultAsync(waitUntil, location, operationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get long running operation result. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static ArmOperation GetOperationResult(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationResult(waitUntil, location, operationId, cancellationToken); + } + + /// + /// Get long running operation status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} + /// + /// + /// Operation Id + /// OperationStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetOperationStatuAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationStatuAsync(location, operationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get long running operation status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} + /// + /// + /// Operation Id + /// OperationStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetOperationStatu(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationStatu(location, operationId, cancellationToken); + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetOperationsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableServiceFabricManagedClustersTenantResource(tenantResource).GetOperationsAsync(cancellationToken); + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetOperations(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableServiceFabricManagedClustersTenantResource(tenantResource).GetOperations(cancellationToken); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs new file mode 100644 index 000000000000..e9a9751cd1f7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal class FaultSimulationOperationSource : IOperationSource + { + FaultSimulation IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs index 0b0ba5080f67..88e8a494d8e7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. public partial class ApplicationHealthPolicy { /// @@ -55,7 +52,6 @@ public partial class ApplicationHealthPolicy /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnhealthyDeployedApplications) { @@ -71,7 +67,6 @@ public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnheal /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// /// The health policy used by default to evaluate the health of a service type. /// The map with service type health policy per service type name. The map is empty by default. @@ -97,7 +92,6 @@ internal ApplicationHealthPolicy() /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// public int MaxPercentUnhealthyDeployedApplications { get; set; } /// The health policy used by default to evaluate the health of a service type. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs index 655f55ee7893..1b0653d34a35 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ApplicationResourceList DeserializeApplicationResourceList(JsonE return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ApplicationResourceList DeserializeApplicationResourceList(JsonE } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ApplicationResourceList DeserializeApplicationResourceList(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs index c2006414888b..d6bf1805149c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationResourceList() + /// The ApplicationResource items on this page. + /// is null. + internal ApplicationResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application list results if there are any. + /// The ApplicationResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationResourceList() + { + } + + /// The ApplicationResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs index 861f1e47e934..b2c297d7cdde 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationTypeResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ApplicationTypeResourceList DeserializeApplicationTypeResourceLi return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ApplicationTypeResourceList DeserializeApplicationTypeResourceLi } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ApplicationTypeResourceList DeserializeApplicationTypeResourceLi } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationTypeResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationTypeResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs index 8bb6ce5c8b54..ef7788b40987 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationTypeResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationTypeResourceList() + /// The ApplicationTypeResource items on this page. + /// is null. + internal ApplicationTypeResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application type list results if there are any. + /// The ApplicationTypeResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationTypeResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationTypeResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationTypeResourceList() + { + } + + /// The ApplicationTypeResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application type list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs index 67ab31aa2c37..cfe83a266252 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationTypeVersionResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ApplicationTypeVersionResourceList DeserializeApplicationTypeVer return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ApplicationTypeVersionResourceList DeserializeApplicationTypeVer } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ApplicationTypeVersionResourceList DeserializeApplicationTypeVer } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationTypeVersionResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationTypeVersionResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs index 8202979ab56e..000a5599ff4c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationTypeVersionResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationTypeVersionResourceList() + /// The ApplicationTypeVersionResource items on this page. + /// is null. + internal ApplicationTypeVersionResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application type version list results if there are any. + /// The ApplicationTypeVersionResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationTypeVersionResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationTypeVersionResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationTypeVersionResourceList() + { + } + + /// The ApplicationTypeVersionResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application type version list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs index 224264e1cde7..0be771cf9a52 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs @@ -51,15 +51,12 @@ public ApplicationUpgradePolicy() } /// Initializes a new instance of . - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. /// If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). /// The policy used for monitoring the application upgrade. /// Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description. /// The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. - /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds. /// Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. /// Keeps track of any properties unknown to the library. internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolicy, bool? forceRestart, RollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy, long? instanceCloseDelayDurationInSeconds, RollingUpgradeMode? upgradeMode, long? upgradeReplicaSetCheckTimeout, bool? recreateApplication, IDictionary serializedAdditionalRawData) @@ -74,10 +71,7 @@ internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. public ApplicationHealthPolicy ApplicationHealthPolicy { get; set; } /// If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). public bool? ForceRestart { get; set; } @@ -87,7 +81,7 @@ internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolic public long? InstanceCloseDelayDurationInSeconds { get; set; } /// The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. public RollingUpgradeMode? UpgradeMode { get; set; } - /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds. public long? UpgradeReplicaSetCheckTimeout { get; set; } /// Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. public bool? RecreateApplication { get; set; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs index 66efeff0ee53..ad605312f365 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// The ApplicationUserAssignedIdentityInfo. + /// User assigned identity for the application. public partial class ApplicationUserAssignedIdentityInfo { /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs index 93ff5fa58442..6da34132f1cb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs @@ -12,10 +12,9 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { /// /// This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the - /// domain squatting problem with new domains. A domain name will be generated in the following format: <clustername>.<hash>.<regionname>.<sfmcdomain>. + /// domain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain. /// The hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group /// and Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen. - /// /// public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.Serialization.cs new file mode 100644 index 000000000000..6acc629cdaa4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.Serialization.cs @@ -0,0 +1,162 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class AvailableOperationDisplay : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AvailableOperationDisplay)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Provider)) + { + writer.WritePropertyName("provider"u8); + writer.WriteStringValue(Provider); + } + if (Optional.IsDefined(Resource)) + { + writer.WritePropertyName("resource"u8); + writer.WriteStringValue(Resource); + } + if (Optional.IsDefined(Operation)) + { + writer.WritePropertyName("operation"u8); + writer.WriteStringValue(Operation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AvailableOperationDisplay 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(AvailableOperationDisplay)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvailableOperationDisplay(document.RootElement, options); + } + + internal static AvailableOperationDisplay DeserializeAvailableOperationDisplay(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provider = default; + string resource = default; + string operation = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provider"u8)) + { + provider = property.Value.GetString(); + continue; + } + if (property.NameEquals("resource"u8)) + { + resource = property.Value.GetString(); + continue; + } + if (property.NameEquals("operation"u8)) + { + operation = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AvailableOperationDisplay(provider, resource, operation, description, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(AvailableOperationDisplay)} does not support writing '{options.Format}' format."); + } + } + + AvailableOperationDisplay IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAvailableOperationDisplay(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvailableOperationDisplay)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.cs new file mode 100644 index 000000000000..90c30a8bf761 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.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.ServiceFabricManagedClusters.Models +{ + /// Operation supported by the Service Fabric resource provider. + public partial class AvailableOperationDisplay + { + /// + /// 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 . + internal AvailableOperationDisplay() + { + } + + /// Initializes a new instance of . + /// The name of the provider. + /// The resource on which the operation is performed. + /// The operation that can be performed. + /// Operation description. + /// Keeps track of any properties unknown to the library. + internal AvailableOperationDisplay(string provider, string resource, string operation, string description, IDictionary serializedAdditionalRawData) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the provider. + public string Provider { get; } + /// The resource on which the operation is performed. + public string Resource { get; } + /// The operation that can be performed. + public string Operation { get; } + /// Operation description. + public string Description { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs index ba10a58b2cff..304e1f04a944 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs @@ -32,7 +32,7 @@ public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThr } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// The name of the metric for which usage should be tracked. /// The lower limit of the load below which a scale in operation should be performed. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs index 65fc29202c26..7c55a5ab6347 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs @@ -34,7 +34,7 @@ public AverageServiceLoadScalingTrigger(string metricName, double lowerLoadThres } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// The name of the metric for which usage should be tracked. /// The lower limit of the load below which a scale in operation should be performed. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.Serialization.cs new file mode 100644 index 000000000000..32c32dc7f87d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.Serialization.cs @@ -0,0 +1,140 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class ErrorModelError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorModelError)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ErrorModelError 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(ErrorModelError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorModelError(document.RootElement, options); + } + + internal static ErrorModelError DeserializeErrorModelError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorModelError(code, message, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ErrorModelError)} does not support writing '{options.Format}' format."); + } + } + + ErrorModelError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeErrorModelError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorModelError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.cs new file mode 100644 index 000000000000..3d62abcb027d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// The error details. + public partial class ErrorModelError + { + /// + /// 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 . + internal ErrorModelError() + { + } + + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// Keeps track of any properties unknown to the library. + internal ErrorModelError(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The error code. + public string Code { get; } + /// The error message. + public string Message { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs new file mode 100644 index 000000000000..8e0c1fa700ea --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// The kind of fault simulation. + internal readonly partial struct FaultKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaultKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ZoneValue = "Zone"; + + /// Simulates an availability zone down. + public static FaultKind Zone { get; } = new FaultKind(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(FaultKind left, FaultKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaultKind left, FaultKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaultKind(string value) => new FaultKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultKind other && Equals(other); + /// + public bool Equals(FaultKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs new file mode 100644 index 000000000000..6cad3e18cca2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs @@ -0,0 +1,195 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SimulationId)) + { + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteObjectValue(Details, options); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulation 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(FaultSimulation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulation(document.RootElement, options); + } + + internal static FaultSimulation DeserializeFaultSimulation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + FaultSimulationStatus? status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + FaultSimulationDetails details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("simulationId"u8)) + { + simulationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + details = FaultSimulationDetails.DeserializeFaultSimulationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulation( + simulationId, + status, + startTime, + endTime, + details, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs new file mode 100644 index 000000000000..306e4bffee85 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation object with status. + public partial class FaultSimulation + { + /// + /// 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 . + internal FaultSimulation() + { + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// Keeps track of any properties unknown to the library. + internal FaultSimulation(string simulationId, FaultSimulationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, FaultSimulationDetails details, IDictionary serializedAdditionalRawData) + { + SimulationId = simulationId; + Status = status; + StartOn = startOn; + EndOn = endOn; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + /// The start time of the fault simulation. + public DateTimeOffset? StartOn { get; } + /// The end time of the fault simulation. + public DateTimeOffset? EndOn { get; } + /// Fault simulation details. + public FaultSimulationDetails Details { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs new file mode 100644 index 000000000000..fc9c933734f0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs @@ -0,0 +1,133 @@ +// 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.ServiceFabricManagedClusters.Models +{ + internal partial class FaultSimulationConstraints : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ExpireOn)) + { + writer.WritePropertyName("expirationTime"u8); + writer.WriteStringValue(ExpireOn.Value, "O"); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationConstraints 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(FaultSimulationConstraints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + + internal static FaultSimulationConstraints DeserializeFaultSimulationConstraints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expirationTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expirationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationConstraints(expirationTime, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationConstraints IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs new file mode 100644 index 000000000000..56887869e7f1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Constraints for Fault Simulation action. + internal partial class FaultSimulationConstraints + { + /// + /// 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 FaultSimulationConstraints() + { + } + + /// Initializes a new instance of . + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationConstraints(DateTimeOffset? expireOn, IDictionary serializedAdditionalRawData) + { + ExpireOn = expireOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ExpireOn { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..085ce810fc4e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + [PersistableModelProxy(typeof(UnknownFaultSimulationContent))] + public partial class FaultSimulationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("faultKind"u8); + writer.WriteStringValue(FaultKind.ToString()); + if (Optional.IsDefined(Force)) + { + writer.WritePropertyName("force"u8); + writer.WriteBooleanValue(Force.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationContent 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(FaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + internal static FaultSimulationContent DeserializeFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("faultKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Zone": return ZoneFaultSimulationContent.DeserializeZoneFaultSimulationContent(element, options); + } + } + return UnknownFaultSimulationContent.DeserializeUnknownFaultSimulationContent(element, options); + } + + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs new file mode 100644 index 000000000000..089885f7f6cc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// + /// Parameters for Fault Simulation action. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class FaultSimulationContent + { + /// + /// 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 protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected FaultSimulationContent() + { + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContent(FaultKind faultKind, bool? force, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData) + { + FaultKind = faultKind; + Force = force; + Constraints = constraints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The kind of fault to be simulated. + internal FaultKind FaultKind { get; set; } + /// Force the action to go through without any check on the cluster. + public bool? Force { get; set; } + /// Constraints for Fault Simulation action. + internal FaultSimulationConstraints Constraints { get; set; } + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ConstraintsExpireOn + { + get => Constraints is null ? default : Constraints.ExpireOn; + set + { + if (Constraints is null) + Constraints = new FaultSimulationConstraints(); + Constraints.ExpireOn = value; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs new file mode 100644 index 000000000000..64867d7a466d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs @@ -0,0 +1,126 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationContentWrapper : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, options); + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationContentWrapper 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(FaultSimulationContentWrapper)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + + internal static FaultSimulationContentWrapper DeserializeFaultSimulationContentWrapper(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultSimulationContent parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameters"u8)) + { + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationContentWrapper(parameters, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContentWrapper IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs new file mode 100644 index 000000000000..a5a61e9492fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault Simulation Request for Start action. + public partial class FaultSimulationContentWrapper + { + /// + /// 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 . + /// + /// Parameters for Fault Simulation start action. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// is null. + public FaultSimulationContentWrapper(FaultSimulationContent parameters) + { + Argument.AssertNotNull(parameters, nameof(parameters)); + + Parameters = parameters; + } + + /// Initializes a new instance of . + /// + /// Parameters for Fault Simulation start action. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContentWrapper(FaultSimulationContent parameters, IDictionary serializedAdditionalRawData) + { + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationContentWrapper() + { + } + + /// + /// Parameters for Fault Simulation start action. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs new file mode 100644 index 000000000000..ed09aa08239f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs @@ -0,0 +1,180 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ClusterId)) + { + writer.WritePropertyName("clusterId"u8); + writer.WriteStringValue(ClusterId); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsCollectionDefined(NodeTypeFaultSimulation)) + { + writer.WritePropertyName("nodeTypeFaultSimulation"u8); + writer.WriteStartArray(); + foreach (var item in NodeTypeFaultSimulation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, options); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationDetails 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(FaultSimulationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + + internal static FaultSimulationDetails DeserializeFaultSimulationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterId = default; + string operationId = default; + IReadOnlyList nodeTypeFaultSimulation = default; + FaultSimulationContent parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterId"u8)) + { + clusterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeTypeFaultSimulation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NodeTypeFaultSimulation.DeserializeNodeTypeFaultSimulation(item, options)); + } + nodeTypeFaultSimulation = array; + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation ?? new ChangeTrackingList(), parameters, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs new file mode 100644 index 000000000000..cabc8681c0a7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Details for Fault Simulation. + public partial class FaultSimulationDetails + { + /// + /// 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 . + internal FaultSimulationDetails() + { + NodeTypeFaultSimulation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// + /// Fault simulation parameters. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Keeps track of any properties unknown to the library. + internal FaultSimulationDetails(string clusterId, string operationId, IReadOnlyList nodeTypeFaultSimulation, FaultSimulationContent parameters, IDictionary serializedAdditionalRawData) + { + ClusterId = clusterId; + OperationId = operationId; + NodeTypeFaultSimulation = nodeTypeFaultSimulation; + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// unique identifier for the cluster resource. + public string ClusterId { get; } + /// unique identifier for the operation associated with the fault simulation. + public string OperationId { get; } + /// List of node type simulations associated with the cluster fault simulation. + public IReadOnlyList NodeTypeFaultSimulation { get; } + /// + /// Fault simulation parameters. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs new file mode 100644 index 000000000000..53ea9e2c953e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs @@ -0,0 +1,126 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationIdContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationIdContent 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(FaultSimulationIdContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + + internal static FaultSimulationIdContent DeserializeFaultSimulationIdContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("simulationId"u8)) + { + simulationId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationIdContent(simulationId, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationIdContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs new file mode 100644 index 000000000000..561082d66c8b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Fault Simulation id. + public partial class FaultSimulationIdContent + { + /// + /// 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 . + /// unique identifier for the fault simulation. + /// is null. + public FaultSimulationIdContent(string simulationId) + { + Argument.AssertNotNull(simulationId, nameof(simulationId)); + + SimulationId = simulationId; + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationIdContent(string simulationId, IDictionary serializedAdditionalRawData) + { + SimulationId = simulationId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationIdContent() + { + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs new file mode 100644 index 000000000000..3195b7ff047a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ServiceFabricManagedClusters.Models +{ + internal partial class FaultSimulationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FaultSimulationListResult 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(FaultSimulationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + + internal static FaultSimulationListResult DeserializeFaultSimulationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FaultSimulation.DeserializeFaultSimulation(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationListResult(value, nextLink, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs new file mode 100644 index 000000000000..f086a5d95071 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.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; +using System.Linq; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation list results. + internal partial class FaultSimulationListResult + { + /// + /// 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 . + /// The FaultSimulation items on this page. + /// is null. + internal FaultSimulationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FaultSimulation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationListResult() + { + } + + /// The FaultSimulation items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs new file mode 100644 index 000000000000..e5ab863f8fd3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Fault simulation status. + public readonly partial struct FaultSimulationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaultSimulationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string ActiveValue = "Active"; + private const string StoppingValue = "Stopping"; + private const string DoneValue = "Done"; + private const string StartFailedValue = "StartFailed"; + private const string StopFailedValue = "StopFailed"; + + /// Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress. + public static FaultSimulationStatus Starting { get; } = new FaultSimulationStatus(StartingValue); + /// Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully. + public static FaultSimulationStatus Active { get; } = new FaultSimulationStatus(ActiveValue); + /// Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress. + public static FaultSimulationStatus Stopping { get; } = new FaultSimulationStatus(StoppingValue); + /// Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully. + public static FaultSimulationStatus Done { get; } = new FaultSimulationStatus(DoneValue); + /// Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails. + public static FaultSimulationStatus StartFailed { get; } = new FaultSimulationStatus(StartFailedValue); + /// Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails. + public static FaultSimulationStatus StopFailed { get; } = new FaultSimulationStatus(StopFailedValue); + /// Determines if two values are the same. + public static bool operator ==(FaultSimulationStatus left, FaultSimulationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaultSimulationStatus left, FaultSimulationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaultSimulationStatus(string value) => new FaultSimulationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultSimulationStatus other && Equals(other); + /// + public bool Equals(FaultSimulationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.Serialization.cs new file mode 100644 index 000000000000..1b1778c9b500 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.Serialization.cs @@ -0,0 +1,207 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class LongRunningOperationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LongRunningOperationResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(PercentComplete)) + { + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LongRunningOperationResult 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(LongRunningOperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLongRunningOperationResult(document.RootElement, options); + } + + internal static LongRunningOperationResult DeserializeLongRunningOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + double? percentComplete = default; + string status = default; + ErrorModelError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ErrorModelError.DeserializeErrorModelError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LongRunningOperationResult( + name, + startTime, + endTime, + percentComplete, + status, + error, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(LongRunningOperationResult)} does not support writing '{options.Format}' format."); + } + } + + LongRunningOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLongRunningOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LongRunningOperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs new file mode 100644 index 000000000000..3a6f132168f8 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Long running operation result. + public partial class LongRunningOperationResult + { + /// + /// 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 . + internal LongRunningOperationResult() + { + } + + /// Initializes a new instance of . + /// The name of the operation. + /// The start time of the operation. + /// The end time of the operation. + /// The completion percentage of the operation. + /// The status of the operation. + /// The operation error. + /// Keeps track of any properties unknown to the library. + internal LongRunningOperationResult(string name, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, string status, ErrorModelError error, IDictionary serializedAdditionalRawData) + { + Name = name; + StartOn = startOn; + EndOn = endOn; + PercentComplete = percentComplete; + Status = status; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the operation. + public string Name { get; } + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// The completion percentage of the operation. + public double? PercentComplete { get; } + /// The status of the operation. + public string Status { get; } + /// The operation error. + public ErrorModelError Error { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs index 1b1be8162594..b00a0fcb43b7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Defines a health policy used to evaluate the health of the cluster or of a cluster node. - /// - /// + /// Defines a health policy used to evaluate the health of the cluster or of a cluster node. public partial class ManagedClusterHealthPolicy { /// @@ -58,7 +55,6 @@ public partial class ManagedClusterHealthPolicy /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// /// /// The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. @@ -67,7 +63,6 @@ public partial class ManagedClusterHealthPolicy /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications) { @@ -85,7 +80,6 @@ public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUn /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// /// /// The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. @@ -94,7 +88,6 @@ public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications, IDictionary serializedAdditionalRawData) @@ -118,7 +111,6 @@ internal ManagedClusterHealthPolicy() /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// public int MaxPercentUnhealthyNodes { get; set; } /// @@ -128,7 +120,6 @@ internal ManagedClusterHealthPolicy() /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// public int MaxPercentUnhealthyApplications { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs index 3f70fbbc9495..1ed68951f899 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedClusterListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedClusterListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedClusterListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs index d5dcf33c771a..d6bf08df3ab3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Managed Cluster list results. + /// The response of a ManagedCluster list operation. internal partial class ManagedClusterListResult { /// @@ -46,25 +47,34 @@ internal partial class ManagedClusterListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedClusterListResult() + /// The ManagedCluster items on this page. + /// is null. + internal ManagedClusterListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// The URL to use for getting the next set of results. + /// The ManagedCluster items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedClusterListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ManagedClusterListResult() + { + } + + /// The ManagedCluster items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs index 51171890e958..e97fabee20af 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// the reference to the load balancer probe used by the load balancing rule. + /// The reference to the load balancer probe used by the load balancing rule. public readonly partial struct ManagedClusterLoadBalanceProbeProtocol : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public ManagedClusterLoadBalanceProbeProtocol(string value) private const string HttpValue = "http"; private const string HttpsValue = "https"; - /// tcp. + /// Probe protocol is TCP. public static ManagedClusterLoadBalanceProbeProtocol Tcp { get; } = new ManagedClusterLoadBalanceProbeProtocol(TcpValue); - /// http. + /// Probe protocol is HTTP. public static ManagedClusterLoadBalanceProbeProtocol Http { get; } = new ManagedClusterLoadBalanceProbeProtocol(HttpValue); - /// https. + /// Probe protocol is HTTPS. public static ManagedClusterLoadBalanceProbeProtocol Https { get; } = new ManagedClusterLoadBalanceProbeProtocol(HttpsValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterLoadBalanceProbeProtocol left, ManagedClusterLoadBalanceProbeProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs index 9ab3a0a1a5c4..52219d84fbff 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs @@ -25,9 +25,9 @@ public ManagedClusterLoadBalancingRuleTransportProtocol(string value) private const string TcpValue = "tcp"; private const string UdpValue = "udp"; - /// tcp. + /// Transport protocol is TCP. public static ManagedClusterLoadBalancingRuleTransportProtocol Tcp { get; } = new ManagedClusterLoadBalancingRuleTransportProtocol(TcpValue); - /// udp. + /// Transport protocol is UDP. public static ManagedClusterLoadBalancingRuleTransportProtocol Udp { get; } = new ManagedClusterLoadBalancingRuleTransportProtocol(UdpValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterLoadBalancingRuleTransportProtocol left, ManagedClusterLoadBalancingRuleTransportProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs index 523bc27925b4..45ad368f6a98 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs @@ -25,9 +25,9 @@ public ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(string value) private const string EnabledValue = "enabled"; private const string DisabledValue = "disabled"; - /// enabled. + /// Enable apply network policies on private end point in the subnet. public static ManagedClusterSubnetPrivateEndpointNetworkPoliciesState Enabled { get; } = new ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(EnabledValue); - /// disabled. + /// Disable apply network policies on private end point in the subnet. public static ManagedClusterSubnetPrivateEndpointNetworkPoliciesState Disabled { get; } = new ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterSubnetPrivateEndpointNetworkPoliciesState left, ManagedClusterSubnetPrivateEndpointNetworkPoliciesState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs index 42bdf2410c11..b119ff8d404d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs @@ -25,9 +25,9 @@ public ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(string value) private const string EnabledValue = "enabled"; private const string DisabledValue = "disabled"; - /// enabled. + /// Enable apply network policies on private link service in the subnet. public static ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState Enabled { get; } = new ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(EnabledValue); - /// disabled. + /// Disable apply network policies on private link service in the subnet. public static ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState Disabled { get; } = new ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState left, ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs index dd6d220ba1db..4badc04fcada 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs @@ -50,7 +50,6 @@ public partial class ManagedClusterUpgradeDeltaHealthPolicy /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) { @@ -62,20 +61,17 @@ public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// /// /// The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - /// /// /// /// The maximum allowed percentage of applications health degradation allowed during cluster upgrades. /// The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. /// NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes, int? maxPercentUpgradeDomainDeltaUnhealthyNodes, int? maxPercentDeltaUnhealthyApplications, IDictionary serializedAdditionalRawData) @@ -95,14 +91,12 @@ internal ManagedClusterUpgradeDeltaHealthPolicy() /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// public int MaxPercentDeltaUnhealthyNodes { get; set; } /// /// The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - /// /// public int? MaxPercentUpgradeDomainDeltaUnhealthyNodes { get; set; } /// @@ -110,7 +104,6 @@ internal ManagedClusterUpgradeDeltaHealthPolicy() /// The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. /// NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - /// /// public int? MaxPercentDeltaUnhealthyApplications { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs index 61b64b828fac..1defa7a18438 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. public readonly partial struct ManagedClusterUpgradeMode : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs index b81f3679e867..f0485b8f0682 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs @@ -60,7 +60,6 @@ public ManagedClusterUpgradePolicy() /// When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. /// The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterUpgradePolicy(bool? forceRestart, ManagedClusterHealthPolicy healthPolicy, ManagedClusterUpgradeDeltaHealthPolicy deltaHealthPolicy, ManagedClusterMonitoringPolicy monitoringPolicy, string upgradeReplicaSetCheckTimeout, IDictionary serializedAdditionalRawData) @@ -86,7 +85,6 @@ internal ManagedClusterUpgradePolicy(bool? forceRestart, ManagedClusterHealthPol /// When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. /// The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - /// /// public string UpgradeReplicaSetCheckTimeout { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs index e53367088cb0..57533e1b624b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// The ManagedClusterVersionEnvironment. + /// The operating system of the cluster. The default means all. public readonly partial struct ManagedClusterVersionEnvironment : IEquatable { private readonly string _value; @@ -24,7 +24,7 @@ public ManagedClusterVersionEnvironment(string value) private const string WindowsValue = "Windows"; - /// Windows. + /// Indicates os is Windows. public static ManagedClusterVersionEnvironment Windows { get; } = new ManagedClusterVersionEnvironment(WindowsValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterVersionEnvironment left, ManagedClusterVersionEnvironment right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs index 167903cc1116..990b8c2bd087 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs @@ -55,7 +55,7 @@ protected ManagedServicePartitionScheme() } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal ManagedServicePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServicePartitionScheme(PartitionScheme partitionScheme, IDiction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies how the service is partitioned. + /// Gets or sets the partition scheme. internal PartitionScheme PartitionScheme { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs index 4b13ee0115f7..5108f968fb04 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.ToString()); + writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs index 3686a80b13d4..1f66610be8b6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs @@ -55,15 +55,15 @@ protected ManagedServicePlacementPolicy() } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal ManagedServicePlacementPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) + internal ManagedServicePlacementPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of placement policy for a service fabric service. Following are the possible values. - internal ServicePlacementPolicyType ServicePlacementPolicyType { get; set; } + /// Gets or sets the type. + internal ServicePlacementPolicyType Type { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs index 516cce220525..2504f81d0542 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs @@ -85,7 +85,7 @@ internal static ManagedServiceProperties DeserializeManagedServiceProperties(Jso case "Stateless": return StatelessServiceProperties.DeserializeStatelessServiceProperties(element, options); } } - return UnknownServiceResourceProperties.DeserializeUnknownServiceResourceProperties(element, options); + return UnknownManagedServiceProperties.DeserializeUnknownManagedServiceProperties(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs index 0731e7984a01..b431c89eeec7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs @@ -59,7 +59,6 @@ public ManagedServiceProperties(string serviceTypeName, ManagedServicePartitionS /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// internal ManagedServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData) { @@ -94,7 +93,6 @@ internal ManagedServiceProperties() /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// public string ServiceDnsName { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs index 5c341af17b14..90149da6c175 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs @@ -55,7 +55,7 @@ protected ManagedServiceScalingMechanism() } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal ManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDicti _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the mechanism associated with this scaling policy. + /// Gets or sets the kind. internal ServiceScalingMechanismKind Kind { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs index f71540f773bb..9842d2a487ad 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs @@ -55,7 +55,7 @@ protected ManagedServiceScalingTrigger() } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal ManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionar _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the trigger associated with this scaling policy. + /// Gets or sets the kind. internal ServiceScalingTriggerKind Kind { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs index 85ebbda055e0..e74de50546a0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedVmSizesResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedVmSizesResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedVmSizesResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs index fc122ae20208..56698751577c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ManagedVmSizesResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedVmSizesResult() + /// The ManagedVMSize items on this page. + /// is null. + internal ManagedVmSizesResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// List of Managed VM Sizes for Service Fabric Managed Clusters. - /// URL to get the next set of Managed VM Sizes if there are any. + /// The ManagedVMSize items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedVmSizesResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedVmSizesResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Managed VM Sizes for Service Fabric Managed Clusters. + /// Initializes a new instance of for deserialization. + internal ManagedVmSizesResult() + { + } + + /// The ManagedVMSize items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of Managed VM Sizes if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs index bf4c12644bce..05e0a2e9f806 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs @@ -26,7 +26,7 @@ public NamedPartitionAddOrRemoveScalingMechanism(int minPartitionCount, int maxP } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// Minimum number of named partitions of the service. /// Maximum number of named partitions of the service. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs index 6f9a855375bd..35bd1d7f33c1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs @@ -26,7 +26,7 @@ public NamedPartitionScheme(IEnumerable names) } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. /// Array for the names of the partitions. internal NamedPartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData, IList names) : base(partitionScheme, serializedAdditionalRawData) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs index 87d5a05613fa..04504dc621ce 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs @@ -52,7 +52,7 @@ internal NodeTypeAvailableSku() } /// Initializes a new instance of . - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. /// The supported SKU for a for node type. /// Provides information about how the node count can be scaled. /// Keeps track of any properties unknown to the library. @@ -64,7 +64,7 @@ internal NodeTypeAvailableSku(ResourceType? resourceType, NodeTypeSupportedSku s _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. public ResourceType? ResourceType { get; } /// The supported SKU for a for node type. public NodeTypeSupportedSku Sku { get; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs new file mode 100644 index 000000000000..1ca63568c204 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs @@ -0,0 +1,170 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class NodeTypeFaultSimulation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeTypeName)) + { + writer.WritePropertyName("nodeTypeName"u8); + writer.WriteStringValue(NodeTypeName); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsDefined(OperationStatus)) + { + writer.WritePropertyName("operationStatus"u8); + writer.WriteStringValue(OperationStatus.Value.ToString()); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NodeTypeFaultSimulation 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(NodeTypeFaultSimulation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + + internal static NodeTypeFaultSimulation DeserializeNodeTypeFaultSimulation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nodeTypeName = default; + FaultSimulationStatus? status = default; + string operationId = default; + SfmcOperationStatus? operationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeTypeName"u8)) + { + nodeTypeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationStatus = new SfmcOperationStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + NodeTypeFaultSimulation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs new file mode 100644 index 000000000000..f35030c3aaea --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.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.ServiceFabricManagedClusters.Models +{ + /// Node type fault simulation object with status. + public partial class NodeTypeFaultSimulation + { + /// + /// 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 . + internal NodeTypeFaultSimulation() + { + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// Keeps track of any properties unknown to the library. + internal NodeTypeFaultSimulation(string nodeTypeName, FaultSimulationStatus? status, string operationId, SfmcOperationStatus? operationStatus, IDictionary serializedAdditionalRawData) + { + NodeTypeName = nodeTypeName; + Status = status; + OperationId = operationId; + OperationStatus = operationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Node type name. + public string NodeTypeName { get; } + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + /// Current or latest asynchronous operation identifier on the node type. + public string OperationId { get; } + /// Current or latest asynchronous operation status on the node type. + public SfmcOperationStatus? OperationStatus { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs index 98c10a514de6..39f0769b4399 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs @@ -110,7 +110,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("loadBalancerBackendAddressPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -119,7 +119,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("loadBalancerInboundNatPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -128,7 +128,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("applicationGatewayBackendAddressPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs index 6ea1a340bb4b..c623a8a34b99 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs @@ -53,9 +53,9 @@ public NodeTypeFrontendConfiguration() /// Initializes a new instance of . /// The IP address type of this frontend configuration. If omitted the default value is IPv4. - /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. - /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. - /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. + /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. + /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. /// Keeps track of any properties unknown to the library. internal NodeTypeFrontendConfiguration(NodeTypeFrontendConfigurationIPAddressType? ipAddressType, ResourceIdentifier loadBalancerBackendAddressPoolId, ResourceIdentifier loadBalancerInboundNatPoolId, ResourceIdentifier applicationGatewayBackendAddressPoolId, IDictionary serializedAdditionalRawData) { @@ -68,11 +68,11 @@ internal NodeTypeFrontendConfiguration(NodeTypeFrontendConfigurationIPAddressTyp /// The IP address type of this frontend configuration. If omitted the default value is IPv4. public NodeTypeFrontendConfigurationIPAddressType? IPAddressType { get; set; } - /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. public ResourceIdentifier LoadBalancerBackendAddressPoolId { get; set; } - /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. + /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. public ResourceIdentifier LoadBalancerInboundNatPoolId { get; set; } - /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. public ResourceIdentifier ApplicationGatewayBackendAddressPoolId { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs index 484c040b77be..d391ebfc2928 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The IP address type. - /// - /// + /// The IP address type. public readonly partial struct NodeTypeFrontendConfigurationIPAddressType : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs index fc21606b2248..08295564100d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeTypeListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new NodeTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NodeTypeListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs index 2d0765b4533a..8fedc17515d3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Node type list results. + /// The response of a NodeType list operation. internal partial class NodeTypeListResult { /// @@ -46,25 +47,34 @@ internal partial class NodeTypeListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeTypeListResult() + /// The NodeType items on this page. + /// is null. + internal NodeTypeListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The list of node types. - /// The URL to use for getting the next set of results. + /// The NodeType items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NodeTypeListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NodeTypeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of node types. + /// Initializes a new instance of for deserialization. + internal NodeTypeListResult() + { + } + + /// The NodeType items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs index c6567ec03aa8..2ba597e0f78e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeTypeListSkuResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new NodeTypeListSkuResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NodeTypeListSkuResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs index 8eadedc19e8b..4040137bb30d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class NodeTypeListSkuResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeTypeListSkuResult() + /// The NodeTypeAvailableSku items on this page. + /// is null. + internal NodeTypeListSkuResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The list of available node type SKUs. - /// The URL to use for getting the next set of results. + /// The NodeTypeAvailableSku items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NodeTypeListSkuResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NodeTypeListSkuResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of available node type SKUs. + /// Initializes a new instance of for deserialization. + internal NodeTypeListSkuResult() + { + } + + /// The NodeTypeAvailableSku items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs index 3f968c3092db..f65d70bf429d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs @@ -46,16 +46,16 @@ public partial class NodeTypeSku private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. public NodeTypeSku(int capacity) { Capacity = capacity; } /// Initializes a new instance of . - /// The sku name. <br /><br />Name is internally generated and is used in auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br /> To avoid deployment errors please omit the property. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. + /// Specifies the tier of the node type. Possible Values: **Standard**. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. /// Keeps track of any properties unknown to the library. internal NodeTypeSku(string name, string tier, int capacity, IDictionary serializedAdditionalRawData) { @@ -70,11 +70,11 @@ internal NodeTypeSku() { } - /// The sku name. <br /><br />Name is internally generated and is used in auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br /> To avoid deployment errors please omit the property. + /// The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. public string Name { get; set; } - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. public string Tier { get; set; } - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. public int Capacity { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs index 206c80fe8cfc..a68f9fb73b77 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Node type capacity scale type. - /// - /// + /// Node type capacity scale type. public readonly partial struct NodeTypeSkuScaleType : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs index 481f543cb6f9..ba76ea4ae824 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs @@ -52,7 +52,7 @@ internal NodeTypeSupportedSku() /// Initializes a new instance of . /// The sku name. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. /// Keeps track of any properties unknown to the library. internal NodeTypeSupportedSku(string name, string tier, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal NodeTypeSupportedSku(string name, string tier, IDictionary The sku name. public string Name { get; } - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. public string Tier { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs index 27f95298c1ce..09f9b3a2cff3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs @@ -47,7 +47,7 @@ public partial class NodeTypeVaultCertificate /// Initializes a new instance of . /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. /// or is null. public NodeTypeVaultCertificate(Uri certificateUri, string certificateStore) { @@ -60,7 +60,7 @@ public NodeTypeVaultCertificate(Uri certificateUri, string certificateStore) /// Initializes a new instance of . /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. /// Keeps track of any properties unknown to the library. internal NodeTypeVaultCertificate(Uri certificateUri, string certificateStore, IDictionary serializedAdditionalRawData) { @@ -76,7 +76,7 @@ internal NodeTypeVaultCertificate() /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). public Uri CertificateUri { get; set; } - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. public string CertificateStore { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.Serialization.cs new file mode 100644 index 000000000000..2a2a8ab0dc34 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.Serialization.cs @@ -0,0 +1,151 @@ +// 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.ServiceFabricManagedClusters.Models +{ + internal partial class OperationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OperationListResult 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(OperationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationListResult(document.RootElement, options); + } + + internal static OperationListResult DeserializeOperationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OperationResult.DeserializeOperationResult(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationListResult(value, nextLink, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); + } + } + + OperationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOperationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.cs new file mode 100644 index 000000000000..b88cc36fedc1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.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; +using System.Linq; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Describes the result of the request to list Service Fabric resource provider operations. + internal partial class OperationListResult + { + /// + /// 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 . + /// The OperationResult items on this page. + /// is null. + internal OperationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OperationResult items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OperationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationListResult() + { + } + + /// The OperationResult items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.Serialization.cs new file mode 100644 index 000000000000..6902169314a6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.Serialization.cs @@ -0,0 +1,187 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class OperationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(IsDataAction)) + { + writer.WritePropertyName("isDataAction"u8); + writer.WriteBooleanValue(IsDataAction.Value); + } + if (Optional.IsDefined(Display)) + { + writer.WritePropertyName("display"u8); + writer.WriteObjectValue(Display, options); + } + if (Optional.IsDefined(Origin)) + { + writer.WritePropertyName("origin"u8); + writer.WriteStringValue(Origin); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + 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, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OperationResult 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(OperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationResult(document.RootElement, options); + } + + internal static OperationResult DeserializeOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + bool? isDataAction = default; + AvailableOperationDisplay display = default; + string origin = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDataAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDataAction = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("display"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + display = AvailableOperationDisplay.DeserializeAvailableOperationDisplay(property.Value, options); + continue; + } + if (property.NameEquals("origin"u8)) + { + origin = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationResult( + name, + isDataAction, + display, + origin, + nextLink, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(OperationResult)} does not support writing '{options.Format}' format."); + } + } + + OperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.cs new file mode 100644 index 000000000000..dae3bf0356c3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Available operation list result. + public partial class OperationResult + { + /// + /// 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 . + internal OperationResult() + { + } + + /// Initializes a new instance of . + /// The name of the operation. + /// Indicates whether the operation is a data action. + /// The object that represents the operation. + /// Origin result. + /// The URL to use for getting the next set of results. + /// Keeps track of any properties unknown to the library. + internal OperationResult(string name, bool? isDataAction, AvailableOperationDisplay display, string origin, string nextLink, IDictionary serializedAdditionalRawData) + { + Name = name; + IsDataAction = isDataAction; + Display = display; + Origin = origin; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the operation. + public string Name { get; } + /// Indicates whether the operation is a data action. + public bool? IsDataAction { get; } + /// The object that represents the operation. + public AvailableOperationDisplay Display { get; } + /// Origin result. + public string Origin { get; } + /// The URL to use for getting the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs index 0ee96e2078b2..385c027006bb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs @@ -26,7 +26,7 @@ public PartitionInstanceCountScalingMechanism(int minInstanceCount, int maxInsta } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// Minimum number of instances of the partition. /// Maximum number of instances of the partition. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs index 5e5212d71498..57222883843a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs @@ -10,12 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. - /// Rollback specifies that the upgrade will start rolling back automatically. - /// Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. - /// - /// + /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. public readonly partial struct PolicyViolationCompensationAction : IEquatable { private readonly string _value; @@ -30,9 +25,9 @@ public PolicyViolationCompensationAction(string value) private const string RollbackValue = "Rollback"; private const string ManualValue = "Manual"; - /// The upgrade will start rolling back automatically. The value is 0. + /// Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. public static PolicyViolationCompensationAction Rollback { get; } = new PolicyViolationCompensationAction(RollbackValue); - /// The upgrade will switch to UnmonitoredManual upgrade mode. The value is 1. + /// Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. public static PolicyViolationCompensationAction Manual { get; } = new PolicyViolationCompensationAction(ManualValue); /// Determines if two values are the same. public static bool operator ==(PolicyViolationCompensationAction left, PolicyViolationCompensationAction right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SecurityEncryptionType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SecurityEncryptionType.cs new file mode 100644 index 000000000000..b4f83211485b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SecurityEncryptionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Specifies the securityEncryptionType type of the nodeType. Only DiskWithVMGuestState and VMGuestStateOnly are currently supported. + public readonly partial struct SecurityEncryptionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SecurityEncryptionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DiskWithVmGuestStateValue = "DiskWithVMGuestState"; + private const string VmGuestStateOnlyValue = "VMGuestStateOnly"; + + /// For encryption of the managed disk along with VMGuestState blob. + public static SecurityEncryptionType DiskWithVmGuestState { get; } = new SecurityEncryptionType(DiskWithVmGuestStateValue); + /// For encryption of just the VMGuestState blob. + public static SecurityEncryptionType VmGuestStateOnly { get; } = new SecurityEncryptionType(VmGuestStateOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(SecurityEncryptionType left, SecurityEncryptionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SecurityEncryptionType left, SecurityEncryptionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SecurityEncryptionType(string value) => new SecurityEncryptionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SecurityEncryptionType other && Equals(other); + /// + public bool Equals(SecurityEncryptionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs index 95a9e61c9e45..b6ff38c0cdaa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs @@ -63,7 +63,7 @@ public ServiceFabricManagedClusterIPConfiguration(string name) /// Initializes a new instance of . /// Name of the network interface. /// Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. - /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. . + /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. /// Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. /// Specifies the subnet of the network interface. /// Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. @@ -90,7 +90,7 @@ internal ServiceFabricManagedClusterIPConfiguration() public string Name { get; set; } /// Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. public IList ApplicationGatewayBackendAddressPools { get; } - /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. . + /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. public IList LoadBalancerBackendAddressPools { get; } /// Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. public IList LoadBalancerInboundNatPools { get; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs index 40a9677722a4..8e3e13588282 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedClusterPrivateIPAddressVersion(string value) private const string IPv4Value = "IPv4"; private const string IPv6Value = "IPv6"; - /// IPv4. + /// The IP configuration's private IP is IPv4. public static ServiceFabricManagedClusterPrivateIPAddressVersion IPv4 { get; } = new ServiceFabricManagedClusterPrivateIPAddressVersion(IPv4Value); - /// IPv6. + /// The IP configuration's private IP is IPv6. public static ServiceFabricManagedClusterPrivateIPAddressVersion IPv6 { get; } = new ServiceFabricManagedClusterPrivateIPAddressVersion(IPv6Value); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterPrivateIPAddressVersion left, ServiceFabricManagedClusterPrivateIPAddressVersion right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs index 0364d55d0297..29653f7414db 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedClusterPublicIPAddressVersion(string value) private const string IPv4Value = "IPv4"; private const string IPv6Value = "IPv6"; - /// IPv4. + /// The IP configuration's public IP is IPv4. public static ServiceFabricManagedClusterPublicIPAddressVersion IPv4 { get; } = new ServiceFabricManagedClusterPublicIPAddressVersion(IPv4Value); - /// IPv6. + /// The IP configuration's public IP is IPv6. public static ServiceFabricManagedClusterPublicIPAddressVersion IPv6 { get; } = new ServiceFabricManagedClusterPublicIPAddressVersion(IPv6Value); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterPublicIPAddressVersion left, ServiceFabricManagedClusterPublicIPAddressVersion right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs index e92b13e4d122..ebe1d44168a2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs @@ -24,11 +24,14 @@ public ServiceFabricManagedClusterSecurityType(string value) private const string TrustedLaunchValue = "TrustedLaunch"; private const string StandardValue = "Standard"; + private const string ConfidentialVmValue = "ConfidentialVM"; /// Trusted Launch is a security type that secures generation 2 virtual machines. public static ServiceFabricManagedClusterSecurityType TrustedLaunch { get; } = new ServiceFabricManagedClusterSecurityType(TrustedLaunchValue); /// Standard is the default security type for all machines. public static ServiceFabricManagedClusterSecurityType Standard { get; } = new ServiceFabricManagedClusterSecurityType(StandardValue); + /// ConfidentialVM provides hardware-based encryption, trusted execution environment (TEE) and isolation of the VM memory & CPU from host. + public static ServiceFabricManagedClusterSecurityType ConfidentialVm { get; } = new ServiceFabricManagedClusterSecurityType(ConfidentialVmValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterSecurityType left, ServiceFabricManagedClusterSecurityType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs index fa7d0caddfcd..05f4888f6710 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The current state of the cluster. - /// - /// + /// The current state of the cluster. public readonly partial struct ServiceFabricManagedClusterState : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs index afcbaebcb9da..03b8f0fe5f4b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs @@ -127,7 +127,7 @@ internal static ServiceFabricManagedClusterVersion DeserializeServiceFabricManag } if (property0.NameEquals("supportExpiryUtc"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs index 20a60bfafb70..b982ee07017f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. - /// - /// + /// Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. public readonly partial struct ServiceFabricManagedDataDiskType : IEquatable { private readonly string _value; @@ -28,6 +25,9 @@ public ServiceFabricManagedDataDiskType(string value) private const string StandardLrsValue = "Standard_LRS"; private const string StandardSsdLrsValue = "StandardSSD_LRS"; private const string PremiumLrsValue = "Premium_LRS"; + private const string PremiumV2LRSValue = "PremiumV2_LRS"; + private const string PremiumZrsValue = "StandardSSD_ZRS"; + private const string PremiumZRSValue = "Premium_ZRS"; /// Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. public static ServiceFabricManagedDataDiskType StandardLrs { get; } = new ServiceFabricManagedDataDiskType(StandardLrsValue); @@ -35,6 +35,12 @@ public ServiceFabricManagedDataDiskType(string value) public static ServiceFabricManagedDataDiskType StandardSsdLrs { get; } = new ServiceFabricManagedDataDiskType(StandardSsdLrsValue); /// Premium SSD locally redundant storage. Best for production and performance sensitive workloads. public static ServiceFabricManagedDataDiskType PremiumLrs { get; } = new ServiceFabricManagedDataDiskType(PremiumLrsValue); + /// Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that consistently require low latency and high IOPS and throughput. + public static ServiceFabricManagedDataDiskType PremiumV2LRS { get; } = new ServiceFabricManagedDataDiskType(PremiumV2LRSValue); + /// Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures. + public static ServiceFabricManagedDataDiskType PremiumZrs { get; } = new ServiceFabricManagedDataDiskType(PremiumZrsValue); + /// Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone failures. + public static ServiceFabricManagedDataDiskType PremiumZRS { get; } = new ServiceFabricManagedDataDiskType(PremiumZRSValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedDataDiskType left, ServiceFabricManagedDataDiskType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs index 39249cd693d9..70ddf5f08095 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedNetworkSecurityRuleDirection(string value) private const string InboundValue = "inbound"; private const string OutboundValue = "outbound"; - /// inbound. + /// Inbound direction. public static ServiceFabricManagedNetworkSecurityRuleDirection Inbound { get; } = new ServiceFabricManagedNetworkSecurityRuleDirection(InboundValue); - /// outbound. + /// Outbound direction. public static ServiceFabricManagedNetworkSecurityRuleDirection Outbound { get; } = new ServiceFabricManagedNetworkSecurityRuleDirection(OutboundValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNetworkSecurityRuleDirection left, ServiceFabricManagedNetworkSecurityRuleDirection right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs index cc6e9b03b4b7..a320e84cfb55 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedNetworkTrafficAccess(string value) private const string AllowValue = "allow"; private const string DenyValue = "deny"; - /// allow. + /// The network traffic is allowed. public static ServiceFabricManagedNetworkTrafficAccess Allow { get; } = new ServiceFabricManagedNetworkTrafficAccess(AllowValue); - /// deny. + /// The network traffic is denied. public static ServiceFabricManagedNetworkTrafficAccess Deny { get; } = new ServiceFabricManagedNetworkTrafficAccess(DenyValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNetworkTrafficAccess left, ServiceFabricManagedNetworkTrafficAccess right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs index d4964713d19d..1f466b3b767c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs @@ -30,19 +30,19 @@ public ServiceFabricManagedNsgProtocol(string value) private const string AHValue = "ah"; private const string EspValue = "esp"; - /// http. + /// Protocol applies to HTTP. public static ServiceFabricManagedNsgProtocol Http { get; } = new ServiceFabricManagedNsgProtocol(HttpValue); - /// https. + /// Protocol applies to HTTPS. public static ServiceFabricManagedNsgProtocol Https { get; } = new ServiceFabricManagedNsgProtocol(HttpsValue); - /// tcp. + /// Protocol applies to TCP. public static ServiceFabricManagedNsgProtocol Tcp { get; } = new ServiceFabricManagedNsgProtocol(TcpValue); - /// udp. + /// Protocol applies to UDP. public static ServiceFabricManagedNsgProtocol Udp { get; } = new ServiceFabricManagedNsgProtocol(UdpValue); - /// icmp. + /// Protocol applies to ICMP. public static ServiceFabricManagedNsgProtocol Icmp { get; } = new ServiceFabricManagedNsgProtocol(IcmpValue); - /// ah. + /// Protocol applies to AH. public static ServiceFabricManagedNsgProtocol AH { get; } = new ServiceFabricManagedNsgProtocol(AHValue); - /// esp. + /// Protocol applies to ESP. public static ServiceFabricManagedNsgProtocol Esp { get; } = new ServiceFabricManagedNsgProtocol(EspValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNsgProtocol left, ServiceFabricManagedNsgProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs index 108b27d76f8b..1a7a121e303e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs @@ -33,25 +33,25 @@ public ServiceFabricManagedResourceProvisioningState(string value) private const string DeletedValue = "Deleted"; private const string OtherValue = "Other"; - /// None. + /// The resource does not have a provisioning state. public static ServiceFabricManagedResourceProvisioningState None { get; } = new ServiceFabricManagedResourceProvisioningState(NoneValue); - /// Creating. + /// The resource is being created. public static ServiceFabricManagedResourceProvisioningState Creating { get; } = new ServiceFabricManagedResourceProvisioningState(CreatingValue); - /// Created. + /// The resource is created. public static ServiceFabricManagedResourceProvisioningState Created { get; } = new ServiceFabricManagedResourceProvisioningState(CreatedValue); - /// Updating. + /// The resource is being updated. public static ServiceFabricManagedResourceProvisioningState Updating { get; } = new ServiceFabricManagedResourceProvisioningState(UpdatingValue); - /// Succeeded. + /// The resource provisioning has succeeded. public static ServiceFabricManagedResourceProvisioningState Succeeded { get; } = new ServiceFabricManagedResourceProvisioningState(SucceededValue); - /// Failed. + /// The resource provisioning has failed. public static ServiceFabricManagedResourceProvisioningState Failed { get; } = new ServiceFabricManagedResourceProvisioningState(FailedValue); - /// Canceled. + /// The resource provisioning has been canceled. public static ServiceFabricManagedResourceProvisioningState Canceled { get; } = new ServiceFabricManagedResourceProvisioningState(CanceledValue); - /// Deleting. + /// The resource is being deleted. public static ServiceFabricManagedResourceProvisioningState Deleting { get; } = new ServiceFabricManagedResourceProvisioningState(DeletingValue); - /// Deleted. + /// The resource has been deleted. public static ServiceFabricManagedResourceProvisioningState Deleted { get; } = new ServiceFabricManagedResourceProvisioningState(DeletedValue); - /// Other. + /// The resource provisioning state is a state other than the previously specified states. public static ServiceFabricManagedResourceProvisioningState Other { get; } = new ServiceFabricManagedResourceProvisioningState(OtherValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedResourceProvisioningState left, ServiceFabricManagedResourceProvisioningState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs index cff1f5445b2d..9ebfd004ef3b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs @@ -21,17 +21,17 @@ public ServicePlacementInvalidDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.InvalidDomain; + Type = ServicePlacementPolicyType.InvalidDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should not be used for placement. - internal ServicePlacementInvalidDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementInvalidDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs index 7aa19caf4d91..ecd13bad6e39 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs @@ -10,21 +10,21 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// ServicePlacementNonPartiallyPlaceServicePolicy. + /// The type of placement policy for a service fabric service. Following are the possible values. public partial class ServicePlacementNonPartiallyPlaceServicePolicy : ManagedServicePlacementPolicy { /// Initializes a new instance of . public ServicePlacementNonPartiallyPlaceServicePolicy() { - ServicePlacementPolicyType = ServicePlacementPolicyType.NonPartiallyPlaceService; + Type = ServicePlacementPolicyType.NonPartiallyPlaceService; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal ServicePlacementNonPartiallyPlaceServicePolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementNonPartiallyPlaceServicePolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs index 86b67e4edbd6..eb7bd946493c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs @@ -19,7 +19,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional /// or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica /// may not end up located in this domain due to failures, capacity limits, or other constraints. - /// /// public partial class ServicePlacementPreferPrimaryDomainPolicy : ManagedServicePlacementPolicy { @@ -31,17 +30,17 @@ public ServicePlacementPreferPrimaryDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.PreferredPrimaryDomain; + Type = ServicePlacementPolicyType.PreferredPrimaryDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementPreferPrimaryDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementPreferPrimaryDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs index d28185f9259e..8b23ccfaad15 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs @@ -20,7 +20,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// In the event that one of the datacenters goes offline, normally the replica that was placed in that /// datacenter will be packed into one of the remaining datacenters. If this is not desirable then this /// policy should be set. - /// /// public partial class ServicePlacementRequireDomainDistributionPolicy : ManagedServicePlacementPolicy { @@ -32,17 +31,17 @@ public ServicePlacementRequireDomainDistributionPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.RequiredDomainDistribution; + Type = ServicePlacementPolicyType.RequiredDomainDistribution; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementRequireDomainDistributionPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementRequireDomainDistributionPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs index 8689e98740ad..c07a4630f0e5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs @@ -21,17 +21,17 @@ public ServicePlacementRequiredDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.RequiredDomain; + Type = ServicePlacementPolicyType.RequiredDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementRequiredDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementRequiredDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs index c39d77767ed2..e98c7a0253e0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new ServiceResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ServiceResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs index b68a170e23ab..37710bc7652f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ServiceResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ServiceResourceList() + /// The ServiceResource items on this page. + /// is null. + internal ServiceResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of service list results if there are any. + /// The ServiceResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ServiceResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ServiceResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ServiceResourceList() + { + } + + /// The ServiceResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of service list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs index abf72db581a0..6bc723f9336a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Represents the health policy used to evaluate the health of services belonging to a service type. - /// - /// + /// Represents the health policy used to evaluate the health of services belonging to a service type. public partial class ServiceTypeHealthPolicy { /// @@ -56,7 +53,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// /// /// The maximum allowed percentage of unhealthy partitions per service. @@ -65,7 +61,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// /// /// The maximum allowed percentage of unhealthy replicas per partition. @@ -74,7 +69,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUnhealthyPartitionsPerService, int maxPercentUnhealthyReplicasPerPartition) { @@ -91,7 +85,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// /// /// The maximum allowed percentage of unhealthy partitions per service. @@ -100,7 +93,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// /// /// The maximum allowed percentage of unhealthy replicas per partition. @@ -109,7 +101,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// /// Keeps track of any properties unknown to the library. internal ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUnhealthyPartitionsPerService, int maxPercentUnhealthyReplicasPerPartition, IDictionary serializedAdditionalRawData) @@ -132,7 +123,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// public int MaxPercentUnhealthyServices { get; set; } /// @@ -142,7 +132,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// public int MaxPercentUnhealthyPartitionsPerService { get; set; } /// @@ -152,7 +141,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// public int MaxPercentUnhealthyReplicasPerPartition { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs new file mode 100644 index 000000000000..b326cec7d4fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Sfmc operation status. + public readonly partial struct SfmcOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SfmcOperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string StartedValue = "Started"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string AbortedValue = "Aborted"; + private const string CanceledValue = "Canceled"; + + /// Operation created. + public static SfmcOperationStatus Created { get; } = new SfmcOperationStatus(CreatedValue); + /// Operation started. + public static SfmcOperationStatus Started { get; } = new SfmcOperationStatus(StartedValue); + /// Operation succeeded. + public static SfmcOperationStatus Succeeded { get; } = new SfmcOperationStatus(SucceededValue); + /// Operation failed. + public static SfmcOperationStatus Failed { get; } = new SfmcOperationStatus(FailedValue); + /// Operation aborted. + public static SfmcOperationStatus Aborted { get; } = new SfmcOperationStatus(AbortedValue); + /// Operation canceled. + public static SfmcOperationStatus Canceled { get; } = new SfmcOperationStatus(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SfmcOperationStatus left, SfmcOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SfmcOperationStatus left, SfmcOperationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SfmcOperationStatus(string value) => new SfmcOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SfmcOperationStatus other && Equals(other); + /// + public bool Equals(SfmcOperationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs index f65db2f707c3..53608354b2b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// SingletonPartitionScheme. + /// Describes the partition scheme of a singleton-partitioned, or non-partitioned service. public partial class SingletonPartitionScheme : ManagedServicePartitionScheme { /// Initializes a new instance of . @@ -20,7 +20,7 @@ public SingletonPartitionScheme() } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal SingletonPartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs index 155996858673..39fc08e6363f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs @@ -54,7 +54,6 @@ public StatefulServiceProperties(string serviceTypeName, ManagedServicePartition /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. /// The target replica set size as a number. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs index 93129f40d5e1..fd3d6be14ccb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs @@ -56,7 +56,6 @@ public StatelessServiceProperties(string serviceTypeName, ManagedServicePartitio /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// The instance count. /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs index 67b928a41677..5bf473d31704 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs @@ -18,12 +18,10 @@ public partial class UniformInt64RangePartitionScheme : ManagedServicePartitionS /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) { @@ -34,18 +32,16 @@ public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. /// The number of partitions. /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// internal UniformInt64RangePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData, int count, long lowKey, long highKey) : base(partitionScheme, serializedAdditionalRawData) { @@ -65,13 +61,11 @@ internal UniformInt64RangePartitionScheme() /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public long LowKey { get; set; } /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public long HighKey { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..0a893388e133 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs @@ -0,0 +1,130 @@ +// 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.ServiceFabricManagedClusters.Models +{ + internal partial class UnknownFaultSimulationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FaultSimulationContent 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(FaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + internal static UnknownFaultSimulationContent DeserializeUnknownFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultKind faultKind = "Unknown"; + bool? force = default; + FaultSimulationConstraints constraints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("force"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + force = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownFaultSimulationContent(faultKind, force, constraints, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs new file mode 100644 index 000000000000..d150971bc6db --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Unknown version of FaultSimulationContent. + internal partial class UnknownFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal UnknownFaultSimulationContent(FaultKind faultKind, bool? force, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData) : base(faultKind, force, constraints, serializedAdditionalRawData) + { + FaultKind = faultKind; + } + + /// Initializes a new instance of for deserialization. + internal UnknownFaultSimulationContent() + { + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs similarity index 96% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs index 78ef62747428..c736bfd5a8a7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownServiceResourceProperties : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServiceProperties : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServiceProperties IJsonModel.Create(ref Utf8Jso return DeserializeManagedServiceProperties(document.RootElement, options); } - internal static UnknownServiceResourceProperties DeserializeUnknownServiceResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServiceProperties DeserializeUnknownManagedServiceProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -183,7 +183,7 @@ internal static UnknownServiceResourceProperties DeserializeUnknownServiceResour } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownServiceResourceProperties( + return new UnknownManagedServiceProperties( placementConstraints, correlationScheme ?? new ChangeTrackingList(), serviceLoadMetrics ?? new ChangeTrackingList(), diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs similarity index 74% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs index cdab207081e0..db7381e5d678 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs @@ -10,10 +10,10 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ServiceResourceProperties. - internal partial class UnknownServiceResourceProperties : ManagedServiceProperties + /// Unknown version of ManagedServiceProperties. + internal partial class UnknownManagedServiceProperties : ManagedServiceProperties { - /// Initializes a new instance of . + /// Initializes a new instance of . /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". /// A list that describes the correlation of the service with other services. /// The service load metrics is given as an array of ServiceLoadMetric objects. @@ -38,15 +38,14 @@ internal partial class UnknownServiceResourceProperties : ManagedServiceProperti /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// - internal UnknownServiceResourceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) + internal UnknownManagedServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) { ServiceKind = serviceKind; } - /// Initializes a new instance of for deserialization. - internal UnknownServiceResourceProperties() + /// Initializes a new instance of for deserialization. + internal UnknownManagedServiceProperties() { } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs index 9d8e065b17dc..5fb0d7f19647 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of Partition. + /// Unknown version of ManagedServicePartitionScheme. internal partial class UnknownPartition : ManagedServicePartitionScheme { /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal UnknownPartition(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs index c3924d9086b9..c21ca4b1c4f7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ScalingMechanism. + /// Unknown version of ManagedServiceScalingMechanism. internal partial class UnknownScalingMechanism : ManagedServiceScalingMechanism { /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal UnknownScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs index 170529134bd4..90b10208b23a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ScalingTrigger. + /// Unknown version of ManagedServiceScalingTrigger. internal partial class UnknownScalingTrigger : ManagedServiceScalingTrigger { /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal UnknownScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs index 11a95e1f3b96..8523a2ff53b9 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ServicePlacementPolicy. + /// Unknown version of ManagedServicePlacementPolicy. internal partial class UnknownServicePlacementPolicy : ManagedServicePlacementPolicy { /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal UnknownServicePlacementPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal UnknownServicePlacementPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs index 14f95717e1d4..1d375b50c5a7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. + /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started. Enter any required information and then click Save. public partial class VmImagePlan { /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs index 8f16c4924940..98c99b5c76fa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Vm extension setup order. - /// - /// + /// Vm extension setup order. public readonly partial struct VmssExtensionSetupOrder : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..bebe86a84e5f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs @@ -0,0 +1,155 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class ZoneFaultSimulationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ZoneFaultSimulationContent 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(ZoneFaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + + internal static ZoneFaultSimulationContent DeserializeZoneFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList zones = default; + FaultKind faultKind = default; + bool? force = default; + FaultSimulationConstraints constraints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("force"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + force = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ZoneFaultSimulationContent(faultKind, force, constraints, serializedAdditionalRawData, zones ?? new ChangeTrackingList()); + } + + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + ZoneFaultSimulationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs new file mode 100644 index 000000000000..7b735ef01745 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Zone Fault Simulation action. + public partial class ZoneFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + public ZoneFaultSimulationContent() + { + Zones = new ChangeTrackingList(); + FaultKind = FaultKind.Zone; + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + /// Indicates the zones of the fault simulation. + internal ZoneFaultSimulationContent(FaultKind faultKind, bool? force, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData, IList zones) : base(faultKind, force, constraints, serializedAdditionalRawData) + { + Zones = zones; + FaultKind = faultKind; + } + + /// Indicates the zones of the fault simulation. + public IList Zones { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs index 93cabb6d0fa1..4300bba394b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ApplicationTypeVersionsRestOperations /// Initializes a new instance of ApplicationTypeVersionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationTypeVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -65,7 +65,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -114,8 +114,8 @@ public async Task> GetA } /// Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -177,7 +177,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -195,8 +195,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -226,8 +226,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -264,7 +264,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -285,7 +285,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -303,8 +303,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of an application type version resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -338,8 +338,8 @@ public async Task> Upda } /// Updates the tags of an application type version resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -380,7 +380,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -401,7 +401,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -415,8 +415,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -435,7 +435,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -445,8 +444,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -465,7 +464,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -482,7 +480,7 @@ internal RequestUriBuilder CreateListByApplicationTypesRequestUri(string subscri uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -502,7 +500,7 @@ internal HttpMessage CreateListByApplicationTypesRequest(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -515,8 +513,8 @@ internal HttpMessage CreateListByApplicationTypesRequest(string subscriptionId, } /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -546,8 +544,8 @@ public async Task> ListByApplicatio } /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -600,8 +598,8 @@ internal HttpMessage CreateListByApplicationTypesNextPageRequest(string nextLink /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -633,8 +631,8 @@ public async Task> ListByApplicatio /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs index 939894f7a141..c6aeda2e269c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ApplicationTypesRestOperations /// Initializes a new instance of ApplicationTypesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationTypesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -63,7 +63,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -75,8 +75,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> GetAsync(st } /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -148,7 +148,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -167,7 +167,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -183,8 +183,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type name resource. @@ -216,8 +216,8 @@ public async Task> CreateOrUpd } /// Create or update a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type name resource. @@ -256,7 +256,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -275,7 +275,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -291,8 +291,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of an application type resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type resource updated tags. @@ -324,8 +324,8 @@ public async Task> UpdateAsync } /// Updates the tags of an application type resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type resource updated tags. @@ -364,7 +364,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -383,7 +383,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -395,8 +395,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -413,7 +413,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -423,8 +422,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -441,7 +440,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -458,7 +456,7 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -476,7 +474,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -487,8 +485,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -516,8 +514,8 @@ public async Task> ListAsync(string subscr } /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -568,8 +566,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -599,8 +597,8 @@ public async Task> ListNextPageAsync(strin /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs index 255649d6246a..72755491e210 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ApplicationsRestOperations /// Initializes a new instance of ApplicationsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -48,16 +48,15 @@ internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, st uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -68,7 +67,6 @@ internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string reso uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -76,59 +74,73 @@ internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string reso return message; } - /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ReadUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ReadUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -140,16 +152,15 @@ internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -160,33 +171,39 @@ internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string re uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - /// The customer subscription identifier. - /// The name of the resource group. + /// Create or update a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The application resource. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task StartRollbackAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -194,25 +211,28 @@ public async Task StartRollbackAsync(string subscriptionId, string res } } - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - /// The customer subscription identifier. - /// The name of the resource group. + /// Create or update a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The application resource. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response StartRollback(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -220,7 +240,7 @@ public Response StartRollback(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -232,16 +252,15 @@ internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -252,75 +271,84 @@ internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string re uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - /// The customer subscription identifier. - /// The name of the resource group. + /// Updates the tags of an application resource of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The parameters for resuming an application upgrade. + /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ResumeUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - /// The customer subscription identifier. - /// The name of the resource group. + /// Updates the tags of an application resource of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The parameters for resuming an application upgrade. + /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ResumeUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -328,7 +356,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -336,18 +364,18 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -358,73 +386,61 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Delete a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Delete a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -432,99 +448,93 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); + uri.AppendPath("/applications", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); + uri.AppendPath("/applications", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The name of the application resource. - /// The application resource. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ApplicationResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The name of the application resource. - /// The application resource. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ApplicationResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) + internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -532,107 +542,91 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) + internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates the tags of an application resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) + public async Task ReadUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); + using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates the tags of an application resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) + public Response ReadUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); + using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -640,93 +634,99 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Delete a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task ResumeUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response ResumeUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -734,27 +734,31 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationName, true); + uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationName, true); + uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -762,59 +766,53 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the application resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartRollbackAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ApplicationResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the application resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartRollback(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ApplicationResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -844,8 +842,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -875,8 +873,8 @@ public async Task> ListNextPageAsync(string ne /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs index c45acb409fec..dc85f94ae1a5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs @@ -23,14 +23,14 @@ internal partial class ManagedApplyMaintenanceWindowRestOperations /// Initializes a new instance of ManagedApplyMaintenanceWindowRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedApplyMaintenanceWindowRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGro } /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -95,8 +95,8 @@ public async Task PostAsync(string subscriptionId, string resourceGrou } /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs index 0d6bb642c742..7a724c0ffafb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ManagedAzResiliencyStatusRestOperations /// Initializes a new instance of ManagedAzResiliencyStatusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedAzResiliencyStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetManagedAzResiliencyStatusRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetManagedAzResiliencyStatusRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -73,19 +73,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task> GetManagedAzResiliencyStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetManagedAzResiliencyStatusRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -102,19 +102,19 @@ public async Task> GetAsync(string subscript } /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response GetManagedAzResiliencyStatus(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetManagedAzResiliencyStatusRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs index 1f6de46f3826..c424d5d0f699 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs @@ -26,14 +26,14 @@ internal partial class ManagedClusterVersionRestOperations /// Initializes a new instance of ManagedClusterVersionRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedClusterVersionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,7 +72,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat } /// Gets information about an available Service Fabric managed cluster code version. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cluster code version. /// The cancellation token to use. @@ -100,7 +100,7 @@ public async Task> GetAsync(string } /// Gets information about an available Service Fabric managed cluster code version. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cluster code version. /// The cancellation token to use. @@ -127,7 +127,7 @@ public Response Get(string subscriptionId, A } } - internal RequestUriBuilder CreateGetByEnvironmentRequestUri(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -135,15 +135,12 @@ internal RequestUriBuilder CreateGetByEnvironmentRequestUri(string subscriptionI uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(environment.ToString(), true); - uri.AppendPath("/managedClusterVersions/", false); - uri.AppendPath(clusterVersion, true); + uri.AppendPath("/managedClusterVersions", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) + internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -154,10 +151,7 @@ internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureL uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(environment.ToString(), true); - uri.AppendPath("/managedClusterVersions/", false); - uri.AppendPath(clusterVersion, true); + uri.AppendPath("/managedClusterVersions", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -165,28 +159,30 @@ internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureL return message; } - /// Gets information about an available Service Fabric cluster code version by environment. - /// The customer subscription identifier. + /// Gets all available code versions for Service Fabric cluster resources by location. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetByEnvironmentAsync(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task>> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateGetByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); + using var message = CreateListRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterVersion value = default; + IReadOnlyList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); + } + value = array; return Response.FromValue(value, message.Response); } default: @@ -194,28 +190,30 @@ public async Task> GetByEnvironment } } - /// Gets information about an available Service Fabric cluster code version by environment. - /// The customer subscription identifier. + /// Gets all available code versions for Service Fabric cluster resources by location. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetByEnvironment(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response> List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateGetByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); + using var message = CreateListRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterVersion value = default; + IReadOnlyList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); + } + value = array; return Response.FromValue(value, message.Response); } default: @@ -223,7 +221,7 @@ public Response GetByEnvironment(string subs } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedClusterVersionByEnvironmentRequestUri(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -231,12 +229,15 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedClusterVersions", false); + uri.AppendPath("/environments/", false); + uri.AppendPath(environment.ToString(), true); + uri.AppendPath("/managedClusterVersions/", false); + uri.AppendPath(clusterVersion, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedClusterVersionByEnvironmentRequest(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -247,7 +248,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedClusterVersions", false); + uri.AppendPath("/environments/", false); + uri.AppendPath(environment.ToString(), true); + uri.AppendPath("/managedClusterVersions/", false); + uri.AppendPath(clusterVersion, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -255,30 +259,28 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca return message; } - /// Gets all available code versions for Service Fabric cluster resources by location. - /// The customer subscription identifier. + /// Gets information about an available Service Fabric cluster code version by environment. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetManagedClusterVersionByEnvironmentAsync(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedClusterVersionByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - IReadOnlyList value = default; + ServiceFabricManagedClusterVersion value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); - } - value = array; + value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -286,30 +288,28 @@ public async Task>> L } } - /// Gets all available code versions for Service Fabric cluster resources by location. - /// The customer subscription identifier. + /// Gets information about an available Service Fabric cluster code version by environment. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetManagedClusterVersionByEnvironment(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedClusterVersionByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - IReadOnlyList value = default; + ServiceFabricManagedClusterVersion value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); - } - value = array; + value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -354,9 +354,9 @@ internal HttpMessage CreateListByEnvironmentRequest(string subscriptionId, Azure } /// Gets all available code versions for Service Fabric cluster resources by environment. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -386,9 +386,9 @@ public async Task>> L } /// Gets all available code versions for Service Fabric cluster resources by environment. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs index 2b4e2d0f01f7..5260fa9abd15 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs @@ -25,17 +25,389 @@ internal partial class ManagedClustersRestOperations /// Initializes a new instance of ManagedClustersRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the tags of of a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The managed cluster resource updated tags. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the tags of of a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The managed cluster resource updated tags. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -69,8 +441,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -96,8 +468,8 @@ public async Task> ListByResourceGroupAsync(s } /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -151,7 +523,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -176,7 +548,7 @@ public async Task> ListBySubscriptionAsync(st } /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -200,7 +572,7 @@ public Response ListBySubscription(string subscription } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -210,15 +582,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -227,76 +600,81 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task> GetFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterData value = default; + FaultSimulation value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response GetFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterData value = default; + FaultSimulation value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + internal RequestUriBuilder CreateListFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -306,15 +684,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + internal HttpMessage CreateListFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -323,72 +702,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The cluster resource. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + public async Task> ListFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The cluster resource. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + public Response ListFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + internal RequestUriBuilder CreateStartFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -398,15 +778,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -415,80 +796,71 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; } - /// Update the tags of of a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The managed cluster resource updated tags. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + public async Task StartFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, faultSimulationContentWrapper); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedClusterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Update the tags of of a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The managed cluster resource updated tags. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + public Response StartFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, faultSimulationContentWrapper); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedClusterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateStopFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -498,15 +870,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -515,59 +888,64 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Delete a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task StopFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response StopFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -598,8 +976,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -627,8 +1005,8 @@ public async Task> ListByResourceGroupNextPag /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -678,7 +1056,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -705,7 +1083,7 @@ public async Task> ListBySubscriptionNextPage /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -729,5 +1107,89 @@ public Response ListBySubscriptionNextPage(string next throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListFaultSimulationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListFaultSimulationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of recent fault simulations for the cluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListFaultSimulationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recent fault simulations for the cluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListFaultSimulationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs index c63da012f10e..da9210d94c46 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ManagedMaintenanceWindowStatusRestOperations /// Initializes a new instance of ManagedMaintenanceWindowStatusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedMaintenanceWindowStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> GetAsync(string subs } /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs index 93113c271520..cea0181cc723 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ManagedUnsupportedVMSizesRestOperations /// Initializes a new instance of ManagedUnsupportedVMSizesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedUnsupportedVMSizesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizeRequestUri(string subscriptionId, AzureLocation location, string vmSize) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,12 +44,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes", false); + uri.AppendPath("/managedUnsupportedVMSizes/", false); + uri.AppendPath(vmSize, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedUnsupportedVmSizeRequest(string subscriptionId, AzureLocation location, string vmSize) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,7 +61,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes", false); + uri.AppendPath("/managedUnsupportedVMSizes/", false); + uri.AppendPath(vmSize, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -68,25 +70,27 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca return message; } - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizeAsync(string subscriptionId, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizeRequest(subscriptionId, location, vmSize); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedVmSizesResult value = default; + ServiceFabricManagedUnsupportedVmSize value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); + value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,25 +98,27 @@ public async Task> ListAsync(string subscriptionI } } - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSize(string subscriptionId, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizeRequest(subscriptionId, location, vmSize); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedVmSizesResult value = default; + ServiceFabricManagedUnsupportedVmSize value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); + value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -120,7 +126,7 @@ public Response List(string subscriptionId, AzureLocation } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string vmSize) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizesRequestUri(string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -128,13 +134,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes/", false); - uri.AppendPath(vmSize, true); + uri.AppendPath("/managedUnsupportedVMSizes", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string vmSize) + internal HttpMessage CreateGetManagedUnsupportedVmSizesRequest(string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -145,8 +150,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes/", false); - uri.AppendPath(vmSize, true); + uri.AppendPath("/managedUnsupportedVMSizes", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,27 +158,25 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat return message; } - /// Get unsupported vm size for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizesAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateGetRequest(subscriptionId, location, vmSize); + using var message = CreateGetManagedUnsupportedVmSizesRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedUnsupportedVmSize value = default; + ManagedVmSizesResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); + value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -182,27 +184,25 @@ public async Task> GetAsync(stri } } - /// Get unsupported vm size for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSizes(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateGetRequest(subscriptionId, location, vmSize); + using var message = CreateGetManagedUnsupportedVmSizesRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedUnsupportedVmSize value = default; + ManagedVmSizesResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); + value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -210,7 +210,7 @@ public Response Get(string subscriptionId } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizesNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -218,7 +218,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedUnsupportedVmSizesNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,17 +234,17 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> GetManagedUnsupportedVmSizesNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -262,17 +262,17 @@ public async Task> ListNextPageAsync(string nextL /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public Response GetManagedUnsupportedVmSizesNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs index 1b2c284ea8e5..7776f44c54d1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs @@ -25,18 +25,18 @@ internal partial class NodeTypeSkusRestOperations /// Initializes a new instance of NodeTypeSkusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public NodeTypeSkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateGetAvailableSkusRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -53,7 +53,7 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateGetAvailableSkusRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -77,21 +77,21 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get a Service Fabric node type supported SKUs. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> GetAvailableSkusAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,21 +108,21 @@ public async Task> ListAsync(string subscription } /// Get a Service Fabric node type supported SKUs. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response GetAvailableSkus(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -138,7 +138,7 @@ public Response List(string subscriptionId, string resour } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateGetAvailableSkusNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,7 +146,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateGetAvailableSkusNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -162,14 +162,14 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get a Service Fabric node type supported SKUs. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> GetAvailableSkusNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -177,7 +177,7 @@ public async Task> ListNextPageAsync(string next Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -195,14 +195,14 @@ public async Task> ListNextPageAsync(string next /// Get a Service Fabric node type supported SKUs. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response GetAvailableSkusNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -210,7 +210,7 @@ public Response ListNextPage(string nextLink, string subs Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs index dd4e1bb607d6..49e9cf63bc16 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class NodeTypesRestOperations /// Initializes a new instance of NodeTypesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public NodeTypesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/nodeTypes", false); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/nodeTypes", false); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, s return message; } - /// Gets all Node types of the specified managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the node type. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByManagedClustersAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NodeTypeListResult value = default; + ServiceFabricManagedNodeTypeData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets all Node types of the specified managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the node type. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByManagedClusters(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NodeTypeListResult value = default; + ServiceFabricManagedNodeTypeData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -142,16 +152,15 @@ internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -162,7 +171,694 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/restart", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The node type resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The node type resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the configuration of a node type of a given managed cluster, only updating tags. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The parameters to update the node type configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the configuration of a node type of a given managed cluster, only updating tags. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The parameters to update the node type configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Node types of the specified managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByManagedClustersAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NodeTypeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Node types of the specified managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByManagedClusters(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NodeTypeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeallocateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deallocate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deallocate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for deallocate action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeallocateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for deallocate action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Deallocate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deleteNode", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deleteNode", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for delete action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteNodeAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for delete action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteNode(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/redeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/redeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for redeploy action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RedeployAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for redeploy action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Redeploy(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/reimage", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReimageRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/reimage", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -174,16 +870,16 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource return message; } - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for restart action. + /// parameters for reimage action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task RestartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task ReimageAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -191,11 +887,10 @@ public async Task RestartAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -203,16 +898,16 @@ public async Task RestartAsync(string subscriptionId, string resourceG } } - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for restart action. + /// parameters for reimage action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Restart(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Reimage(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -220,11 +915,10 @@ public Response Restart(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -232,7 +926,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -244,12 +938,12 @@ internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/reimage", false); + uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReimageRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -264,7 +958,7 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/reimage", false); + uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -276,16 +970,16 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource return message; } - /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for reimage action. + /// parameters for restart action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ReimageAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task RestartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -293,11 +987,10 @@ public async Task ReimageAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -305,16 +998,16 @@ public async Task ReimageAsync(string subscriptionId, string resourceG } } - /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for reimage action. + /// parameters for restart action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Reimage(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Restart(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -322,11 +1015,10 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -334,7 +1026,7 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,12 +1038,12 @@ internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, str uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/deleteNode", false); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -366,7 +1058,7 @@ internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resou uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/deleteNode", false); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -378,16 +1070,16 @@ internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resou return message; } - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for delete action. + /// parameters for start action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteNodeAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task StartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -395,11 +1087,10 @@ public async Task DeleteNodeAsync(string subscriptionId, string resour Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -407,16 +1098,16 @@ public async Task DeleteNodeAsync(string subscriptionId, string resour } } - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for delete action. + /// parameters for start action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteNode(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Start(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -424,11 +1115,10 @@ public Response DeleteNode(string subscriptionId, string resourceGroupName, stri Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -436,7 +1126,7 @@ public Response DeleteNode(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateStartFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -448,15 +1138,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -467,80 +1158,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task StartFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, faultSimulationContentWrapper); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedNodeTypeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response StartFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, faultSimulationContentWrapper); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedNodeTypeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) + internal RequestUriBuilder CreateStopFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -552,15 +1238,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -571,39 +1258,39 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Create or update a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The node type resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + public async Task StopFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -611,28 +1298,27 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The node type resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + public Response StopFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -640,7 +1326,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + internal RequestUriBuilder CreateGetFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -652,15 +1338,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -671,76 +1358,85 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Update the configuration of a node type of a given managed cluster, only updating tags. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The parameters to update the node type configuration. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + public async Task> GetFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Update the configuration of a node type of a given managed cluster, only updating tags. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The parameters to update the node type configuration. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + public Response GetFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateListFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -752,15 +1448,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateListFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -771,6 +1468,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -778,57 +1476,63 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> ListFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response ListFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -858,8 +1562,8 @@ internal HttpMessage CreateListByManagedClustersNextPageRequest(string nextLink, /// Gets all Node types of the specified managed cluster. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -889,8 +1593,8 @@ public async Task> ListByManagedClustersNextPageAsy /// Gets all Node types of the specified managed cluster. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -917,5 +1621,93 @@ public Response ListByManagedClustersNextPage(string nextLin throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListFaultSimulationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListFaultSimulationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of recent fault simulations for the node type. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListFaultSimulationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recent fault simulations for the node type. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListFaultSimulationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationResultsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationResultsRestOperations.cs new file mode 100644 index 000000000000..b033ef044bbf --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationResultsRestOperations.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class OperationResultsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationResultsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OperationResultsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string operationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperationResults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperationResults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get long running operation result. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task GetAsync(string subscriptionId, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get long running operation result. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationStatusRestOperations.cs new file mode 100644 index 000000000000..25b7afe5e718 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationStatusRestOperations.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class OperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string operationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get long running operation status. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LongRunningOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LongRunningOperationResult.DeserializeLongRunningOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get long running operation status. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LongRunningOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LongRunningOperationResult.DeserializeLongRunningOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationsRestOperations.cs new file mode 100644 index 000000000000..2b297ac70ffe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationsRestOperations.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class OperationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OperationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri() + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.ServiceFabric/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.ServiceFabric/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public async Task> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + + using var message = CreateListNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public Response ListNextPage(string nextLink, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + + using var message = CreateListNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs index 24d70faa8dc8..8e07e995b535 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ServicesRestOperations /// Initializes a new instance of ServicesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -65,7 +65,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -114,8 +114,8 @@ public async Task> GetAsync(string sub } /// Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -177,7 +177,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -195,8 +195,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -226,8 +226,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -264,7 +264,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -285,7 +285,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -303,8 +303,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of a service resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -338,8 +338,8 @@ public async Task> UpdateAsync(string } /// Updates the tags of a service resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -380,7 +380,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -401,7 +401,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -415,8 +415,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -435,7 +435,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -445,8 +444,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -465,7 +464,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -482,7 +480,7 @@ internal RequestUriBuilder CreateListByApplicationsRequestUri(string subscriptio uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -502,7 +500,7 @@ internal HttpMessage CreateListByApplicationsRequest(string subscriptionId, stri uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -515,8 +513,8 @@ internal HttpMessage CreateListByApplicationsRequest(string subscriptionId, stri } /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -546,8 +544,8 @@ public async Task> ListByApplicationsAsync(string } /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -600,8 +598,8 @@ internal HttpMessage CreateListByApplicationsNextPageRequest(string nextLink, st /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -633,8 +631,8 @@ public async Task> ListByApplicationsNextPageAsync /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs index 059dab1723da..37f00cc1b983 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_CreateOrUpdate + /// ApplicationResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_CreateOrUpdate + /// ApplicationResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation CreateOrUpd /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(string appl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications /// /// /// Operation Id - /// Applications_List + /// ApplicationResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications /// /// /// Operation Id - /// Applications_List + /// ApplicationResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetAll(Cancella /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string applicationName, Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string applicationName, CancellationToken c /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs index fecb0c1cc29f..b99e979f4cc9 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs @@ -44,6 +44,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ManagedIdentities)) + { + writer.WritePropertyName("managedIdentities"u8); + writer.WriteStartArray(); + foreach (var item in ManagedIdentities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -70,16 +80,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("upgradePolicy"u8); writer.WriteObjectValue(UpgradePolicy, options); } - if (Optional.IsCollectionDefined(ManagedIdentities)) - { - writer.WritePropertyName("managedIdentities"u8); - writer.WriteStartArray(); - foreach (var item in ManagedIdentities) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } writer.WriteEndObject(); } @@ -110,11 +110,11 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana string name = default; ResourceType type = default; SystemData systemData = default; + IList managedIdentities = default; string provisioningState = default; string version = default; IDictionary parameters = default; ApplicationUpgradePolicy upgradePolicy = default; - IList managedIdentities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -180,6 +180,20 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("managedIdentities"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ApplicationUserAssignedIdentityInfo.DeserializeApplicationUserAssignedIdentityInfo(item, options)); + } + managedIdentities = array; + continue; + } if (property0.NameEquals("provisioningState"u8)) { provisioningState = property0.Value.GetString(); @@ -213,20 +227,6 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana upgradePolicy = ApplicationUpgradePolicy.DeserializeApplicationUpgradePolicy(property0.Value, options); continue; } - if (property0.NameEquals("managedIdentities"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ApplicationUserAssignedIdentityInfo.DeserializeApplicationUserAssignedIdentityInfo(item, options)); - } - managedIdentities = array; - continue; - } } continue; } @@ -243,12 +243,12 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, + managedIdentities ?? new ChangeTrackingList(), provisioningState, version, parameters ?? new ChangeTrackingDictionary(), upgradePolicy, - managedIdentities ?? new ChangeTrackingList(), + identity, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs index 2a875e2e4af5..f88bd936d798 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs @@ -55,8 +55,8 @@ public partial class ServiceFabricManagedApplicationData : TrackedResourceData /// The location. public ServiceFabricManagedApplicationData(AzureLocation location) : base(location) { - Parameters = new ChangeTrackingDictionary(); ManagedIdentities = new ChangeTrackingList(); + Parameters = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -66,25 +66,24 @@ public ServiceFabricManagedApplicationData(AzureLocation location) : base(locati /// The systemData. /// The tags. /// The location. - /// Describes the managed identities for an Azure resource. + /// List of user assigned identities for the application, each mapped to a friendly name. /// The current deployment or provisioning state, which only appears in the response. /// /// The version of the application type as defined in the application manifest. /// This name must be the full Arm Resource ID for the referenced application type version. - /// /// /// List of application parameters with overridden values from their default values specified in the application manifest. /// Describes the policy for a monitored application upgrade. - /// List of user assigned identities for the application, each mapped to a friendly name. + /// Describes the managed identities for an Azure resource. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, string version, IDictionary parameters, ApplicationUpgradePolicy upgradePolicy, IList managedIdentities, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServiceFabricManagedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList managedIdentities, string provisioningState, string version, IDictionary parameters, ApplicationUpgradePolicy upgradePolicy, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; + ManagedIdentities = managedIdentities; ProvisioningState = provisioningState; Version = version; Parameters = parameters; UpgradePolicy = upgradePolicy; - ManagedIdentities = managedIdentities; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,21 +92,20 @@ internal ServiceFabricManagedApplicationData() { } - /// Describes the managed identities for an Azure resource. - public ManagedServiceIdentity Identity { get; set; } + /// List of user assigned identities for the application, each mapped to a friendly name. + public IList ManagedIdentities { get; } /// The current deployment or provisioning state, which only appears in the response. public string ProvisioningState { get; } /// /// The version of the application type as defined in the application manifest. /// This name must be the full Arm Resource ID for the referenced application type version. - /// /// public string Version { get; set; } /// List of application parameters with overridden values from their default values specified in the application manifest. public IDictionary Parameters { get; } /// Describes the policy for a monitored application upgrade. public ApplicationUpgradePolicy UpgradePolicy { get; set; } - /// List of user assigned identities for the application, each mapped to a friendly name. - public IList ManagedIdentities { get; } + /// Describes the managed identities for an Azure resource. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs index c0e1f5dbfcb6..660dd857eb45 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs @@ -31,7 +31,7 @@ public partial class ServiceFabricManagedApplicationResource : ArmResource /// The applicationName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}"; return new ResourceIdentifier(resourceId); } @@ -40,7 +40,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applications"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applications"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationResource() @@ -102,15 +102,15 @@ public virtual ServiceFabricManagedServiceCollection GetServiceFabricManagedServ /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -133,15 +133,15 @@ public virtual async Task> GetServ /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -164,15 +164,15 @@ public virtual Response GetServiceFabricMan /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,15 +204,15 @@ public virtual async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(Cancellatio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Delete + /// ApplicationResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -286,15 +286,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Delete + /// ApplicationResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -328,15 +328,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Update + /// ApplicationResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -370,15 +370,15 @@ public virtual async Task> Upd /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Update + /// ApplicationResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(ServiceF /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task ReadUpgradeAsync(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -492,19 +492,19 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken c } /// - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade /// /// /// Operation Id - /// Applications_StartRollback + /// Applications_ResumeUpgrade /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -513,15 +513,19 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken c /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - public virtual async Task StartRollbackAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); scope.Start(); try { - var response = await _serviceFabricManagedApplicationApplicationsRestClient.StartRollbackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -534,19 +538,19 @@ public virtual async Task StartRollbackAsync(WaitUntil waitUntil, } /// - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade /// /// /// Operation Id - /// Applications_StartRollback + /// Applications_ResumeUpgrade /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -555,15 +559,19 @@ public virtual async Task StartRollbackAsync(WaitUntil waitUntil, /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); scope.Start(); try { - var response = _serviceFabricManagedApplicationApplicationsRestClient.StartRollback(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -576,19 +584,19 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken } /// - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback /// /// /// Operation Id - /// Applications_ResumeUpgrade + /// Applications_StartRollback /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -597,19 +605,15 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// is null. - public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public virtual async Task StartRollbackAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); scope.Start(); try { - var response = await _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedApplicationApplicationsRestClient.StartRollbackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -622,19 +626,19 @@ public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, } /// - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback /// /// /// Operation Id - /// Applications_ResumeUpgrade + /// Applications_StartRollback /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -643,19 +647,15 @@ public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); scope.Start(); try { - var response = _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedApplicationApplicationsRestClient.StartRollback(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -672,15 +672,15 @@ public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeAppl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -734,15 +734,15 @@ public virtual async Task> Add /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -796,15 +796,15 @@ public virtual Response AddTag(string k /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -853,15 +853,15 @@ public virtual async Task> Set /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -910,15 +910,15 @@ public virtual Response SetTags(IDictio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -970,15 +970,15 @@ public virtual async Task> Rem /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs index 0e58fb49da28..73d37518ceb5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_CreateOrUpdate + /// ApplicationTypeResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -107,15 +107,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_CreateOrUpdate + /// ApplicationTypeResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -158,15 +158,15 @@ public virtual ArmOperation CreateO /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -203,15 +203,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -248,15 +248,15 @@ public virtual Response Get(string /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes /// /// /// Operation Id - /// ApplicationTypes_List + /// ApplicationTypeResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -278,15 +278,15 @@ public virtual AsyncPageable GetAll /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes /// /// /// Operation Id - /// ApplicationTypes_List + /// ApplicationTypeResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -308,15 +308,15 @@ public virtual Pageable GetAll(Canc /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -351,15 +351,15 @@ public virtual async Task> ExistsAsync(string applicationTypeName /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -394,15 +394,15 @@ public virtual Response Exists(string applicationTypeName, CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -439,15 +439,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs index 5ce658a99c6b..40d605a876eb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs @@ -31,7 +31,7 @@ public partial class ServiceFabricManagedApplicationTypeResource : ArmResource /// The applicationTypeName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationTypeName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}"; return new ResourceIdentifier(resourceId); } @@ -40,7 +40,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationTypeData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applicationTypes"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applicationTypes"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationTypeResource() @@ -102,15 +102,15 @@ public virtual ServiceFabricManagedApplicationTypeVersionCollection GetServiceFa /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -133,15 +133,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -164,15 +164,15 @@ public virtual Response GetS /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,15 +204,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Delete + /// ApplicationTypeResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -286,15 +286,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Delete + /// ApplicationTypeResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -328,15 +328,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Update + /// ApplicationTypeResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -370,15 +370,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Update + /// ApplicationTypeResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -412,15 +412,15 @@ public virtual Response Update(Serv /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -474,15 +474,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -536,15 +536,15 @@ public virtual Response AddTag(stri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -593,15 +593,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -650,15 +650,15 @@ public virtual Response SetTags(IDi /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -710,15 +710,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs index 62d8d8ef5c70..a3a494f8d3a3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_CreateOrUpdate + /// ApplicationTypeVersionResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_CreateOrUpdate + /// ApplicationTypeVersionResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions /// /// /// Operation Id - /// ApplicationTypeVersions_ListByApplicationTypes + /// ApplicationTypeVersionResource_ListByApplicationTypes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions /// /// /// Operation Id - /// ApplicationTypeVersions_ListByApplicationTypes + /// ApplicationTypeVersionResource_ListByApplicationTypes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs index 1aa2bfc2e67b..6e62d07ed77a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs @@ -32,7 +32,7 @@ public partial class ServiceFabricManagedApplicationTypeVersionResource : ArmRes /// The version. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationTypeName, string version) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}"; return new ResourceIdentifier(resourceId); } @@ -41,7 +41,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationTypeVersionData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applicationTypes/versions"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationTypeVersionResource() @@ -96,15 +96,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -136,15 +136,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -176,15 +176,15 @@ public virtual Response Get( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Delete + /// ApplicationTypeVersionResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,15 +218,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Delete + /// ApplicationTypeVersionResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -260,15 +260,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Update + /// ApplicationTypeVersionResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -302,15 +302,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Update + /// ApplicationTypeVersionResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -344,15 +344,15 @@ public virtual Response Upda /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -406,15 +406,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -468,15 +468,15 @@ public virtual Response AddT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -525,15 +525,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -582,15 +582,15 @@ public virtual Response SetT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -642,15 +642,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs index 6df765faf4f4..de543cc4096c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ManagedClusters_CreateOrUpdate + /// ManagedCluster_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -110,11 +110,11 @@ public virtual async Task> Cre /// /// /// Operation Id - /// ManagedClusters_CreateOrUpdate + /// ManagedCluster_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -249,11 +249,11 @@ public virtual Response Get(string clusterN /// /// /// Operation Id - /// ManagedClusters_ListByResourceGroup + /// ManagedCluster_ListByResourceGroup /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -279,11 +279,11 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Operation Id - /// ManagedClusters_ListByResourceGroup + /// ManagedCluster_ListByResourceGroup /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -309,11 +309,11 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -395,11 +395,11 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +440,11 @@ public virtual async Task> /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs index acf7a23ab26b..206cdf01c2e6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs @@ -38,13 +38,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DnsName)) @@ -309,6 +309,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("allocatedOutboundPorts"u8); writer.WriteNumberValue(AllocatedOutboundPorts.Value); } + if (Optional.IsDefined(VmImage)) + { + writer.WritePropertyName("VMImage"u8); + writer.WriteStringValue(VmImage); + } writer.WriteEndObject(); } @@ -332,8 +337,8 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC { return null; } - ServiceFabricManagedClustersSku sku = default; ETag? etag = default; + ServiceFabricManagedClustersSku sku = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -381,15 +386,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC bool? enableHttpGatewayExclusiveAuthMode = default; AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; int? allocatedOutboundPorts = default; + string vmImage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sku"u8)) - { - sku = ServiceFabricManagedClustersSku.DeserializeServiceFabricManagedClustersSku(property.Value, options); - continue; - } if (property.NameEquals("etag"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -399,6 +400,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC etag = new ETag(property.Value.GetString()); continue; } + if (property.NameEquals("sku"u8)) + { + sku = ServiceFabricManagedClustersSku.DeserializeServiceFabricManagedClustersSku(property.Value, options); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -778,7 +784,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("publicIPPrefixId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -787,7 +793,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("publicIPv6PrefixId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -796,7 +802,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("ddosProtectionPlanId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -848,6 +854,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC allocatedOutboundPorts = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("VMImage"u8)) + { + vmImage = property0.Value.GetString(); + continue; + } } continue; } @@ -864,7 +875,6 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC systemData, tags ?? new ChangeTrackingDictionary(), location, - sku, dnsName, fqdn, ipv4Address, @@ -906,7 +916,9 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC enableHttpGatewayExclusiveAuthMode, autoGeneratedDomainNameLabelScope, allocatedOutboundPorts, + vmImage, etag, + sku, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs index 090cde8c1615..54c3fea59cda 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters /// /// A class representing the ServiceFabricManagedCluster data model. /// The managed cluster resource - /// /// public partial class ServiceFabricManagedClusterData : TrackedResourceData { @@ -61,7 +60,6 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana { Argument.AssertNotNull(sku, nameof(sku)); - Sku = sku; ClusterCertificateThumbprints = new ChangeTrackingList(); LoadBalancingRules = new ChangeTrackingList(); NetworkSecurityRules = new ChangeTrackingList(); @@ -71,6 +69,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana IPTags = new ChangeTrackingList(); AuxiliarySubnets = new ChangeTrackingList(); ServiceEndpoints = new ChangeTrackingList(); + Sku = sku; } /// Initializes a new instance of . @@ -80,7 +79,6 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// The systemData. /// The tags. /// The location. - /// The sku of the managed cluster. /// The cluster dns name. /// The fully qualified domain name associated with the public load balancer of the cluster. /// The IPv4 address associated with the public load balancer of the cluster. @@ -99,10 +97,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// The list of custom fabric settings to configure the cluster. /// The provisioning state of the managed cluster resource. /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. /// List of add-on features to enable on the cluster. /// Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. @@ -125,11 +120,12 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. /// This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",. + /// The sku of the managed cluster. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServiceFabricManagedClustersSku sku, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IReadOnlyList clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IList loadBalancingRules, bool? isRdpAccessAllowed, IList networkSecurityRules, IList clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IList fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IList addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy, bool? isIPv6Enabled, string subnetId, IList ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IList auxiliarySubnets, IList serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, int? allocatedOutboundPorts, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IReadOnlyList clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IList loadBalancingRules, bool? isRdpAccessAllowed, IList networkSecurityRules, IList clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IList fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IList addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy, bool? isIPv6Enabled, string subnetId, IList ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IList auxiliarySubnets, IList serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, int? allocatedOutboundPorts, string vmImage, ETag? etag, ServiceFabricManagedClustersSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Sku = sku; DnsName = dnsName; Fqdn = fqdn; IPv4Address = ipv4Address; @@ -171,7 +167,9 @@ internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, Res IsHttpGatewayExclusiveAuthModeEnabled = isHttpGatewayExclusiveAuthModeEnabled; AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; AllocatedOutboundPorts = allocatedOutboundPorts; + VmImage = vmImage; ETag = etag; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -180,18 +178,6 @@ internal ServiceFabricManagedClusterData() { } - /// The sku of the managed cluster. - internal ServiceFabricManagedClustersSku Sku { get; set; } - /// Sku Name. - public ServiceFabricManagedClustersSkuName? SkuName - { - get => Sku is null ? default(ServiceFabricManagedClustersSkuName?) : Sku.Name; - set - { - Sku = value.HasValue ? new ServiceFabricManagedClustersSku(value.Value) : null; - } - } - /// The cluster dns name. public string DnsName { get; set; } /// The fully qualified domain name associated with the public load balancer of the cluster. @@ -257,10 +243,7 @@ public ServiceFabricManagedClustersSkuName? SkuName public ServiceFabricManagedResourceProvisioningState? ProvisioningState { get; } /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. public string ClusterCodeVersion { get; set; } - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. public ManagedClusterUpgradeMode? ClusterUpgradeMode { get; set; } /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. public ManagedClusterUpgradeCadence? ClusterUpgradeCadence { get; set; } @@ -316,7 +299,20 @@ public int? MaxUnusedVersionsToKeep public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. public int? AllocatedOutboundPorts { get; set; } - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + public string VmImage { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",. public ETag? ETag { get; } + /// The sku of the managed cluster. + internal ServiceFabricManagedClustersSku Sku { get; set; } + /// Sku Name. + public ServiceFabricManagedClustersSkuName? SkuName + { + get => Sku is null ? default(ServiceFabricManagedClustersSkuName?) : Sku.Name; + set + { + Sku = value.HasValue ? new ServiceFabricManagedClustersSku(value.Value) : null; + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs index 6feca7d956ef..4b51515864da 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs @@ -10,6 +10,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.Resources; @@ -39,10 +40,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; private readonly ClientDiagnostics _managedAzResiliencyStatusClientDiagnostics; private readonly ManagedAzResiliencyStatusRestOperations _managedAzResiliencyStatusRestClient; - private readonly ClientDiagnostics _managedMaintenanceWindowStatusClientDiagnostics; - private readonly ManagedMaintenanceWindowStatusRestOperations _managedMaintenanceWindowStatusRestClient; private readonly ClientDiagnostics _managedApplyMaintenanceWindowClientDiagnostics; private readonly ManagedApplyMaintenanceWindowRestOperations _managedApplyMaintenanceWindowRestClient; + private readonly ClientDiagnostics _managedMaintenanceWindowStatusClientDiagnostics; + private readonly ManagedMaintenanceWindowStatusRestOperations _managedMaintenanceWindowStatusRestClient; private readonly ServiceFabricManagedClusterData _data; /// Gets the resource type for the operations. @@ -72,10 +73,10 @@ internal ServiceFabricManagedClusterResource(ArmClient client, ResourceIdentifie _serviceFabricManagedClusterManagedClustersRestClient = new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceFabricManagedClusterManagedClustersApiVersion); _managedAzResiliencyStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedAzResiliencyStatusRestClient = new ManagedAzResiliencyStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _managedApplyMaintenanceWindowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedApplyMaintenanceWindowRestClient = new ManagedApplyMaintenanceWindowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -102,142 +103,142 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of ServiceFabricManagedApplicationTypeResources in the ServiceFabricManagedCluster. - /// An object representing collection of ServiceFabricManagedApplicationTypeResources and their operations over a ServiceFabricManagedApplicationTypeResource. - public virtual ServiceFabricManagedApplicationTypeCollection GetServiceFabricManagedApplicationTypes() + /// Gets a collection of ServiceFabricManagedApplicationResources in the ServiceFabricManagedCluster. + /// An object representing collection of ServiceFabricManagedApplicationResources and their operations over a ServiceFabricManagedApplicationResource. + public virtual ServiceFabricManagedApplicationCollection GetServiceFabricManagedApplications() { - return GetCachedClient(client => new ServiceFabricManagedApplicationTypeCollection(client, Id)); + return GetCachedClient(client => new ServiceFabricManagedApplicationCollection(client, Id)); } /// - /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application type name resource. + /// The name of the application resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetServiceFabricManagedApplicationTypeAsync(string applicationTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceFabricManagedApplicationAsync(string applicationName, CancellationToken cancellationToken = default) { - return await GetServiceFabricManagedApplicationTypes().GetAsync(applicationTypeName, cancellationToken).ConfigureAwait(false); + return await GetServiceFabricManagedApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application type name resource. + /// The name of the application resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetServiceFabricManagedApplicationType(string applicationTypeName, CancellationToken cancellationToken = default) + public virtual Response GetServiceFabricManagedApplication(string applicationName, CancellationToken cancellationToken = default) { - return GetServiceFabricManagedApplicationTypes().Get(applicationTypeName, cancellationToken); + return GetServiceFabricManagedApplications().Get(applicationName, cancellationToken); } - /// Gets a collection of ServiceFabricManagedApplicationResources in the ServiceFabricManagedCluster. - /// An object representing collection of ServiceFabricManagedApplicationResources and their operations over a ServiceFabricManagedApplicationResource. - public virtual ServiceFabricManagedApplicationCollection GetServiceFabricManagedApplications() + /// Gets a collection of ServiceFabricManagedApplicationTypeResources in the ServiceFabricManagedCluster. + /// An object representing collection of ServiceFabricManagedApplicationTypeResources and their operations over a ServiceFabricManagedApplicationTypeResource. + public virtual ServiceFabricManagedApplicationTypeCollection GetServiceFabricManagedApplicationTypes() { - return GetCachedClient(client => new ServiceFabricManagedApplicationCollection(client, Id)); + return GetCachedClient(client => new ServiceFabricManagedApplicationTypeCollection(client, Id)); } /// - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application resource. + /// The name of the application type name resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetServiceFabricManagedApplicationAsync(string applicationName, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceFabricManagedApplicationTypeAsync(string applicationTypeName, CancellationToken cancellationToken = default) { - return await GetServiceFabricManagedApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); + return await GetServiceFabricManagedApplicationTypes().GetAsync(applicationTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application resource. + /// The name of the application type name resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetServiceFabricManagedApplication(string applicationName, CancellationToken cancellationToken = default) + public virtual Response GetServiceFabricManagedApplicationType(string applicationTypeName, CancellationToken cancellationToken = default) { - return GetServiceFabricManagedApplications().Get(applicationName, cancellationToken); + return GetServiceFabricManagedApplicationTypes().Get(applicationTypeName, cancellationToken); } /// Gets a collection of ServiceFabricManagedNodeTypeResources in the ServiceFabricManagedCluster. @@ -256,11 +257,11 @@ public virtual ServiceFabricManagedNodeTypeCollection GetServiceFabricManagedNod /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -287,11 +288,11 @@ public virtual async Task> GetSer /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -318,11 +319,11 @@ public virtual Response GetServiceFabricMa /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -358,11 +359,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -398,11 +399,11 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id - /// ManagedClusters_Delete + /// ManagedCluster_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +441,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// ManagedClusters_Delete + /// ManagedCluster_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -482,11 +483,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// ManagedClusters_Update + /// ManagedCluster_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -524,11 +525,11 @@ public virtual async Task> UpdateA /// /// /// Operation Id - /// ManagedClusters_Update + /// ManagedCluster_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -558,30 +559,38 @@ public virtual Response Update(ServiceFabri } /// - /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// Gets a fault simulation by the simulationId. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation /// /// /// Operation Id - /// managedAzResiliencyStatus_Get + /// ManagedClusters_GetFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// + /// parameter with fault simulation id. /// The cancellation token to use. - public virtual async Task> GetManagedAzResiliencyStatusAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) { - using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); scope.Start(); try { - var response = await _managedAzResiliencyStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _serviceFabricManagedClusterManagedClustersRestClient.GetFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -592,30 +601,38 @@ public virtual async Task> GetManagedAzResil } /// - /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// Gets a fault simulation by the simulationId. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation /// /// /// Operation Id - /// managedAzResiliencyStatus_Get + /// ManagedClusters_GetFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// + /// parameter with fault simulation id. /// The cancellation token to use. - public virtual Response GetManagedAzResiliencyStatus(CancellationToken cancellationToken = default) + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) { - using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); scope.Start(); try { - var response = _managedAzResiliencyStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _serviceFabricManagedClusterManagedClustersRestClient.GetFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); return response; } catch (Exception e) @@ -626,30 +643,274 @@ public virtual Response GetManagedAzResiliencyStatus( } /// - /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// Gets the list of recent fault simulations for the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation /// /// /// Operation Id - /// managedMaintenanceWindowStatus_Get + /// ManagedClusters_ListFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetManagedMaintenanceWindowStatuAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) { - using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "ServiceFabricManagedClusterResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recent fault simulations for the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "ServiceFabricManagedClusterResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); scope.Start(); try { - var response = await _managedMaintenanceWindowStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _serviceFabricManagedClusterManagedClustersRestClient.StartFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedClusterManagedClustersRestClient.StartFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedClusterManagedClustersRestClient.StopFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedClusterManagedClustersRestClient.StopFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// + /// + /// Operation Id + /// ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetManagedAzResiliencyStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + scope.Start(); + try + { + var response = await _managedAzResiliencyStatusRestClient.GetManagedAzResiliencyStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -660,30 +921,30 @@ public virtual async Task> GetManagedMa } /// - /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus /// /// /// Operation Id - /// managedMaintenanceWindowStatus_Get + /// ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The cancellation token to use. - public virtual Response GetManagedMaintenanceWindowStatu(CancellationToken cancellationToken = default) + public virtual Response GetManagedAzResiliencyStatus(CancellationToken cancellationToken = default) { - using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); scope.Start(); try { - var response = _managedMaintenanceWindowStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _managedAzResiliencyStatusRestClient.GetManagedAzResiliencyStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -702,11 +963,11 @@ public virtual Response GetManagedMaintenanceWin /// /// /// Operation Id - /// managedApplyMaintenanceWindow_Post + /// ManagedApplyMaintenanceWindow_Post /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -736,11 +997,11 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance /// /// /// Operation Id - /// managedApplyMaintenanceWindow_Post + /// ManagedApplyMaintenanceWindow_Post /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -761,6 +1022,74 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc } } + /// + /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// + /// + /// Operation Id + /// ManagedMaintenanceWindowStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetManagedMaintenanceWindowStatuAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + scope.Start(); + try + { + var response = await _managedMaintenanceWindowStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// + /// + /// Operation Id + /// ManagedMaintenanceWindowStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetManagedMaintenanceWindowStatu(CancellationToken cancellationToken = default) + { + using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + scope.Start(); + try + { + var response = _managedMaintenanceWindowStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -770,11 +1099,11 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -832,11 +1161,11 @@ public virtual async Task> AddTagA /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -894,11 +1223,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -951,11 +1280,11 @@ public virtual async Task> SetTags /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1008,11 +1337,11 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1068,11 +1397,11 @@ public virtual async Task> RemoveT /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs index 0b72e38e5e2e..9c1d9a9d939b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// NodeTypes_CreateOrUpdate + /// NodeType_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> Cr /// /// /// Operation Id - /// NodeTypes_CreateOrUpdate + /// NodeType_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string nodeTyp /// /// /// Operation Id - /// NodeTypes_ListByManagedClusters + /// NodeType_ListByManagedClusters /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Operation Id - /// NodeTypes_ListByManagedClusters + /// NodeType_ListByManagedClusters /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string nodeTypeName, Cance /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string nodeTypeName, CancellationToken canc /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs index b12c57517740..83f136723729 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs @@ -37,11 +37,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -53,6 +48,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndObject(); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) @@ -292,6 +292,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("securityType"u8); writer.WriteStringValue(SecurityType.Value.ToString()); } + if (Optional.IsDefined(SecurityEncryptionType)) + { + writer.WritePropertyName("securityEncryptionType"u8); + writer.WriteStringValue(SecurityEncryptionType.Value.ToString()); + } if (Optional.IsDefined(IsSecureBootEnabled)) { writer.WritePropertyName("secureBootEnabled"u8); @@ -367,6 +372,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(ZoneBalance)) + { + writer.WritePropertyName("zoneBalance"u8); + writer.WriteBooleanValue(ZoneBalance.Value); + } writer.WriteEndObject(); } @@ -390,8 +400,8 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged { return null; } - NodeTypeSku sku = default; IDictionary tags = default; + NodeTypeSku sku = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -434,6 +444,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged ResourceIdentifier subnetId = default; IList vmSetupActions = default; ServiceFabricManagedClusterSecurityType? securityType = default; + SecurityEncryptionType? securityEncryptionType = default; bool? secureBootEnabled = default; bool? enableNodePublicIP = default; bool? enableNodePublicIPv6 = default; @@ -446,19 +457,11 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged IList additionalNetworkInterfaceConfigurations = default; string computerNamePrefix = default; IList vmApplications = default; + bool? zoneBalance = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sku"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sku = NodeTypeSku.DeserializeNodeTypeSku(property.Value, options); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -473,6 +476,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged tags = dictionary; continue; } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = NodeTypeSku.DeserializeNodeTypeSku(property.Value, options); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -822,7 +834,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("vmImageResourceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -831,7 +843,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("subnetId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -861,6 +873,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged securityType = new ServiceFabricManagedClusterSecurityType(property0.Value.GetString()); continue; } + if (property0.NameEquals("securityEncryptionType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityEncryptionType = new SecurityEncryptionType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("secureBootEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -890,7 +911,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("vmSharedGalleryImageId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -899,7 +920,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("natGatewayId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -931,7 +952,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("serviceArtifactReferenceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -940,7 +961,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("dscpConfigurationId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -980,6 +1001,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged vmApplications = array; continue; } + if (property0.NameEquals("zoneBalance"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneBalance = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -994,7 +1024,6 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged name, type, systemData, - sku, isPrimary, vmInstanceCount, dataDiskSizeGB, @@ -1033,6 +1062,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged subnetId, vmSetupActions ?? new ChangeTrackingList(), securityType, + securityEncryptionType, secureBootEnabled, enableNodePublicIP, enableNodePublicIPv6, @@ -1045,7 +1075,9 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged additionalNetworkInterfaceConfigurations ?? new ChangeTrackingList(), computerNamePrefix, vmApplications ?? new ChangeTrackingList(), + zoneBalance, tags ?? new ChangeTrackingDictionary(), + sku, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs index dc5a7d9c304d..ae17732c6f80 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs @@ -74,9 +74,8 @@ public ServiceFabricManagedNodeTypeData() /// The name. /// The resourceType. /// The systemData. - /// The node type sku. /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. /// Disk size for the managed disk attached to the vms on the node type in GBs. /// Managed data disk type. Specifies the storage account type for the managed disk. /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. @@ -112,8 +111,9 @@ public ServiceFabricManagedNodeTypeData() /// Indicates the resource id of the vm image. This parameter is used for custom vm image. /// Indicates the resource id of the subnet for the node type. /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. @@ -125,11 +125,12 @@ public ServiceFabricManagedNodeTypeData() /// Specifies the settings for any additional secondary network interfaces to attach to the node type. /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. /// Specifies the gallery applications that should be made available to the underlying VMSS. - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Resource tags. + /// The node type sku. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, SecurityEncryptionType? securityEncryptionType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, bool? zoneBalance, IDictionary tags, NodeTypeSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - Sku = sku; IsPrimary = isPrimary; VmInstanceCount = vmInstanceCount; DataDiskSizeInGB = dataDiskSizeInGB; @@ -168,6 +169,7 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re SubnetId = subnetId; VmSetupActions = vmSetupActions; SecurityType = securityType; + SecurityEncryptionType = securityEncryptionType; IsSecureBootEnabled = isSecureBootEnabled; IsNodePublicIPEnabled = isNodePublicIPEnabled; IsNodePublicIPv6Enabled = isNodePublicIPv6Enabled; @@ -180,15 +182,15 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re AdditionalNetworkInterfaceConfigurations = additionalNetworkInterfaceConfigurations; ComputerNamePrefix = computerNamePrefix; VmApplications = vmApplications; + ZoneBalance = zoneBalance; Tags = tags; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The node type sku. - public NodeTypeSku Sku { get; set; } /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. public bool? IsPrimary { get; set; } - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. public int? VmInstanceCount { get; set; } /// Disk size for the managed disk attached to the vms on the node type in GBs. public int? DataDiskSizeInGB { get; set; } @@ -271,9 +273,11 @@ public IList UserAssignedIdentities public ResourceIdentifier SubnetId { get; set; } /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. public IList VmSetupActions { get; } - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. public ServiceFabricManagedClusterSecurityType? SecurityType { get; set; } - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + public SecurityEncryptionType? SecurityEncryptionType { get; set; } + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. public bool? IsSecureBootEnabled { get; set; } /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. public bool? IsNodePublicIPEnabled { get; set; } @@ -297,7 +301,11 @@ public IList UserAssignedIdentities public string ComputerNamePrefix { get; set; } /// Specifies the gallery applications that should be made available to the underlying VMSS. public IList VmApplications { get; } - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + public bool? ZoneBalance { get; set; } + /// Resource tags. public IDictionary Tags { get; } + /// The node type sku. + public NodeTypeSku Sku { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs index 0a16fe386ec3..1a4bf5aa18f0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs @@ -104,11 +104,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -144,11 +144,11 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -184,11 +184,11 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id - /// NodeTypes_Delete + /// NodeType_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -226,11 +226,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// NodeTypes_Delete + /// NodeType_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -268,11 +268,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// NodeTypes_Update + /// NodeType_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -314,11 +314,11 @@ public virtual async Task> Up /// /// /// Operation Id - /// NodeTypes_Update + /// NodeType_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -352,19 +352,19 @@ public virtual ArmOperation Update(WaitUnt } /// - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate /// /// /// Operation Id - /// NodeTypes_Restart + /// NodeTypes_Deallocate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -373,19 +373,19 @@ public virtual ArmOperation Update(WaitUnt /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// parameters for restart action. + /// parameters for deallocate action. /// The cancellation token to use. /// is null. - public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual async Task DeallocateAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Deallocate"); scope.Start(); try { - var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeallocateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -398,19 +398,19 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy } /// - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate /// /// /// Operation Id - /// NodeTypes_Restart + /// NodeTypes_Deallocate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -419,19 +419,203 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// parameters for restart action. + /// parameters for deallocate action. /// The cancellation token to use. /// is null. - public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Deallocate(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Deallocate"); scope.Start(); try { - var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Deallocate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// + /// + /// Operation Id + /// NodeTypes_DeleteNode + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters for delete action. + /// The cancellation token to use. + /// is null. + public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// + /// + /// Operation Id + /// NodeTypes_DeleteNode + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters for delete action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy + /// + /// + /// Operation Id + /// NodeTypes_Redeploy + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters for redeploy action. + /// The cancellation token to use. + /// is null. + public virtual async Task RedeployAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Redeploy"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RedeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy + /// + /// + /// Operation Id + /// NodeTypes_Redeploy + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters for redeploy action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Redeploy(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Redeploy"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Redeploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -456,7 +640,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -502,7 +686,7 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, NodeTy /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -536,19 +720,19 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent c } /// - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart /// /// /// Operation Id - /// NodeTypes_DeleteNode + /// NodeTypes_Restart /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -557,19 +741,19 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// parameters for delete action. + /// parameters for restart action. /// The cancellation token to use. /// is null. - public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); scope.Start(); try { - var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -582,19 +766,19 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod } /// - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart /// /// /// Operation Id - /// NodeTypes_DeleteNode + /// NodeTypes_Restart /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -603,19 +787,19 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// parameters for delete action. + /// parameters for restart action. /// The cancellation token to use. /// is null. - public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); scope.Start(); try { - var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -627,6 +811,426 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten } } + /// + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start + /// + /// + /// Operation Id + /// NodeTypes_Start + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters for start action. + /// The cancellation token to use. + /// is null. + public virtual async Task StartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Start"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start + /// + /// + /// Operation Id + /// NodeTypes_Start + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters for start action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Start(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Start"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StartFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.StartFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StopFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.StopFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_GetFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.GetFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_GetFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.GetFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + /// /// Get a Service Fabric node type supported SKUs. /// @@ -636,11 +1240,11 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// /// /// Operation Id - /// NodeTypeSkus_List + /// NodeTypeSkus_GetAvailableSkus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -648,8 +1252,8 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAvailableSkusAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateGetAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateGetAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NodeTypeAvailableSku.DeserializeNodeTypeAvailableSku(e), _nodeTypeSkusClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetAvailableSkus", "value", "nextLink", cancellationToken); } @@ -662,11 +1266,11 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// /// /// Operation Id - /// NodeTypeSkus_List + /// NodeTypeSkus_GetAvailableSkus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -674,8 +1278,8 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAvailableSkus(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateGetAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateGetAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NodeTypeAvailableSku.DeserializeNodeTypeAvailableSku(e), _nodeTypeSkusClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetAvailableSkus", "value", "nextLink", cancellationToken); } @@ -688,11 +1292,11 @@ public virtual Pageable GetAvailableSkus(CancellationToken /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -750,11 +1354,11 @@ public virtual async Task> AddTag /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -812,11 +1416,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -869,11 +1473,11 @@ public virtual async Task> SetTag /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -926,11 +1530,11 @@ public virtual Response SetTags(IDictionar /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -986,11 +1590,11 @@ public virtual async Task> Remove /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs index 63ca0b196ff8..a79bd7357d9d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_CreateOrUpdate + /// ServiceResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task> Cre /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_CreateOrUpdate + /// ServiceResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task> GetAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(string serviceN /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services /// /// /// Operation Id - /// Services_ListByApplications + /// ServiceResource_ListByApplications /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services /// /// /// Operation Id - /// Services_ListByApplications + /// ServiceResource_ListByApplications /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetAll(Cancellation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs index 710becbf7667..09c689cb7921 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs @@ -32,7 +32,7 @@ public partial class ServiceFabricManagedServiceResource : ArmResource /// The serviceName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, string serviceName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}"; return new ResourceIdentifier(resourceId); } @@ -41,7 +41,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedServiceData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applications/services"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applications/services"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedServiceResource() @@ -96,15 +96,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -136,15 +136,15 @@ public virtual async Task> GetAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -176,15 +176,15 @@ public virtual Response Get(CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Delete + /// ServiceResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,15 +218,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Delete + /// ServiceResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -260,15 +260,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Update + /// ServiceResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -302,15 +302,15 @@ public virtual async Task> UpdateA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Update + /// ServiceResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -344,15 +344,15 @@ public virtual Response Update(ServiceFabri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -406,15 +406,15 @@ public virtual async Task> AddTagA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -468,15 +468,15 @@ public virtual Response AddTag(string key, /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -525,15 +525,15 @@ public virtual async Task> SetTags /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -582,15 +582,15 @@ public virtual Response SetTags(IDictionary /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -642,15 +642,15 @@ public virtual async Task> RemoveT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md deleted file mode 100644 index 9cb67e35a1d0..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ /dev/null @@ -1,232 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: ServiceFabricManagedClusters -namespace: Azure.ResourceManager.ServiceFabricManagedClusters -require: https://github.com/Azure/azure-rest-api-specs/blob/f17b769690a46d858134ee68ef0d89635083b560/specification/servicefabricmanagedclusters/resource-manager/readme.md -#tag: package-2024-09-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../tests/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -request-path-is-non-resource: -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -models-to-treat-empty-string-as-null: - - ManagedClusterSubnet - - NodeTypeFrontendConfiguration - - ServiceFabricManagedClusterData - - ServiceFabricManagedClusterVersion - - ServiceFabricManagedNodeTypeData - - VmManagedIdentity - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - LRS: Lrs - SSD: Ssd - -override-operation-name: - managedAzResiliencyStatus_get: GetManagedAzResiliencyStatus - NodeTypeSkus_List: GetAvailableSkus - managedUnsupportedVMSizes_Get: GetManagedUnsupportedVmSize - managedUnsupportedVMSizes_List: GetManagedUnsupportedVmSizes - ManagedClusterVersion_GetByEnvironment: GetManagedClusterVersionByEnvironment - managedAzResiliencyStatus_Get: GetManagedAzResiliencyStatus - -rename-mapping: - ApplicationResource: ServiceFabricManagedApplication - ApplicationTypeResource: ServiceFabricManagedApplicationType - ApplicationTypeVersionResource: ServiceFabricManagedApplicationTypeVersion - ApplicationUserAssignedIdentity: ApplicationUserAssignedIdentityInfo - ManagedClusterCodeVersionResult: ServiceFabricManagedClusterVersion - ManagedClusterCodeVersionResult.properties.supportExpiryUtc: VersionSupportExpireOn - OsType: ServiceFabricManagedClusterOSType - ManagedCluster: ServiceFabricManagedCluster - ManagedCluster.properties.addonFeatures: AddOnFeatures - ManagedCluster.properties.allowRdpAccess: IsRdpAccessAllowed - ManagedCluster.properties.clusterCertificateThumbprints: -|any - ManagedCluster.properties.clusterId: -|uuid - ManagedCluster.properties.enableAutoOSUpgrade: IsAutoOSUpgradeEnabled - ManagedCluster.properties.enableIpv6: IsIPv6Enabled - ManagedCluster.properties.enableServicePublicIP: IsServicePublicIPEnabled - ManagedCluster.properties.ipv4Address: -|ip-address - ManagedCluster.properties.ipv6Address: -|ip-address - ManagedCluster.properties.zonalResiliency: HasZoneResiliency - ManagedCluster.properties.enableHttpGatewayExclusiveAuthMode: IsHttpGatewayExclusiveAuthModeEnabled - - Subnet: ManagedClusterSubnet - Subnet.enableIpv6: IsIPv6Enabled - Subnet.networkSecurityGroupId: -|arm-id - AzureActiveDirectory: ManagedClusterAzureActiveDirectory - ClientCertificate: ManagedClusterClientCertificate - ClientCertificate.thumbprint: -|any - ClientCertificate.issuerThumbprint: -|any - ClusterState: ServiceFabricManagedClusterState - ClusterUpgradeCadence: ManagedClusterUpgradeCadence - ClusterUpgradeMode: ManagedClusterUpgradeMode - SettingsSectionDescription: ClusterFabricSettingsSection - SettingsParameterDescription: ClusterFabricSettingsParameterDescription - IpTag: ManagedClusterIPTag - LoadBalancingRule: ManagedClusterLoadBalancingRule - NetworkSecurityRule: ServiceFabricManagedNetworkSecurityRule - Direction: ServiceFabricManagedNetworkSecurityRuleDirection - Access: ServiceFabricManagedNetworkTrafficAccess - ManagedResourceProvisioningState: ServiceFabricManagedResourceProvisioningState - ServiceEndpoint: ManagedClusterServiceEndpoint - ServiceEndpoint.locations: -|azure-location - NodeType: ServiceFabricManagedNodeType - NodeType.properties.dataDiskSizeGB: DataDiskSizeInGB - NodeType.properties.enableAcceleratedNetworking: IsAcceleratedNetworkingEnabled - NodeType.properties.enableEncryptionAtHost: IsEncryptionAtHostEnabled - NodeType.properties.enableOverProvisioning: IsOverProvisioningEnabled - NodeType.properties.multiplePlacementGroups: HasMultiplePlacementGroups - NodeType.properties.enableNodePublicIPv6: IsNodePublicIPv6Enabled - VmApplication : ServiceFabricManagedVmApplication - VmssDataDisk: NodeTypeVmssDataDisk - VmssDataDisk.diskSizeGB: DiskSizeInGB - VmssExtension: NodeTypeVmssExtension - VmssExtension.properties.enableAutomaticUpgrade: IsAutomaticUpgradeEnabled - VaultSecretGroup: NodeTypeVaultSecretGroup - VaultCertificate: NodeTypeVaultCertificate - DiskType: ServiceFabricManagedDataDiskType - FrontendConfiguration: NodeTypeFrontendConfiguration - FrontendConfiguration.loadBalancerBackendAddressPoolId: -|arm-id - FrontendConfiguration.loadBalancerInboundNatPoolId: -|arm-id - VmManagedIdentity.userAssignedIdentities: -|arm-id - NodeTypeActionParameters: NodeTypeActionContent - NodeTypeActionParameters.force: IsForced - ServiceResource: ServiceFabricManagedService - ServiceResourceProperties: ManagedServiceProperties - ServiceResourcePropertiesBase: ManagedServiceBaseProperties - ServiceCorrelation: ManagedServiceCorrelation - ServiceCorrelationScheme: ManagedServiceCorrelationScheme - ScalingPolicy: ManagedServiceScalingPolicy - ScalingMechanism: ManagedServiceScalingMechanism - ScalingTrigger: ManagedServiceScalingTrigger - MoveCost: ServiceFabricManagedServiceMoveCost - ApplicationUpgradePolicy.instanceCloseDelayDuration: InstanceCloseDelayDurationInSeconds - FailureAction: PolicyViolationCompensationAction - IPAddressType: NodeTypeFrontendConfigurationIPAddressType - ProbeProtocol: ManagedClusterLoadBalanceProbeProtocol - Protocol: ManagedClusterLoadBalancingRuleTransportProtocol - Partition: ManagedServicePartitionScheme - NsgProtocol: ServiceFabricManagedNsgProtocol - NsgProtocol.ah: AH - NodeTypeAvailableSku.resourceType: -|resource-type - PartitionInstanceCountScaleMechanism: PartitionInstanceCountScalingMechanism - PrivateEndpointNetworkPolicies: ManagedClusterSubnetPrivateEndpointNetworkPoliciesState - PrivateLinkServiceNetworkPolicies: ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState - ServiceLoadMetric: ManagedServiceLoadMetric - ServiceLoadMetricWeight: ManagedServiceLoadMetricWeight - ServicePackageActivationMode: ManagedServicePackageActivationMode - ServicePlacementPolicy: ManagedServicePlacementPolicy - ManagedVMSize: ServiceFabricManagedUnsupportedVmSize - AddRemoveIncrementalNamedPartitionScalingMechanism: NamedPartitionAddOrRemoveScalingMechanism - NodeType.properties.enableNodePublicIP: IsNodePublicIPEnabled - NodeType.properties.secureBootEnabled: IsSecureBootEnabled - EvictionPolicyType: SpotNodeVmEvictionPolicyType - ResourceAzStatus.resourceType: -|resource-type - SecurityType: ServiceFabricManagedClusterSecurityType - UpdateType: ServiceFabricManagedClusterUpdateType - ClusterHealthPolicy: ManagedClusterHealthPolicy - ClusterUpgradePolicy: ManagedClusterUpgradePolicy - ClusterUpgradeDeltaHealthPolicy: ManagedClusterUpgradeDeltaHealthPolicy - ClusterMonitoringPolicy: ManagedClusterMonitoringPolicy - PrivateIPAddressVersion: ServiceFabricManagedClusterPrivateIPAddressVersion - PublicIPAddressVersion: ServiceFabricManagedClusterPublicIPAddressVersion - IpConfiguration: ServiceFabricManagedClusterIPConfiguration - IpConfigurationPublicIPAddressConfiguration: ServiceFabricManagedClusterPublicIPAddressConfiguration - ManagedMaintenanceWindowStatus.lastWindowStatusUpdateAtUTC: LastWindowStatusUpdatedOn - ManagedMaintenanceWindowStatus.lastWindowStartTimeUTC: LastWindowStartOn - ManagedMaintenanceWindowStatus.lastWindowEndTimeUTC: LastWindowEndOn - -suppress-abstract-base-class: -- ManagedServiceProperties - -directive: - - remove-operation: OperationStatus_Get - - remove-operation: OperationResults_Get - - from: managedapplication.json - where: $.definitions - transform: > - $.HealthCheckWaitDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckStableDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckRetryTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeDomainTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeTimeout['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.replicaRestartWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.quorumLossWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.standByReplicaKeepDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.servicePlacementTimeLimit['x-ms-format'] = 'duration-constant'; - - from: managedcluster.json - where: $.definitions - transform: > - $.ManagedClusterVersionDetails.properties.supportExpiryUtc['format'] = 'date-time'; - - from: nodetype.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'].patch - transform: > - $['responses'] = { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "202": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "default": { - "description": "The detailed error response.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - reason: response status 202 missing -``` diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs index 647606c22fda..8c9cc765a261 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ManagedClusterTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; @@ -24,7 +25,6 @@ public ManagedClusterTests(bool isAsync) : base(isAsync) [Test] [RecordedTest] - [Ignore("Nee re-record")] public async Task BasicClusterTestAsync() { resourceGroupResource = await CreateResourceGroupWithTag(); @@ -48,5 +48,103 @@ public async Task BasicClusterTestAsync() ServiceFabricManagedClusterData resourceData = serviceFabricManagedCluster.Data; Assert.AreEqual(clusterName, resourceData.Name); } + + [Test] + [RecordedTest] + public async Task ListClusterTestAsync() + { + resourceGroupResource = await CreateResourceGroupWithTag(); + + clusterName = Recording.GenerateAssetName("sfmctestclusternet"); + clusterCollection = resourceGroupResource.GetServiceFabricManagedClusters(); + + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("westus")) + { + DnsName = clusterName, + AdminUserName = "Myusername4", + AdminPassword = "Sfmcpass5!", + Sku = new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Standard), + ClientConnectionPort = 19000, + HttpGatewayConnectionPort = 19080 + }; + data.Tags.Add(new KeyValuePair("SFRP.EnableDiagnosticMI", "true")); + + serviceFabricManagedCluster = (await clusterCollection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data)).Value; + + ServiceFabricManagedClusterData resourceData = serviceFabricManagedCluster.Data; + Assert.AreEqual(clusterName, resourceData.Name); + + var clustersList = clusterCollection.GetAllAsync(); + var clusterCount = 0; + await foreach (ServiceFabricManagedClusterResource cluster in clustersList) + { + clusterCount++; + } + + Assert.AreEqual(clusterCount, 1); + } + + [Test] + [RecordedTest] + public async Task ClusterFaultSimulation() + { + // CreateOrUpdate + resourceGroupResource = await CreateResourceGroupWithTag(); + + serviceFabricManagedCluster = await CreateServiceFabricManagedClusterZoneResilient(resourceGroupResource, Recording.GenerateAssetName("sfmctest")); + + string primaryNodeTypeName = Recording.GenerateAssetName("node"); + var primaryNodeType = await CreateServiceFabricManagedNodeType(serviceFabricManagedCluster, primaryNodeTypeName, true); + + // Start Fault Simulation + FaultSimulationContent content = new ZoneFaultSimulationContent + { + Zones = { "2" }, + FaultKind = "Zone", + }; + + FaultSimulationContentWrapper faultSimulationContentWrapper = new FaultSimulationContentWrapper(content); + + try + { + var startFaultSimulationResult = (await serviceFabricManagedCluster.StartFaultSimulationAsync(WaitUntil.Completed, faultSimulationContentWrapper)).Value; + + Assert.AreEqual(startFaultSimulationResult.Status, FaultSimulationStatus.Active); + + // List Fault Simulation + var faultSimulationCount = 0; + var mostRecentSimulationId = ""; + + var listFaultSimulationResult = serviceFabricManagedCluster.GetFaultSimulationAsync(); + await foreach (FaultSimulation simulation in listFaultSimulationResult) + { + faultSimulationCount++; + mostRecentSimulationId = simulation.SimulationId; + } + + Assert.AreEqual(faultSimulationCount, 1); + Assert.AreEqual(startFaultSimulationResult.SimulationId, mostRecentSimulationId); + + // Get Fault Simulation + FaultSimulationIdContent faultSimulationIdContent = new FaultSimulationIdContent(startFaultSimulationResult.SimulationId); + var getFaultSimulationResult = (await serviceFabricManagedCluster.GetFaultSimulationAsync(faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, getFaultSimulationResult.SimulationId); + Assert.AreEqual(startFaultSimulationResult.Details.ClusterId, getFaultSimulationResult.Details.ClusterId); + Assert.AreEqual(startFaultSimulationResult.StartOn, getFaultSimulationResult.StartOn); + Assert.AreEqual(startFaultSimulationResult.EndOn, getFaultSimulationResult.EndOn); + + // Stop Fault Simulation + var stopFaultSimulationResult = (await serviceFabricManagedCluster.StopFaultSimulationAsync(WaitUntil.Completed, faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, stopFaultSimulationResult.SimulationId); + Assert.AreEqual(stopFaultSimulationResult.Status, FaultSimulationStatus.Done); + } + catch (Exception ex) + { + Console.WriteLine(content); + Console.WriteLine(ex); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs index 4e0aa8fffb81..e2c2f7305316 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedApplicationTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -58,7 +58,6 @@ private async Task CreateServiceFabricM [RecordedTest] [PlaybackOnly("Need manually upload a .sfpkg file to StorageAccount")] - [Ignore("Nee re-record")] public async Task CreateOrUpdateExistGetGetAllDelete() { // CreateOrUpdate @@ -84,9 +83,9 @@ public async Task CreateOrUpdateExistGetGetAllDelete() Assert.IsFalse(flag); } + [RecordedTest] [TestCase(false)] - [PlaybackOnly("Need manually upload a .sfpkg file to StorageAccount")] - [Ignore("Nee re-record")] + [PlaybackOnlyAttribute("Need manually upload a .sfpkg file to StorageAccount")] //[TestCase(null)] // The HTTP method 'GET' is not supported at scope 'Microsoft.ServiceFabric/managedclusters/sfmctest1063/applications/application5675'. //[TestCase(true)] // The HTTP method 'GET' is not supported at scope 'Microsoft.ServiceFabric/managedclusters/sfmctest1063/applications/application5675'. public async Task AddRemoveTag(bool? useTagResource) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs index 4c3992ea5085..ccc60ce0f2c5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -7,13 +7,16 @@ using System.Text; using System.Threading.Tasks; using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; +using NUnit.Framework.Constraints; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Tests { internal class ServiceFabricManagedNodeTypeTests : ServiceFabricManagedClustersManagementTestBase { + private ResourceGroupResource _resourceGroup; private ServiceFabricManagedClusterResource _cluster; private ServiceFabricManagedNodeTypeCollection _nodeTypeCollection; public ServiceFabricManagedNodeTypeTests(bool isAsync) : base(isAsync) @@ -23,15 +26,16 @@ public ServiceFabricManagedNodeTypeTests(bool isAsync) : base(isAsync) [SetUp] public async Task TestSetUp() { - var resourceGroup = await CreateResourceGroup(); - _cluster = await CreateServiceFabricManagedCluster(resourceGroup, Recording.GenerateAssetName("sfmctest")); - _nodeTypeCollection = _cluster.GetServiceFabricManagedNodeTypes(); + _resourceGroup = await CreateResourceGroup(); } [RecordedTest] public async Task CreateOrUpdateDelete() { // CreateOrUpdate + _cluster = await CreateServiceFabricManagedCluster(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + _nodeTypeCollection = _cluster.GetServiceFabricManagedNodeTypes(); + string primaryNodeTypeName = Recording.GenerateAssetName("node"); string secondaryNodeTypeName = Recording.GenerateAssetName("node"); var primaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, primaryNodeTypeName, true); @@ -47,6 +51,9 @@ public async Task CreateOrUpdateDelete() [RecordedTest] public async Task ExistGetGetAll() { + _cluster = await CreateServiceFabricManagedCluster(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + _nodeTypeCollection = _cluster.GetServiceFabricManagedNodeTypes(); + string nodeTypeName = Recording.GenerateAssetName("node"); var nodeType = await CreateServiceFabricManagedNodeType(_cluster, nodeTypeName, true); @@ -64,6 +71,100 @@ public async Task ExistGetGetAll() ValidatePurviewAccount(list.FirstOrDefault().Data, nodeTypeName); } + [RecordedTest] + public async Task NodeTypesActions() + { + // CreateOrUpdate + _cluster = await CreateServiceFabricManagedCluster(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + + string primaryNodeTypeName = Recording.GenerateAssetName("node"); + string secondaryNodeTypeName = Recording.GenerateAssetName("node"); + var primaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, primaryNodeTypeName, true); + var secondaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, secondaryNodeTypeName, false); + ValidatePurviewAccount(primaryNodeType.Data, primaryNodeTypeName); + ValidatePurviewAccount(secondaryNodeType.Data, secondaryNodeTypeName); + + // Actions + NodeTypeActionContent content = new NodeTypeActionContent + { + Nodes = { String.Format("{0}_1", secondaryNodeTypeName), String.Format("{0}_3", secondaryNodeTypeName) }, + }; + + // Deallocate + await secondaryNodeType.DeallocateAsync(WaitUntil.Completed, content); + + // Start/Allocate + await secondaryNodeType.StartAsync(WaitUntil.Completed, content); + + content.UpdateType = ServiceFabricManagedClusterUpdateType.ByUpgradeDomain; + // Redeploy + await secondaryNodeType.RedeployAsync(WaitUntil.Completed, content); + } + + [RecordedTest] + public async Task NodeTypeFaultSimulationTest() + { + // CreateOrUpdate + _cluster = await CreateServiceFabricManagedClusterZoneResilient(_resourceGroup, Recording.GenerateAssetName("sfmctest")); + + string primaryNodeTypeName = Recording.GenerateAssetName("node"); + string secondaryNodeTypeName = Recording.GenerateAssetName("node"); + var primaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, primaryNodeTypeName, true); + var secondaryNodeType = await CreateServiceFabricManagedNodeType(_cluster, secondaryNodeTypeName, false); + ValidatePurviewAccount(primaryNodeType.Data, primaryNodeTypeName); + ValidatePurviewAccount(secondaryNodeType.Data, secondaryNodeTypeName); + + // Start Fault Simulation + FaultSimulationContent content = new ZoneFaultSimulationContent + { + Zones = { "2" }, + FaultKind = "Zone", + }; + + FaultSimulationContentWrapper faultSimulationContentWrapper = new FaultSimulationContentWrapper(content); + + try + { + var startFaultSimulationResult = (await secondaryNodeType.StartFaultSimulationAsync(WaitUntil.Completed, faultSimulationContentWrapper)).Value; + + Assert.AreEqual(startFaultSimulationResult.Status, FaultSimulationStatus.Active); + + // List Fault Simulation + var faultSimulationCount = 0; + var mostRecentSimulationId = ""; + + var listFaultSimulationResult = secondaryNodeType.GetFaultSimulationAsync(); + await foreach (FaultSimulation simulation in listFaultSimulationResult) + { + faultSimulationCount++; + mostRecentSimulationId = simulation.SimulationId; + } + + Assert.AreEqual(faultSimulationCount, 1); + Assert.AreEqual(startFaultSimulationResult.SimulationId, mostRecentSimulationId); + + // Get Fault Simulation + FaultSimulationIdContent faultSimulationIdContent = new FaultSimulationIdContent(startFaultSimulationResult.SimulationId); + var getFaultSimulationResult = (await secondaryNodeType.GetFaultSimulationAsync(faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, getFaultSimulationResult.SimulationId); + Assert.AreEqual(startFaultSimulationResult.Details.ClusterId, getFaultSimulationResult.Details.ClusterId); + Assert.AreEqual(startFaultSimulationResult.StartOn, getFaultSimulationResult.StartOn); + Assert.AreEqual(startFaultSimulationResult.EndOn, getFaultSimulationResult.EndOn); + + // Stop Fault Simulation + var stopFaultSimulationResult = (await secondaryNodeType.StopFaultSimulationAsync(WaitUntil.Completed, faultSimulationIdContent)).Value; + + Assert.AreEqual(startFaultSimulationResult.SimulationId, stopFaultSimulationResult.SimulationId); + Assert.AreEqual(stopFaultSimulationResult.Status, FaultSimulationStatus.Done); + } + catch (Exception ex) + { + Console.WriteLine(content); + Console.WriteLine(ex); + } + } + private void ValidatePurviewAccount(ServiceFabricManagedNodeTypeData nodeType, string nodeTypeName) { Assert.IsNotNull(nodeType); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagerNodeTypeUpdateTest.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeUpdateTests.cs similarity index 69% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagerNodeTypeUpdateTest.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeUpdateTests.cs index 1114505ca74d..1f98edf2ee8f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagerNodeTypeUpdateTest.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Scenario/ServiceFabricManagedNodeTypeUpdateTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -14,14 +14,14 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Tests { - internal class ServiceFabricManagerNodeTypeUpdateTest : ServiceFabricManagedClustersManagementTestBase + internal class ServiceFabricManagedNodeTypeUpdateTests : ServiceFabricManagedClustersManagementTestBase { public ServiceFabricManagedClusterCollection clusterCollection { get; set; } public string clusterName; private ResourceGroupResource resourceGroupResource; public ServiceFabricManagedClusterResource serviceFabricManagedCluster; private ServiceFabricManagedNodeTypeResource serviveFabricManagedClusterNodeType; - public ServiceFabricManagerNodeTypeUpdateTest(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) + public ServiceFabricManagedNodeTypeUpdateTests(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) { } @@ -66,12 +66,11 @@ public async Task TestSetUp() this.serviveFabricManagedClusterNodeType = (await nodeTypeCollection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, nodeTypeData)).Value; } - [Test] - [Ignore("Nee re-record")] - public async Task UpdateTest() + [RecordedTest] + public async Task UpdateTagsTest() { //Update - var updateNodetype_lro = await this.serviveFabricManagedClusterNodeType.UpdateAsync(new ServiceFabricManagedNodeTypePatch() + var updateNodetype_lro = await this.serviveFabricManagedClusterNodeType.UpdateAsync(WaitUntil.Completed, new ServiceFabricManagedNodeTypePatch() { Tags = { @@ -79,7 +78,26 @@ public async Task UpdateTest() ["UpdateKey2"] = "UpdateValue2", } }); - var updateNodetype = updateNodetype_lro.Value; + + ServiceFabricManagedNodeTypeResource updateNodetype = updateNodetype_lro.Value; + var nodeTypeTagsDataValues = updateNodetype.Data.Tags; + Assert.AreEqual(nodeTypeTagsDataValues["UpdateKey1"], "UpdateValue1"); + Assert.AreEqual(nodeTypeTagsDataValues["UpdateKey2"], "UpdateValue2"); + } + + [RecordedTest] + public async Task UpdateCapacityTest() + { + var targetCount = 7; + + //Update + var updateNodetype_lro = await this.serviveFabricManagedClusterNodeType.UpdateAsync(WaitUntil.Completed, new ServiceFabricManagedNodeTypePatch() + { + Sku = new NodeTypeSku(targetCount) + }); + + ServiceFabricManagedNodeTypeResource updateNodetype = updateNodetype_lro.Value; + Assert.AreEqual(updateNodetype.Data.Sku.Capacity, targetCount); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs index d33eb2e67833..81efbeb81e59 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/ServiceFabricManagedClustersManagementTestBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -38,7 +38,7 @@ protected ServiceFabricManagedClustersManagementTestBase(bool isAsync) public async Task CreateCommonClient() { ArmClientOptions options = new ArmClientOptions(); - options.SetApiVersion(UserAssignedIdentityResource.ResourceType, "2018-11-30"); + options.SetApiVersion(UserAssignedIdentityResource.ResourceType, "2024-11-01-preview"); Client = GetArmClient(options); DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); @@ -95,6 +95,32 @@ protected async Task CreateServiceFabricMan return clusterLro.Value; } + protected async Task CreateServiceFabricManagedClusterZoneResilient(ResourceGroupResource resourceGroup, string clusterName) + { + string dnsName = Recording.GenerateAssetName("netsdk"); + var data = new ServiceFabricManagedClusterData(DefaultLocation) + { + Sku = new ServiceFabricManagedClustersSku("Standard"), + DnsName = dnsName, + ClientConnectionPort = 19000, + HttpGatewayConnectionPort = 19080, + ClusterUpgradeMode = ManagedClusterUpgradeMode.Automatic, + HasZoneResiliency = true, + AdminUserName = "vmadmin", + AdminPassword = "Password123!@#", + Clients = + { + new ManagedClusterClientCertificate(true) + { + Thumbprint = BinaryData.FromString("\"123BDACDCDFB2C7B250192C6078E47D1E1DB119B\""), + } + } + }; + data.Tags.Add(new KeyValuePair("SFRP.EnableDiagnosticMI", "true")); + var clusterLro = await resourceGroup.GetServiceFabricManagedClusters().CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); + return clusterLro.Value; + } + protected async Task CreateServiceFabricManagedNodeType(ServiceFabricManagedClusterResource cluster, string nodeTypeName, bool isPrimaryNode) { var data = new ServiceFabricManagedNodeTypeData() diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml new file mode 100644 index 000000000000..d0880eea2b48 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: f5f7f7c5a54d829c86014d9371f278e4b5b767ca +repo: Azure/azure-rest-api-specs +additionalDirectories: