From aba64051dd833e16ebafbc23d7187a30e8ae625f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 8 Oct 2024 01:38:46 +0000 Subject: [PATCH] CodeGen from PR 30897 in Azure/azure-rest-api-specs Merge 8064bcf9c031d12fb3f8edfc976a9d88b26eeb03 into 012021c786c360e0c34faf7af888c7fd7dbe2df5 --- ...re.ResourceManager.Quota.netstandard2.0.cs | 30 +++++---- .../Sample_GroupQuotaEntityResource.cs | 6 +- ...le_QuotaAllocationRequestStatusResource.cs | 8 +-- .../src/Generated/ArmQuotaModelFactory.cs | 15 ++++- .../MockableQuotaManagementGroupResource.cs | 56 +++++++--------- .../Generated/Extensions/QuotaExtensions.cs | 52 +++++++-------- .../src/Generated/GroupQuotaEntityResource.cs | 56 +++++++--------- .../GroupQuotaRequestBase.Serialization.cs | 35 ++++++++++ .../Generated/Models/GroupQuotaRequestBase.cs | 7 +- ...uotaAllocationRequestBase.Serialization.cs | 42 +++++++++++- .../Models/QuotaAllocationRequestBase.cs | 7 +- .../GroupQuotaLimitsRequestRestOperations.cs | 66 ++++++++----------- ...criptionAllocationRequestRestOperations.cs | 66 ++++++++----------- .../src/autorest.md | 2 +- 14 files changed, 249 insertions(+), 199 deletions(-) diff --git a/sdk/quota/Azure.ResourceManager.Quota/api/Azure.ResourceManager.Quota.netstandard2.0.cs b/sdk/quota/Azure.ResourceManager.Quota/api/Azure.ResourceManager.Quota.netstandard2.0.cs index 4fef80ae5301..e96c5a5c05d4 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/api/Azure.ResourceManager.Quota.netstandard2.0.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/api/Azure.ResourceManager.Quota.netstandard2.0.cs @@ -165,8 +165,8 @@ public partial class GroupQuotaEntityResource : Azure.ResourceManager.ArmResourc protected GroupQuotaEntityResource() { } public virtual Azure.ResourceManager.Quota.GroupQuotaEntityData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateGroupQuotaLimitsRequest(Azure.WaitUntil waitUntil, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateGroupQuotaLimitsRequestAsync(Azure.WaitUntil waitUntil, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateGroupQuotaLimitsRequest(Azure.WaitUntil waitUntil, string resourceProviderName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateGroupQuotaLimitsRequestAsync(Azure.WaitUntil waitUntil, string resourceProviderName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string managementGroupId, string groupQuotaName) { 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; } @@ -198,8 +198,8 @@ protected GroupQuotaEntityResource() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Quota.Models.GroupQuotaEntityPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Quota.Models.GroupQuotaEntityPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateGroupQuotaLimitsRequest(Azure.WaitUntil waitUntil, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateGroupQuotaLimitsRequestAsync(Azure.WaitUntil waitUntil, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateGroupQuotaLimitsRequest(Azure.WaitUntil waitUntil, string resourceProviderName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateGroupQuotaLimitsRequestAsync(Azure.WaitUntil waitUntil, string resourceProviderName, Azure.ResourceManager.Quota.GroupQuotaRequestStatusData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class GroupQuotaLimitCollection : Azure.ResourceManager.ArmCollection { @@ -404,8 +404,8 @@ protected QuotaAllocationRequestStatusResource() { } } public static partial class QuotaExtensions { - public static Azure.ResourceManager.ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetCurrentQuotaLimitBase(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetCurrentQuotaLimitBaseAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Quota.CurrentQuotaLimitBaseResource GetCurrentQuotaLimitBaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -439,8 +439,8 @@ public static partial class QuotaExtensions public static System.Threading.Tasks.Task> GetSubscriptionQuotaAllocationAsync(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, string subscriptionId, string groupQuotaName, string resourceName, string filter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Quota.SubscriptionQuotaAllocationResource GetSubscriptionQuotaAllocationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Quota.SubscriptionQuotaAllocationCollection GetSubscriptionQuotaAllocations(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, string subscriptionId, string groupQuotaName) { throw null; } - public static Azure.ResourceManager.ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class QuotaRequestDetailCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -555,8 +555,8 @@ protected MockableQuotaArmClient() { } public partial class MockableQuotaManagementGroupResource : Azure.ResourceManager.ArmResource { protected MockableQuotaManagementGroupResource() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Quota.GroupQuotaEntityCollection GetGroupQuotaEntities() { throw null; } public virtual Azure.Response GetGroupQuotaEntity(string groupQuotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetGroupQuotaEntityAsync(string groupQuotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -568,8 +568,8 @@ protected MockableQuotaManagementGroupResource() { } public virtual Azure.Response GetSubscriptionQuotaAllocation(string subscriptionId, string groupQuotaName, string resourceName, string filter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSubscriptionQuotaAllocationAsync(string subscriptionId, string groupQuotaName, string resourceName, string filter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Quota.SubscriptionQuotaAllocationCollection GetSubscriptionQuotaAllocations(string subscriptionId, string groupQuotaName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(Azure.WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableQuotaTenantResource : Azure.ResourceManager.ArmResource { @@ -591,7 +591,7 @@ public static partial class ArmQuotaModelFactory public static Azure.ResourceManager.Quota.GroupQuotaEntityData GroupQuotaEntityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.GroupQuotaEntityBase properties = null) { throw null; } public static Azure.ResourceManager.Quota.Models.GroupQuotaEntityPatch GroupQuotaEntityPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.GroupQuotasEntityBasePatch properties = null) { throw null; } public static Azure.ResourceManager.Quota.GroupQuotaLimitData GroupQuotaLimitData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.GroupQuotaDetails properties = null) { throw null; } - public static Azure.ResourceManager.Quota.Models.GroupQuotaRequestBase GroupQuotaRequestBase(long? limit = default(long?), string region = null, string comments = null, string value = null, string localizedValue = null) { throw null; } + public static Azure.ResourceManager.Quota.Models.GroupQuotaRequestBase GroupQuotaRequestBase(long? limit = default(long?), string region = null, string resourceName = null, string comments = null, string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.Quota.GroupQuotaRequestStatusData GroupQuotaRequestStatusData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.GroupQuotaRequestStatusProperties properties = null) { throw null; } public static Azure.ResourceManager.Quota.Models.GroupQuotaRequestStatusProperties GroupQuotaRequestStatusProperties(Azure.ResourceManager.Quota.Models.GroupQuotaRequestBase requestedResource = null, System.DateTimeOffset? requestSubmittedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Quota.Models.QuotaRequestStatus? provisioningState = default(Azure.ResourceManager.Quota.Models.QuotaRequestStatus?), string faultCode = null) { throw null; } public static Azure.ResourceManager.Quota.Models.GroupQuotaResourceUsages GroupQuotaResourceUsages(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.GroupQuotaUsagesBase properties = null) { throw null; } @@ -601,7 +601,7 @@ public static partial class ArmQuotaModelFactory public static Azure.ResourceManager.Quota.GroupQuotaSubscriptionRequestStatusData GroupQuotaSubscriptionRequestStatusData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.GroupQuotaSubscriptionRequestStatusProperties properties = null) { throw null; } public static Azure.ResourceManager.Quota.Models.GroupQuotaSubscriptionRequestStatusProperties GroupQuotaSubscriptionRequestStatusProperties(string subscriptionId = null, System.DateTimeOffset? requestSubmitOn = default(System.DateTimeOffset?), Azure.ResourceManager.Quota.Models.QuotaRequestStatus? provisioningState = default(Azure.ResourceManager.Quota.Models.QuotaRequestStatus?)) { throw null; } public static Azure.ResourceManager.Quota.Models.GroupQuotaUsagesBase GroupQuotaUsagesBase(long? limit = default(long?), long? usages = default(long?), string unit = null, string value = null, string localizedValue = null) { throw null; } - public static Azure.ResourceManager.Quota.Models.QuotaAllocationRequestBase QuotaAllocationRequestBase(long? limit = default(long?), string region = null, string value = null, string localizedValue = null) { throw null; } + public static Azure.ResourceManager.Quota.Models.QuotaAllocationRequestBase QuotaAllocationRequestBase(long? limit = default(long?), string region = null, string resourceName = null, string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.Quota.QuotaAllocationRequestStatusData QuotaAllocationRequestStatusData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Quota.Models.QuotaAllocationRequestBase requestedResource = null, System.DateTimeOffset? requestSubmittedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Quota.Models.QuotaRequestStatus? provisioningState = default(Azure.ResourceManager.Quota.Models.QuotaRequestStatus?), string faultCode = null) { throw null; } public static Azure.ResourceManager.Quota.Models.QuotaOperationDisplay QuotaOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.Quota.Models.QuotaOperationResult QuotaOperationResult(string name = null, Azure.ResourceManager.Quota.Models.QuotaOperationDisplay display = null, string origin = null) { throw null; } @@ -769,6 +769,7 @@ public GroupQuotaRequestBase() { } public long? Limit { get { throw null; } set { } } public string LocalizedValue { get { throw null; } } public string Region { get { throw null; } set { } } + public string ResourceName { get { throw null; } set { } } public string Value { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Quota.Models.GroupQuotaRequestBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -861,6 +862,7 @@ public QuotaAllocationRequestBase() { } public long? Limit { get { throw null; } set { } } public string LocalizedValue { get { throw null; } } public string Region { get { throw null; } set { } } + public string ResourceName { get { throw null; } set { } } public string Value { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Quota.Models.QuotaAllocationRequestBase System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_GroupQuotaEntityResource.cs b/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_GroupQuotaEntityResource.cs index 73f37983f49f..139a0718bc7d 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_GroupQuotaEntityResource.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_GroupQuotaEntityResource.cs @@ -140,8 +140,7 @@ public async Task CreateOrUpdateGroupQuotaLimitsRequest_GroupQuotaLimitsRequests // invoke the operation string resourceProviderName = "Microsoft.Compute"; - string resourceName = "standardav2family"; - ArmOperation lro = await groupQuotaEntity.CreateOrUpdateGroupQuotaLimitsRequestAsync(WaitUntil.Completed, resourceProviderName, resourceName); + ArmOperation lro = await groupQuotaEntity.CreateOrUpdateGroupQuotaLimitsRequestAsync(WaitUntil.Completed, resourceProviderName); GroupQuotaRequestStatusResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -173,8 +172,7 @@ public async Task UpdateGroupQuotaLimitsRequest_GroupQuotaLimitsRequestsUpdate() // invoke the operation string resourceProviderName = "Microsoft.Compute"; - string resourceName = "standardav2family"; - ArmOperation lro = await groupQuotaEntity.UpdateGroupQuotaLimitsRequestAsync(WaitUntil.Completed, resourceProviderName, resourceName); + ArmOperation lro = await groupQuotaEntity.UpdateGroupQuotaLimitsRequestAsync(WaitUntil.Completed, resourceProviderName); GroupQuotaRequestStatusResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs b/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs index 1098c190739a..c7b9ba07bdff 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/samples/Generated/Samples/Sample_QuotaAllocationRequestStatusResource.cs @@ -107,16 +107,16 @@ public async Task CreateOrUpdateGroupQuotaSubscriptionAllocationRequest_Subscrip string subscriptionId = "00000000-0000-0000-0000-000000000000"; string groupQuotaName = "groupquota1"; string resourceProviderName = "Microsoft.Compute"; - string resourceName = "standardav2family"; QuotaAllocationRequestStatusData data = new QuotaAllocationRequestStatusData() { RequestedResource = new QuotaAllocationRequestBase() { Limit = 10, Region = "westus", + ResourceName = "standardav2family", }, }; - ArmOperation lro = await managementGroupResource.CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil.Completed, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data); + ArmOperation lro = await managementGroupResource.CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil.Completed, subscriptionId, groupQuotaName, resourceProviderName, data); QuotaAllocationRequestStatusResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -149,16 +149,16 @@ public async Task UpdateGroupQuotaSubscriptionAllocationRequest_SubscriptionQuot string subscriptionId = "00000000-0000-0000-0000-000000000000"; string groupQuotaName = "groupquota1"; string resourceProviderName = "Microsoft.Compute"; - string resourceName = "standardav2family"; QuotaAllocationRequestStatusData data = new QuotaAllocationRequestStatusData() { RequestedResource = new QuotaAllocationRequestBase() { Limit = 10, Region = "westus", + ResourceName = "standardav2family", }, }; - ArmOperation lro = await managementGroupResource.UpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil.Completed, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data); + ArmOperation lro = await managementGroupResource.UpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil.Completed, subscriptionId, groupQuotaName, resourceProviderName, data); QuotaAllocationRequestStatusResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/ArmQuotaModelFactory.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/ArmQuotaModelFactory.cs index fdf34e670e8f..0101ce2c8402 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/ArmQuotaModelFactory.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/ArmQuotaModelFactory.cs @@ -212,15 +212,17 @@ public static GroupQuotaRequestStatusProperties GroupQuotaRequestStatusPropertie /// Initializes a new instance of . /// The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota. /// Location/Azure region for the quota requested for resource. + /// The resource name, such as SKU name. /// GroupQuota Request comments and details for request. This is optional paramter to provide more details related to the requested resource. /// Resource name. /// Resource display name. /// A new instance for mocking. - public static GroupQuotaRequestBase GroupQuotaRequestBase(long? limit = null, string region = null, string comments = null, string value = null, string localizedValue = null) + public static GroupQuotaRequestBase GroupQuotaRequestBase(long? limit = null, string region = null, string resourceName = null, string comments = null, string value = null, string localizedValue = null) { return new GroupQuotaRequestBase( limit, region, + resourceName, comments, value, localizedValue, @@ -290,12 +292,19 @@ public static QuotaAllocationRequestStatusData QuotaAllocationRequestStatusData( /// Initializes a new instance of . /// The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota. /// The location for which the subscription is allocated. + /// The resource name, such as SKU name. /// Resource name. /// Resource display name. /// A new instance for mocking. - public static QuotaAllocationRequestBase QuotaAllocationRequestBase(long? limit = null, string region = null, string value = null, string localizedValue = null) + public static QuotaAllocationRequestBase QuotaAllocationRequestBase(long? limit = null, string region = null, string resourceName = null, string value = null, string localizedValue = null) { - return new QuotaAllocationRequestBase(limit, region, value, localizedValue, serializedAdditionalRawData: null); + return new QuotaAllocationRequestBase( + limit, + region, + resourceName, + value, + localizedValue, + serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/MockableQuotaManagementGroupResource.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/MockableQuotaManagementGroupResource.cs index 1493b0da5213..6acc99ef0ff8 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/MockableQuotaManagementGroupResource.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/MockableQuotaManagementGroupResource.cs @@ -373,7 +373,7 @@ public virtual Pageable GetQuotaAllocation /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -393,25 +393,23 @@ public virtual Pageable GetQuotaAllocation /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , or is null. - public virtual async Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , or is null. + public virtual async Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); using var scope = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics.CreateScope("MockableQuotaManagementGroupResource.CreateOrUpdateGroupQuotaSubscriptionAllocationRequest"); scope.Start(); try { - var response = await QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateOrUpdateAsync(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken).ConfigureAwait(false); - var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateCreateOrUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = await QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateOrUpdateAsync(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken).ConfigureAwait(false); + var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateCreateOrUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -428,7 +426,7 @@ public virtual async Task> Cr /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -448,25 +446,23 @@ public virtual async Task> Cr /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , or is null. - public virtual ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , or is null. + public virtual ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); using var scope = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics.CreateScope("MockableQuotaManagementGroupResource.CreateOrUpdateGroupQuotaSubscriptionAllocationRequest"); scope.Start(); try { - var response = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateOrUpdate(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken); - var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateCreateOrUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateOrUpdate(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken); + var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateCreateOrUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -483,7 +479,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -503,25 +499,23 @@ public virtual ArmOperation CreateOrUpdate /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , or is null. - public virtual async Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , or is null. + public virtual async Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); using var scope = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics.CreateScope("MockableQuotaManagementGroupResource.UpdateGroupQuotaSubscriptionAllocationRequest"); scope.Start(); try { - var response = await QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.UpdateAsync(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken).ConfigureAwait(false); - var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = await QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.UpdateAsync(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken).ConfigureAwait(false); + var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -538,7 +532,7 @@ public virtual async Task> Up /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -558,25 +552,23 @@ public virtual async Task> Up /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , or is null. - public virtual ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , or is null. + public virtual ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); using var scope = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics.CreateScope("MockableQuotaManagementGroupResource.UpdateGroupQuotaSubscriptionAllocationRequest"); scope.Start(); try { - var response = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.Update(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken); - var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.Update(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken); + var operation = new QuotaArmOperation(new QuotaAllocationRequestStatusOperationSource(Client), QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestClientDiagnostics, Pipeline, QuotaAllocationRequestStatusGroupQuotaSubscriptionAllocationRequestRestClient.CreateUpdateRequest(Id.Name, subscriptionId, groupQuotaName, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/QuotaExtensions.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/QuotaExtensions.cs index 98f9f1b3531c..1b47969800c0 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/QuotaExtensions.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Extensions/QuotaExtensions.cs @@ -954,7 +954,7 @@ public static Pageable GetQuotaAllocationR /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -971,7 +971,7 @@ public static Pageable GetQuotaAllocationR /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -979,16 +979,15 @@ public static Pageable GetQuotaAllocationR /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , , or is null. - public static async Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , , or is null. + public static async Task> CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return await GetMockableQuotaManagementGroupResource(managementGroupResource).CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken).ConfigureAwait(false); + return await GetMockableQuotaManagementGroupResource(managementGroupResource).CreateOrUpdateGroupQuotaSubscriptionAllocationRequestAsync(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken).ConfigureAwait(false); } /// @@ -996,7 +995,7 @@ public static async Task> Cre /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -1013,7 +1012,7 @@ public static async Task> Cre /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1021,16 +1020,15 @@ public static async Task> Cre /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , , or is null. - public static ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , , or is null. + public static ArmOperation CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return GetMockableQuotaManagementGroupResource(managementGroupResource).CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken); + return GetMockableQuotaManagementGroupResource(managementGroupResource).CreateOrUpdateGroupQuotaSubscriptionAllocationRequest(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken); } /// @@ -1038,7 +1036,7 @@ public static ArmOperation CreateOrUpdateG /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -1055,7 +1053,7 @@ public static ArmOperation CreateOrUpdateG /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1063,16 +1061,15 @@ public static ArmOperation CreateOrUpdateG /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , , or is null. - public static async Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , , or is null. + public static async Task> UpdateGroupQuotaSubscriptionAllocationRequestAsync(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return await GetMockableQuotaManagementGroupResource(managementGroupResource).UpdateGroupQuotaSubscriptionAllocationRequestAsync(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken).ConfigureAwait(false); + return await GetMockableQuotaManagementGroupResource(managementGroupResource).UpdateGroupQuotaSubscriptionAllocationRequestAsync(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken).ConfigureAwait(false); } /// @@ -1080,7 +1077,7 @@ public static async Task> Upd /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/quotaAllocationRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/subscriptions/{subscriptionId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createAllocationRequest /// /// /// Operation Id @@ -1097,7 +1094,7 @@ public static async Task> Upd /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -1105,16 +1102,15 @@ public static async Task> Upd /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , or is an empty string, and was expected to be non-empty. - /// , , , , or is null. - public static ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , or is an empty string, and was expected to be non-empty. + /// , , , or is null. + public static ArmOperation UpdateGroupQuotaSubscriptionAllocationRequest(this ManagementGroupResource managementGroupResource, WaitUntil waitUntil, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); - return GetMockableQuotaManagementGroupResource(managementGroupResource).UpdateGroupQuotaSubscriptionAllocationRequest(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data, cancellationToken); + return GetMockableQuotaManagementGroupResource(managementGroupResource).UpdateGroupQuotaSubscriptionAllocationRequest(waitUntil, subscriptionId, groupQuotaName, resourceProviderName, data, cancellationToken); } /// diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.cs index 1f07f43a073a..e821bd79849a 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.cs @@ -733,7 +733,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createLimitRequest /// /// /// Operation Id @@ -751,22 +751,20 @@ public virtual ArmOperation Update(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 resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateGroupQuotaLimitsRequestAsync(WaitUntil waitUntil, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> CreateOrUpdateGroupQuotaLimitsRequestAsync(WaitUntil waitUntil, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); using var scope = _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics.CreateScope("GroupQuotaEntityResource.CreateOrUpdateGroupQuotaLimitsRequest"); scope.Start(); try { - var response = await _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateOrUpdateAsync(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data, cancellationToken).ConfigureAwait(false); - var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateCreateOrUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = await _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateOrUpdateAsync(Id.Parent.Name, Id.Name, resourceProviderName, data, cancellationToken).ConfigureAwait(false); + var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateCreateOrUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -784,7 +782,7 @@ public virtual async Task> CreateO /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createLimitRequest /// /// /// Operation Id @@ -802,22 +800,20 @@ public virtual async Task> CreateO /// /// 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 resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdateGroupQuotaLimitsRequest(WaitUntil waitUntil, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation CreateOrUpdateGroupQuotaLimitsRequest(WaitUntil waitUntil, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); using var scope = _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics.CreateScope("GroupQuotaEntityResource.CreateOrUpdateGroupQuotaLimitsRequest"); scope.Start(); try { - var response = _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateOrUpdate(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data, cancellationToken); - var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateCreateOrUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateOrUpdate(Id.Parent.Name, Id.Name, resourceProviderName, data, cancellationToken); + var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateCreateOrUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -835,7 +831,7 @@ public virtual ArmOperation CreateOrUpdateGroup /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createLimitRequest /// /// /// Operation Id @@ -853,22 +849,20 @@ public virtual ArmOperation CreateOrUpdateGroup /// /// 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 resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> UpdateGroupQuotaLimitsRequestAsync(WaitUntil waitUntil, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> UpdateGroupQuotaLimitsRequestAsync(WaitUntil waitUntil, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); using var scope = _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics.CreateScope("GroupQuotaEntityResource.UpdateGroupQuotaLimitsRequest"); scope.Start(); try { - var response = await _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.UpdateAsync(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data, cancellationToken).ConfigureAwait(false); - var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = await _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.UpdateAsync(Id.Parent.Name, Id.Name, resourceProviderName, data, cancellationToken).ConfigureAwait(false); + var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -886,7 +880,7 @@ public virtual async Task> UpdateG /// /// /// Request Path - /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/groupQuotaRequests/{resourceName} + /// /providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Quota/groupQuotas/{groupQuotaName}/resourceProviders/{resourceProviderName}/createLimitRequest /// /// /// Operation Id @@ -904,22 +898,20 @@ public virtual async Task> UpdateG /// /// 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 resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation UpdateGroupQuotaLimitsRequest(WaitUntil waitUntil, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation UpdateGroupQuotaLimitsRequest(WaitUntil waitUntil, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); using var scope = _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics.CreateScope("GroupQuotaEntityResource.UpdateGroupQuotaLimitsRequest"); scope.Start(); try { - var response = _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.Update(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data, cancellationToken); - var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, resourceName, data).Request, response, OperationFinalStateVia.Location); + var response = _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.Update(Id.Parent.Name, Id.Name, resourceProviderName, data, cancellationToken); + var operation = new QuotaArmOperation(new GroupQuotaRequestStatusOperationSource(Client), _groupQuotaRequestStatusGroupQuotaLimitsRequestClientDiagnostics, Pipeline, _groupQuotaRequestStatusGroupQuotaLimitsRequestRestClient.CreateUpdateRequest(Id.Parent.Name, Id.Name, resourceProviderName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.Serialization.cs index 195b9a761830..4a52d7341539 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.Serialization.cs @@ -47,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("region"u8); writer.WriteStringValue(Region); } + if (Optional.IsDefined(ResourceName)) + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } if (Optional.IsDefined(Comments)) { writer.WritePropertyName("comments"u8); @@ -105,6 +110,7 @@ internal static GroupQuotaRequestBase DeserializeGroupQuotaRequestBase(JsonEleme } long? limit = default; string region = default; + string resourceName = default; string comments = default; string value = default; string localizedValue = default; @@ -135,6 +141,11 @@ internal static GroupQuotaRequestBase DeserializeGroupQuotaRequestBase(JsonEleme region = property0.Value.GetString(); continue; } + if (property0.NameEquals("resourceName"u8)) + { + resourceName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("comments"u8)) { comments = property0.Value.GetString(); @@ -174,6 +185,7 @@ internal static GroupQuotaRequestBase DeserializeGroupQuotaRequestBase(JsonEleme return new GroupQuotaRequestBase( limit, region, + resourceName, comments, value, localizedValue, @@ -231,6 +243,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceName)) + { + builder.Append(" resourceName: "); + if (ResourceName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceName}'''"); + } + else + { + builder.AppendLine($"'{ResourceName}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Comments), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.cs index 5da28507554b..7253d63d5eb6 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/GroupQuotaRequestBase.cs @@ -53,14 +53,16 @@ public GroupQuotaRequestBase() /// Initializes a new instance of . /// The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota. /// Location/Azure region for the quota requested for resource. + /// The resource name, such as SKU name. /// GroupQuota Request comments and details for request. This is optional paramter to provide more details related to the requested resource. /// Resource name. /// Resource display name. /// Keeps track of any properties unknown to the library. - internal GroupQuotaRequestBase(long? limit, string region, string comments, string value, string localizedValue, IDictionary serializedAdditionalRawData) + internal GroupQuotaRequestBase(long? limit, string region, string resourceName, string comments, string value, string localizedValue, IDictionary serializedAdditionalRawData) { Limit = limit; Region = region; + ResourceName = resourceName; Comments = comments; Value = value; LocalizedValue = localizedValue; @@ -73,6 +75,9 @@ internal GroupQuotaRequestBase(long? limit, string region, string comments, stri /// Location/Azure region for the quota requested for resource. [WirePath("properties.region")] public string Region { get; set; } + /// The resource name, such as SKU name. + [WirePath("properties.resourceName")] + public string ResourceName { get; set; } /// GroupQuota Request comments and details for request. This is optional paramter to provide more details related to the requested resource. [WirePath("properties.comments")] public string Comments { get; set; } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.Serialization.cs index e514d45cbc22..1c4145fbe70f 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.Serialization.cs @@ -47,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("region"u8); writer.WriteStringValue(Region); } + if (Optional.IsDefined(ResourceName)) + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } writer.WritePropertyName("name"u8); writer.WriteStartObject(); if (options.Format != "W" && Optional.IsDefined(Value)) @@ -100,6 +105,7 @@ internal static QuotaAllocationRequestBase DeserializeQuotaAllocationRequestBase } long? limit = default; string region = default; + string resourceName = default; string value = default; string localizedValue = default; IDictionary serializedAdditionalRawData = default; @@ -129,6 +135,11 @@ internal static QuotaAllocationRequestBase DeserializeQuotaAllocationRequestBase region = property0.Value.GetString(); continue; } + if (property0.NameEquals("resourceName"u8)) + { + resourceName = property0.Value.GetString(); + continue; + } if (property0.NameEquals("name"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -160,7 +171,13 @@ internal static QuotaAllocationRequestBase DeserializeQuotaAllocationRequestBase } } serializedAdditionalRawData = rawDataDictionary; - return new QuotaAllocationRequestBase(limit, region, value, localizedValue, serializedAdditionalRawData); + return new QuotaAllocationRequestBase( + limit, + region, + resourceName, + value, + localizedValue, + serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -214,6 +231,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceName)) + { + builder.Append(" resourceName: "); + if (ResourceName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceName}'''"); + } + else + { + builder.AppendLine($"'{ResourceName}'"); + } + } + } + builder.Append(" name:"); builder.AppendLine(" {"); hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.cs index 0a74e89a71cb..f3671fc88434 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/Models/QuotaAllocationRequestBase.cs @@ -53,13 +53,15 @@ public QuotaAllocationRequestBase() /// Initializes a new instance of . /// The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota. /// The location for which the subscription is allocated. + /// The resource name, such as SKU name. /// Resource name. /// Resource display name. /// Keeps track of any properties unknown to the library. - internal QuotaAllocationRequestBase(long? limit, string region, string value, string localizedValue, IDictionary serializedAdditionalRawData) + internal QuotaAllocationRequestBase(long? limit, string region, string resourceName, string value, string localizedValue, IDictionary serializedAdditionalRawData) { Limit = limit; Region = region; + ResourceName = resourceName; Value = value; LocalizedValue = localizedValue; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -71,6 +73,9 @@ internal QuotaAllocationRequestBase(long? limit, string region, string value, st /// The location for which the subscription is allocated. [WirePath("properties.region")] public string Region { get; set; } + /// The resource name, such as SKU name. + [WirePath("properties.resourceName")] + public string ResourceName { get; set; } /// Resource name. [WirePath("properties.value")] public string Value { get; } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaLimitsRequestRestOperations.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaLimitsRequestRestOperations.cs index b57c7f499eb3..f28acef15e5b 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaLimitsRequestRestOperations.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaLimitsRequestRestOperations.cs @@ -36,7 +36,7 @@ public GroupQuotaLimitsRequestRestOperations(HttpPipeline pipeline, string appli _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,17 +46,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string managementGroup uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/groupQuotaRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createLimitRequest", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data) + internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data) { 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("/providers/Microsoft.Management/managementGroups/", false); @@ -65,8 +64,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, strin uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/groupQuotaRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createLimitRequest", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -88,24 +86,22 @@ internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, strin /// Management Group Id. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// 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 managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateCreateOrUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateCreateOrUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -119,31 +115,29 @@ public async Task CreateOrUpdateAsync(string managementGroupId, string /// Management Group Id. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateCreateOrUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateCreateOrUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data) + internal RequestUriBuilder CreateUpdateRequestUri(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -153,13 +147,12 @@ internal RequestUriBuilder CreateUpdateRequestUri(string managementGroupId, stri uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/groupQuotaRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createLimitRequest", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data) + internal HttpMessage CreateUpdateRequest(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -172,8 +165,7 @@ internal HttpMessage CreateUpdateRequest(string managementGroupId, string groupQ uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/groupQuotaRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createLimitRequest", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -195,19 +187,17 @@ internal HttpMessage CreateUpdateRequest(string managementGroupId, string groupQ /// Management Group Id. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// 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 managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -226,19 +216,17 @@ public async Task UpdateAsync(string managementGroupId, string groupQu /// Management Group Id. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// The GroupQuotaRequest body details for specific resourceProvider/location/resources. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string managementGroupId, string groupQuotaName, string resourceProviderName, string resourceName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string managementGroupId, string groupQuotaName, string resourceProviderName, GroupQuotaRequestStatusData data = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateUpdateRequest(managementGroupId, groupQuotaName, resourceProviderName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaSubscriptionAllocationRequestRestOperations.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaSubscriptionAllocationRequestRestOperations.cs index 58bbc0c7ec22..aa8350c7d2b3 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaSubscriptionAllocationRequestRestOperations.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/RestOperations/GroupQuotaSubscriptionAllocationRequestRestOperations.cs @@ -260,7 +260,7 @@ public Response List(string managementGroupId, } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -272,17 +272,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string managementGroup uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/quotaAllocationRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createAllocationRequest", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data) + internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data) { 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("/providers/Microsoft.Management/managementGroups/", false); @@ -293,8 +292,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, strin uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/quotaAllocationRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createAllocationRequest", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -311,26 +309,24 @@ internal HttpMessage CreateCreateOrUpdateRequest(string managementGroupId, strin /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// 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 managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateCreateOrUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -342,33 +338,31 @@ public async Task CreateOrUpdateAsync(string managementGroupId, string /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateCreateOrUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data) + internal RequestUriBuilder CreateUpdateRequestUri(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -380,13 +374,12 @@ internal RequestUriBuilder CreateUpdateRequestUri(string managementGroupId, stri uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/quotaAllocationRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createAllocationRequest", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data) + internal HttpMessage CreateUpdateRequest(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -401,8 +394,7 @@ internal HttpMessage CreateUpdateRequest(string managementGroupId, string subscr uri.AppendPath(groupQuotaName, true); uri.AppendPath("/resourceProviders/", false); uri.AppendPath(resourceProviderName, true); - uri.AppendPath("/quotaAllocationRequests/", false); - uri.AppendPath(resourceName, true); + uri.AppendPath("/createAllocationRequest", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -419,21 +411,19 @@ internal HttpMessage CreateUpdateRequest(string managementGroupId, string subscr /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// 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 managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -450,21 +440,19 @@ public async Task UpdateAsync(string managementGroupId, string subscri /// The ID of the target subscription. The value must be an UUID. /// The GroupQuota name. The name should be unique for the provided context tenantId/MgId. /// The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API. - /// Resource name. /// Quota requests payload. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Update(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, string resourceName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string managementGroupId, string subscriptionId, string groupQuotaName, string resourceProviderName, QuotaAllocationRequestStatusData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(managementGroupId, nameof(managementGroupId)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(groupQuotaName, nameof(groupQuotaName)); Argument.AssertNotNullOrEmpty(resourceProviderName, nameof(resourceProviderName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, resourceName, data); + using var message = CreateUpdateRequest(managementGroupId, subscriptionId, groupQuotaName, resourceProviderName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/autorest.md b/sdk/quota/Azure.ResourceManager.Quota/src/autorest.md index e1d18ef2daa8..ce71a6d4ecea 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/autorest.md +++ b/sdk/quota/Azure.ResourceManager.Quota/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Quota namespace: Azure.ResourceManager.Quota -require: https://github.com/Azure/azure-rest-api-specs/blob/d1f4d6fcf1bbb2e71a32bb2079de12f17fedf56a/specification/quota/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/quota/resource-manager/readme.md #tag: package-2023-06-01-preview output-folder: $(this-folder)/Generated clear-output-folder: true