From 764dde26176d348ba161a128b2eab4a5766b3875 Mon Sep 17 00:00:00 2001 From: Charlie Chen <3462778+dubiety@users.noreply.github.com> Date: Thu, 29 Jun 2023 22:48:28 +0800 Subject: [PATCH] Bump API reference version to 2021-12-01-preview (#37215) * Bump API reference version to 2021-12-01-preview * Update samples * Update recording test api version * Fix typo * Update variable naming by suggestion * Update API file * Update code based on comments and feedbacks * Update interface * Update interface according to discussion * Update changelog content --------- Co-authored-by: Charlie Chen --- .../Azure.ResourceManager.Maps/CHANGELOG.md | 10 +- ...ure.ResourceManager.Maps.netstandard2.0.cs | 57 +++++++++- .../Samples/Sample_MapsAccountCollection.cs | 87 +++++++++++++-- .../Samples/Sample_MapsAccountResource.cs | 98 +++++++++++++++-- .../Samples/Sample_MapsCreatorCollection.cs | 8 +- .../Samples/Sample_MapsCreatorResource.cs | 6 +- .../src/Generated/ArmMapsModelFactory.cs | 25 ++++- .../src/Generated/MapsAccountData.cs | 6 +- .../src/Generated/MapsAccountResource.cs | 76 +++++++++++++ .../Models/CorsRules.Serialization.cs | 59 ++++++++++ .../src/Generated/Models/CorsRules.cs | 32 ++++++ .../Models/MapsAccountData.Serialization.cs | 17 ++- .../Models/MapsAccountPatch.Serialization.cs | 20 ++++ .../src/Generated/Models/MapsAccountPatch.cs | 20 +++- .../MapsAccountProperties.Serialization.cs | 43 +++++++- .../Generated/Models/MapsAccountProperties.cs | 27 ++++- .../MapsAccountSasContent.Serialization.cs | 41 +++++++ .../Generated/Models/MapsAccountSasContent.cs | 51 +++++++++ .../MapsAccountSasToken.Serialization.cs | 33 ++++++ .../Generated/Models/MapsAccountSasToken.cs | 28 +++++ .../Models/MapsCorsRule.Serialization.cs | 52 +++++++++ .../src/Generated/Models/MapsCorsRule.cs | 38 +++++++ .../MapsLinkedResource.Serialization.cs | 49 +++++++++ .../Generated/Models/MapsLinkedResource.cs | 34 ++++++ .../src/Generated/Models/MapsSigningKey.cs | 51 +++++++++ .../RestOperations/AccountsRestOperations.cs | 101 +++++++++++++++++- .../RestOperations/CreatorsRestOperations.cs | 2 +- .../src/autorest.md | 5 +- .../MapsAccountCreateTest.json | 8 +- .../MapsAccountCreateTestAsync.json | 8 +- .../MapsAccountDeleteTest.json | 8 +- .../MapsAccountDeleteTestAsync.json | 8 +- .../MapsAccountListByResourceGroupTest.json | 8 +- ...psAccountListByResourceGroupTestAsync.json | 8 +- .../MapsAccountListBySubscriptionTest.json | 6 +- ...apsAccountListBySubscriptionTestAsync.json | 6 +- .../MapsAccountListKeysTest.json | 4 +- .../MapsAccountListKeysTestAsync.json | 4 +- .../MapsAccountRegenerateKeyTest.json | 6 +- .../MapsAccountRegenerateKeyTestAsync.json | 6 +- .../MapsAccountUpdateTest.json | 4 +- .../MapsAccountUpdateTestAsync.json | 4 +- 42 files changed, 1074 insertions(+), 90 deletions(-) create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.Serialization.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.cs create mode 100644 sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs diff --git a/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md b/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md index 0065390bac06f..947e5e712e6b4 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md +++ b/sdk/maps/Azure.ResourceManager.Maps/CHANGELOG.md @@ -1,15 +1,11 @@ # Release History -## 1.1.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed +## 1.1.0-beta.2 (2023-06-30) ### Other Changes +- Bump API version to 2021-12-01-preview + ## 1.1.0-beta.1 (2023-05-30) ### Features Added diff --git a/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs b/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs index c5056991923af..eb0387f1b588c 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/api/Azure.ResourceManager.Maps.netstandard2.0.cs @@ -18,6 +18,7 @@ protected MapsAccountCollection() { } public partial class MapsAccountData : Azure.ResourceManager.Models.TrackedResourceData { public MapsAccountData(Azure.Core.AzureLocation location, Azure.ResourceManager.Maps.Models.MapsSku sku) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Maps.Models.MapsAccountKind? Kind { get { throw null; } set { } } public Azure.ResourceManager.Maps.Models.MapsAccountProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.Maps.Models.MapsSku Sku { get { throw null; } set { } } @@ -40,6 +41,8 @@ protected MapsAccountResource() { } public virtual Azure.Response GetMapsCreator(string creatorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMapsCreatorAsync(string creatorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Maps.MapsCreatorCollection GetMapsCreators() { throw null; } + public virtual Azure.Response GetSas(Azure.ResourceManager.Maps.Models.MapsAccountSasContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSasAsync(Azure.ResourceManager.Maps.Models.MapsAccountSasContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RegenerateKeys(Azure.ResourceManager.Maps.Models.MapsKeySpecification keySpecification, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RegenerateKeysAsync(Azure.ResourceManager.Maps.Models.MapsKeySpecification keySpecification, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -104,9 +107,10 @@ namespace Azure.ResourceManager.Maps.Models { public static partial class ArmMapsModelFactory { - public static Azure.ResourceManager.Maps.MapsAccountData MapsAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Maps.Models.MapsAccountProperties properties = null) { throw null; } + public static Azure.ResourceManager.Maps.MapsAccountData MapsAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsSku sku = null, Azure.ResourceManager.Maps.Models.MapsAccountKind? kind = default(Azure.ResourceManager.Maps.Models.MapsAccountKind?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Maps.Models.MapsAccountProperties properties = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsAccountKeys MapsAccountKeys(System.DateTimeOffset? primaryKeyLastUpdatedOn = default(System.DateTimeOffset?), string primaryKey = null, string secondaryKey = null, System.DateTimeOffset? secondaryKeyLastUpdatedOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Maps.Models.MapsAccountProperties MapsAccountProperties(System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsAccountProperties MapsAccountProperties(System.Guid? uniqueId = default(System.Guid?), bool? disableLocalAuth = default(bool?), string provisioningState = null, System.Collections.Generic.IEnumerable linkedResources = null, System.Collections.Generic.IEnumerable corsRulesValue = null) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsAccountSasToken MapsAccountSasToken(string accountSasToken = null) { throw null; } public static Azure.ResourceManager.Maps.MapsCreatorData MapsCreatorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Maps.Models.MapsCreatorProperties properties = null) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsCreatorProperties MapsCreatorProperties(string provisioningState = null, int storageUnits = 0) { throw null; } public static Azure.ResourceManager.Maps.Models.MapsSku MapsSku(Azure.ResourceManager.Maps.Models.MapsSkuName name = default(Azure.ResourceManager.Maps.Models.MapsSkuName), string tier = null) { throw null; } @@ -140,8 +144,11 @@ internal MapsAccountKeys() { } public partial class MapsAccountPatch { public MapsAccountPatch() { } + public System.Collections.Generic.IList CorsRulesValue { get { throw null; } } public bool? DisableLocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Maps.Models.MapsAccountKind? Kind { get { throw null; } set { } } + public System.Collections.Generic.IList LinkedResources { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.Maps.Models.MapsSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } @@ -150,10 +157,32 @@ public MapsAccountPatch() { } public partial class MapsAccountProperties { public MapsAccountProperties() { } + public System.Collections.Generic.IList CorsRulesValue { get { throw null; } } public bool? DisableLocalAuth { get { throw null; } set { } } + public System.Collections.Generic.IList LinkedResources { get { throw null; } } public string ProvisioningState { get { throw null; } } public System.Guid? UniqueId { get { throw null; } } } + public partial class MapsAccountSasContent + { + public MapsAccountSasContent(Azure.ResourceManager.Maps.Models.MapsSigningKey signingKey, string principalId, int maxRatePerSecond, string start, string expiry) { } + public string Expiry { get { throw null; } } + public int MaxRatePerSecond { get { throw null; } } + public string PrincipalId { get { throw null; } } + public System.Collections.Generic.IList Regions { get { throw null; } } + public Azure.ResourceManager.Maps.Models.MapsSigningKey SigningKey { get { throw null; } } + public string Start { get { throw null; } } + } + public partial class MapsAccountSasToken + { + internal MapsAccountSasToken() { } + public string AccountSasToken { get { throw null; } } + } + public partial class MapsCorsRule + { + public MapsCorsRule(System.Collections.Generic.IEnumerable allowedOrigins) { } + public System.Collections.Generic.IList AllowedOrigins { get { throw null; } } + } public partial class MapsCreatorPatch { public MapsCreatorPatch() { } @@ -190,6 +219,30 @@ public MapsKeySpecification(Azure.ResourceManager.Maps.Models.MapsKeyType keyTyp public static bool operator !=(Azure.ResourceManager.Maps.Models.MapsKeyType left, Azure.ResourceManager.Maps.Models.MapsKeyType right) { throw null; } public override string ToString() { throw null; } } + public partial class MapsLinkedResource + { + public MapsLinkedResource(string uniqueName, string id) { } + public string Id { get { throw null; } set { } } + public string UniqueName { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MapsSigningKey : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MapsSigningKey(string value) { throw null; } + public static Azure.ResourceManager.Maps.Models.MapsSigningKey PrimaryKey { get { throw null; } } + public static Azure.ResourceManager.Maps.Models.MapsSigningKey SecondaryKey { get { throw null; } } + public bool Equals(Azure.ResourceManager.Maps.Models.MapsSigningKey other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Maps.Models.MapsSigningKey left, Azure.ResourceManager.Maps.Models.MapsSigningKey right) { throw null; } + public static implicit operator Azure.ResourceManager.Maps.Models.MapsSigningKey (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Maps.Models.MapsSigningKey left, Azure.ResourceManager.Maps.Models.MapsSigningKey right) { throw null; } + public override string ToString() { throw null; } + } public partial class MapsSku { public MapsSku(Azure.ResourceManager.Maps.Models.MapsSkuName name) { } diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs index f131ae9867933..57029f0880120 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountCollection.cs @@ -13,18 +13,77 @@ using Azure.ResourceManager; using Azure.ResourceManager.Maps; using Azure.ResourceManager.Maps.Models; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.Maps.Samples { public partial class Sample_MapsAccountCollection { + // Create Account with Managed Identities + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAccountWithManagedIdentities() + { + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateAccountManagedIdentity.json + // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "21a9967a-e8a9-4656-a70b-96ff1c4d05a0"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MapsAccountResource + MapsAccountCollection collection = resourceGroupResource.GetMapsAccounts(); + + // invoke the operation + string accountName = "myMapsAccount"; + MapsAccountData data = new MapsAccountData(new AzureLocation("eastus"), new MapsSku(MapsSkuName.G2)) + { + Kind = MapsAccountKind.Gen2, + Identity = new ManagedServiceIdentity("SystemAssigned, UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName")] = new UserAssignedIdentity(), +}, + }, + Properties = new MapsAccountProperties() + { + DisableLocalAuth = false, + LinkedResources = +{ +new MapsLinkedResource("myBatchStorageAccount","/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Storage/accounts/mystorageacc"),new MapsLinkedResource("myBlobDataSource","/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Storage/accounts/mystorageacc") +}, + }, + Tags = +{ +["test"] = "true", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, data); + MapsAccountResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create Gen1 Account [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateGen1Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/CreateAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateAccount.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -44,12 +103,19 @@ public async Task CreateOrUpdate_CreateGen1Account() // invoke the operation string accountName = "myMapsAccount"; - MapsAccountData data = new MapsAccountData(new AzureLocation("global"), new MapsSku(MapsSkuName.S0)) + MapsAccountData data = new MapsAccountData(new AzureLocation("eastus"), new MapsSku(MapsSkuName.S0)) { Kind = MapsAccountKind.Gen1, Properties = new MapsAccountProperties() { DisableLocalAuth = false, + CorsRulesValue = +{ +new MapsCorsRule(new string[] +{ +"http://www.contoso.com","http://www.fabrikam.com" +}) +}, }, Tags = { @@ -71,7 +137,7 @@ public async Task CreateOrUpdate_CreateGen1Account() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateGen2Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/CreateAccountGen2.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateAccountGen2.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,12 +157,19 @@ public async Task CreateOrUpdate_CreateGen2Account() // invoke the operation string accountName = "myMapsAccount"; - MapsAccountData data = new MapsAccountData(new AzureLocation("global"), new MapsSku(MapsSkuName.G2)) + MapsAccountData data = new MapsAccountData(new AzureLocation("eastus"), new MapsSku(MapsSkuName.G2)) { Kind = MapsAccountKind.Gen2, Properties = new MapsAccountProperties() { DisableLocalAuth = true, + CorsRulesValue = +{ +new MapsCorsRule(new string[] +{ +"http://www.contoso.com","http://www.fabrikam.com" +}) +}, }, Tags = { @@ -118,7 +191,7 @@ public async Task CreateOrUpdate_CreateGen2Account() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +225,7 @@ public async Task Get_GetAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +255,7 @@ public async Task Exists_GetAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAccountsByResourceGroup() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/ListAccountsByResourceGroup.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListAccountsByResourceGroup.json // this example is just showing the usage of "Accounts_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs index 41944ced22dd8..20ade418640f5 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsAccountResource.cs @@ -13,18 +13,66 @@ using Azure.ResourceManager; using Azure.ResourceManager.Maps; using Azure.ResourceManager.Maps.Models; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.Maps.Samples { public partial class Sample_MapsAccountResource { + // Update Account Managed Identities + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAccountManagedIdentities() + { + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccountManagedIdentity.json + // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MapsAccountResource created on azure + // for more information of creating MapsAccountResource, please refer to the document of MapsAccountResource + string subscriptionId = "21a9967a-e8a9-4656-a70b-96ff1c4d05a0"; + string resourceGroupName = "myResourceGroup"; + string accountName = "myMapsAccount"; + ResourceIdentifier mapsAccountResourceId = MapsAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + MapsAccountResource mapsAccount = client.GetMapsAccountResource(mapsAccountResourceId); + + // invoke the operation + MapsAccountPatch patch = new MapsAccountPatch() + { + Kind = MapsAccountKind.Gen2, + Sku = new MapsSku(MapsSkuName.G2), + Identity = new ManagedServiceIdentity("SystemAssigned, UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName")] = new UserAssignedIdentity(), +}, + }, + LinkedResources = +{ +new MapsLinkedResource("myBatchStorageAccount","/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}") +}, + }; + MapsAccountResource result = await mapsAccount.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MapsAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Update Account Tags [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAccountTags() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/UpdateAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccount.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +110,7 @@ public async Task Update_UpdateAccountTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateToGen1Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/UpdateAccountGen1.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccountGen1.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +146,7 @@ public async Task Update_UpdateToGen1Account() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateToGen2Account() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/UpdateAccountGen2.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateAccountGen2.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +182,7 @@ public async Task Update_UpdateToGen2Account() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/DeleteAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/DeleteAccount.json // this example is just showing the usage of "Accounts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +209,7 @@ public async Task Delete_DeleteAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/GetAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetAccount.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +240,7 @@ public async Task Get_GetAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMapsAccounts_ListAccountsBySubscription() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/ListAccountsBySubscription.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListAccountsBySubscription.json // this example is just showing the usage of "Accounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,12 +267,46 @@ public async Task GetMapsAccounts_ListAccountsBySubscription() Console.WriteLine($"Succeeded"); } + // List Account Sas + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSas_ListAccountSas() + { + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/AccountListSAS.json + // this example is just showing the usage of "Accounts_ListSas" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MapsAccountResource created on azure + // for more information of creating MapsAccountResource, please refer to the document of MapsAccountResource + string subscriptionId = "21a9967a-e8a9-4656-a70b-96ff1c4d05a0"; + string resourceGroupName = "myResourceGroup"; + string accountName = "myMapsAccount"; + ResourceIdentifier mapsAccountResourceId = MapsAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + MapsAccountResource mapsAccount = client.GetMapsAccountResource(mapsAccountResourceId); + + // invoke the operation + MapsAccountSasContent content = new MapsAccountSasContent(MapsSigningKey.PrimaryKey, "e917f87b-324d-4728-98ed-e31d311a7d65", 500, "2017-05-24T10:42:03.1567373Z", "2017-05-24T11:42:03.1567373Z") + { + Regions = +{ +"eastus" +}, + }; + MapsAccountSasToken result = await mapsAccount.GetSasAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + // List Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListKeys() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/ListKeys.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListKeys.json // this example is just showing the usage of "Accounts_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -251,7 +333,7 @@ public async Task GetKeys_ListKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateKeys_RegenerateKey() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/RegenerateKey.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/RegenerateKey.json // this example is just showing the usage of "Accounts_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs index c592bf18c16c0..32c4ededd5852 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_MapsCreatorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCreatorResourcesByAccount() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/ListMapsCreatorsByAccount.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/ListMapsCreatorsByAccount.json // this example is just showing the usage of "Creators_ListByAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListCreatorResourcesByAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/CreateMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/CreateMapsCreator.json // this example is just showing the usage of "Creators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,7 +103,7 @@ public async Task CreateOrUpdate_CreateCreatorResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task Get_GetCreatorResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs index 77ab36c3f1a4e..1de75263b16cb 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/samples/Generated/Samples/Sample_MapsCreatorResource.cs @@ -23,7 +23,7 @@ public partial class Sample_MapsCreatorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/UpdateMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/UpdateMapsCreator.json // this example is just showing the usage of "Creators_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task Update_UpdateCreatorResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/DeleteMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/DeleteMapsCreator.json // this example is just showing the usage of "Creators_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Delete_DeleteCreatorResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCreatorResource() { - // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2021-02-01/examples/GetMapsCreator.json + // Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/preview/2021-12-01-preview/examples/GetMapsCreator.json // this example is just showing the usage of "Creators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs index 8aeb0366e0ea3..4d13fec5632ca 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/ArmMapsModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Azure.Core; using Azure.ResourceManager.Maps; using Azure.ResourceManager.Models; @@ -25,13 +26,14 @@ public static partial class ArmMapsModelFactory /// The location. /// The SKU of this account. /// Get or Set Kind property. + /// Sets the identity property for maps account. /// The map account properties. /// A new instance for mocking. - public static MapsAccountData MapsAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MapsSku sku = null, MapsAccountKind? kind = null, MapsAccountProperties properties = null) + public static MapsAccountData MapsAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MapsSku sku = null, MapsAccountKind? kind = null, ManagedServiceIdentity identity = null, MapsAccountProperties properties = null) { tags ??= new Dictionary(); - return new MapsAccountData(id, name, resourceType, systemData, tags, location, sku, kind, properties); + return new MapsAccountData(id, name, resourceType, systemData, tags, location, sku, kind, identity, properties); } /// Initializes a new instance of MapsSku. @@ -46,11 +48,24 @@ public static MapsSku MapsSku(MapsSkuName name = default, string tier = null) /// Initializes a new instance of MapsAccountProperties. /// A unique identifier for the maps account. /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. - /// the state of the provisioning. + /// The provisioning state of the Map account resource. + /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. /// A new instance for mocking. - public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null) + public static MapsAccountProperties MapsAccountProperties(Guid? uniqueId = null, bool? disableLocalAuth = null, string provisioningState = null, IEnumerable linkedResources = null, IEnumerable corsRulesValue = null) { - return new MapsAccountProperties(uniqueId, disableLocalAuth, provisioningState); + linkedResources ??= new List(); + corsRulesValue ??= new List(); + + return new MapsAccountProperties(uniqueId, disableLocalAuth, provisioningState, linkedResources?.ToList(), corsRulesValue != null ? new CorsRules(corsRulesValue?.ToList()) : null); + } + + /// Initializes a new instance of MapsAccountSasToken. + /// The shared access signature access token. + /// A new instance for mocking. + public static MapsAccountSasToken MapsAccountSasToken(string accountSasToken = null) + { + return new MapsAccountSasToken(accountSasToken); } /// Initializes a new instance of MapsAccountKeys. diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs index ab24291f3912c..a8814c83c2026 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountData.cs @@ -39,11 +39,13 @@ public MapsAccountData(AzureLocation location, MapsSku sku) : base(location) /// The location. /// The SKU of this account. /// Get or Set Kind property. + /// Sets the identity property for maps account. /// The map account properties. - internal MapsAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MapsSku sku, MapsAccountKind? kind, MapsAccountProperties properties) : base(id, name, resourceType, systemData, tags, location) + internal MapsAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MapsSku sku, MapsAccountKind? kind, ManagedServiceIdentity identity, MapsAccountProperties properties) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Kind = kind; + Identity = identity; Properties = properties; } @@ -51,6 +53,8 @@ internal MapsAccountData(ResourceIdentifier id, string name, ResourceType resour public MapsSku Sku { get; set; } /// Get or Set Kind property. public MapsAccountKind? Kind { get; set; } + /// Sets the identity property for maps account. + public ManagedServiceIdentity Identity { get; set; } /// The map account properties. public MapsAccountProperties Properties { get; set; } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs index 069bd08dfcf35..6b2d4c8216134 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.cs @@ -342,6 +342,82 @@ public virtual Response Update(MapsAccountPatch patch, Canc } } + /// + /// Create and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. + /// + /// Prerequisites: + /// 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account. + /// 2. Create or update an Azure Map account with the same Azure region as the User Assigned Managed Identity is placed. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listSas + /// + /// + /// Operation Id + /// Accounts_ListSas + /// + /// + /// + /// The updated parameters for the Maps Account. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSasAsync(MapsAccountSasContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsAccountAccountsClientDiagnostics.CreateScope("MapsAccountResource.GetSas"); + scope.Start(); + try + { + var response = await _mapsAccountAccountsRestClient.ListSasAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. + /// + /// Prerequisites: + /// 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account. + /// 2. Create or update an Azure Map account with the same Azure region as the User Assigned Managed Identity is placed. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}/listSas + /// + /// + /// Operation Id + /// Accounts_ListSas + /// + /// + /// + /// The updated parameters for the Maps Account. + /// The cancellation token to use. + /// is null. + public virtual Response GetSas(MapsAccountSasContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _mapsAccountAccountsClientDiagnostics.CreateScope("MapsAccountResource.GetSas"); + scope.Start(); + try + { + var response = _mapsAccountAccountsRestClient.ListSas(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. /// diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.Serialization.cs new file mode 100644 index 0000000000000..6acee2b148b76 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + internal partial class CorsRules : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(CorsRulesValue)) + { + writer.WritePropertyName("corsRules"u8); + writer.WriteStartArray(); + foreach (var item in CorsRulesValue) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CorsRules DeserializeCorsRules(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> corsRules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("corsRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MapsCorsRule.DeserializeMapsCorsRule(item)); + } + corsRules = array; + continue; + } + } + return new CorsRules(Optional.ToList(corsRules)); + } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.cs new file mode 100644 index 0000000000000..982ea08db9773 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/CorsRules.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Sets the CORS rules. You can include up to five CorsRule elements in the request. + internal partial class CorsRules + { + /// Initializes a new instance of CorsRules. + public CorsRules() + { + CorsRulesValue = new ChangeTrackingList(); + } + + /// Initializes a new instance of CorsRules. + /// The list of CORS rules. You can include up to five CorsRule elements in the request. + internal CorsRules(IList corsRulesValue) + { + CorsRulesValue = corsRulesValue; + } + + /// The list of CORS rules. You can include up to five CorsRule elements in the request. + public IList CorsRulesValue { get; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountData.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountData.Serialization.cs index c78a9255a25ca..95a6bdb6908c1 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountData.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountData.Serialization.cs @@ -25,6 +25,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.Value.ToString()); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); @@ -54,6 +59,7 @@ internal static MapsAccountData DeserializeMapsAccountData(JsonElement element) } MapsSku sku = default; Optional kind = default; + Optional identity = default; Optional properties = default; Optional> tags = default; AzureLocation location = default; @@ -77,6 +83,15 @@ internal static MapsAccountData DeserializeMapsAccountData(JsonElement element) kind = new MapsAccountKind(property.Value.GetString()); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -130,7 +145,7 @@ internal static MapsAccountData DeserializeMapsAccountData(JsonElement element) continue; } } - return new MapsAccountData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku, Optional.ToNullable(kind), properties.Value); + return new MapsAccountData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku, Optional.ToNullable(kind), identity, properties.Value); } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs index 1c73540cd471d..3869830b7bef4 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.Serialization.cs @@ -36,6 +36,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DisableLocalAuth)) @@ -43,6 +48,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("disableLocalAuth"u8); writer.WriteBooleanValue(DisableLocalAuth.Value); } + if (Optional.IsCollectionDefined(LinkedResources)) + { + writer.WritePropertyName("linkedResources"u8); + writer.WriteStartArray(); + foreach (var item in LinkedResources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Cors)) + { + writer.WritePropertyName("cors"u8); + writer.WriteObjectValue(Cors); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs index 8f47f4e3dbada..ddeefddb50076 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountPatch.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Maps.Models { @@ -18,6 +19,7 @@ public partial class MapsAccountPatch public MapsAccountPatch() { Tags = new ChangeTrackingDictionary(); + LinkedResources = new ChangeTrackingList(); } /// Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. @@ -26,11 +28,27 @@ public MapsAccountPatch() public MapsAccountKind? Kind { get; set; } /// The SKU of this account. public MapsSku Sku { get; set; } + /// Sets the identity property for maps account. + public ManagedServiceIdentity Identity { get; set; } /// A unique identifier for the maps account. public Guid? UniqueId { get; } /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. public bool? DisableLocalAuth { get; set; } - /// the state of the provisioning. + /// The provisioning state of the Map account resource. public string ProvisioningState { get; } + /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + public IList LinkedResources { get; } + /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + internal CorsRules Cors { get; set; } + /// The list of CORS rules. You can include up to five CorsRule elements in the request. + public IList CorsRulesValue + { + get + { + if (Cors is null) + Cors = new CorsRules(); + return Cors.CorsRulesValue; + } + } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs index 2376fc4cfd494..5a0ebec9c28de 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.Serialization.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -21,6 +22,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("disableLocalAuth"u8); writer.WriteBooleanValue(DisableLocalAuth.Value); } + if (Optional.IsCollectionDefined(LinkedResources)) + { + writer.WritePropertyName("linkedResources"u8); + writer.WriteStartArray(); + foreach (var item in LinkedResources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Cors)) + { + writer.WritePropertyName("cors"u8); + writer.WriteObjectValue(Cors); + } writer.WriteEndObject(); } @@ -33,6 +49,8 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme Optional uniqueId = default; Optional disableLocalAuth = default; Optional provisioningState = default; + Optional> linkedResources = default; + Optional cors = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("uniqueId"u8)) @@ -58,8 +76,31 @@ internal static MapsAccountProperties DeserializeMapsAccountProperties(JsonEleme provisioningState = property.Value.GetString(); continue; } + if (property.NameEquals("linkedResources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MapsLinkedResource.DeserializeMapsLinkedResource(item)); + } + linkedResources = array; + continue; + } + if (property.NameEquals("cors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cors = CorsRules.DeserializeCorsRules(property.Value); + continue; + } } - return new MapsAccountProperties(Optional.ToNullable(uniqueId), Optional.ToNullable(disableLocalAuth), provisioningState.Value); + return new MapsAccountProperties(Optional.ToNullable(uniqueId), Optional.ToNullable(disableLocalAuth), provisioningState.Value, Optional.ToList(linkedResources), cors.Value); } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs index 3043b6dc466bf..6c0114f286657 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountProperties.cs @@ -6,6 +6,8 @@ #nullable disable using System; +using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.Maps.Models { @@ -15,24 +17,43 @@ public partial class MapsAccountProperties /// Initializes a new instance of MapsAccountProperties. public MapsAccountProperties() { + LinkedResources = new ChangeTrackingList(); } /// Initializes a new instance of MapsAccountProperties. /// A unique identifier for the maps account. /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. - /// the state of the provisioning. - internal MapsAccountProperties(Guid? uniqueId, bool? disableLocalAuth, string provisioningState) + /// The provisioning state of the Map account resource. + /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + internal MapsAccountProperties(Guid? uniqueId, bool? disableLocalAuth, string provisioningState, IList linkedResources, CorsRules cors) { UniqueId = uniqueId; DisableLocalAuth = disableLocalAuth; ProvisioningState = provisioningState; + LinkedResources = linkedResources; + Cors = cors; } /// A unique identifier for the maps account. public Guid? UniqueId { get; } /// Allows toggle functionality on Azure Policy to disable Azure Maps local authentication support. This will disable Shared Keys authentication from any usage. public bool? DisableLocalAuth { get; set; } - /// the state of the provisioning. + /// The provisioning state of the Map account resource. public string ProvisioningState { get; } + /// Sets the resources to be used for Managed Identities based operations for the Map account resource. + public IList LinkedResources { get; } + /// Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + internal CorsRules Cors { get; set; } + /// The list of CORS rules. You can include up to five CorsRule elements in the request. + public IList CorsRulesValue + { + get + { + if (Cors is null) + Cors = new CorsRules(); + return Cors.CorsRulesValue; + } + } } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.Serialization.cs new file mode 100644 index 0000000000000..dc6b51428b9a8 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class MapsAccountSasContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("signingKey"u8); + writer.WriteStringValue(SigningKey.ToString()); + writer.WritePropertyName("principalId"u8); + writer.WriteStringValue(PrincipalId); + if (Optional.IsCollectionDefined(Regions)) + { + writer.WritePropertyName("regions"u8); + writer.WriteStartArray(); + foreach (var item in Regions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("maxRatePerSecond"u8); + writer.WriteNumberValue(MaxRatePerSecond); + writer.WritePropertyName("start"u8); + writer.WriteStringValue(Start); + writer.WritePropertyName("expiry"u8); + writer.WriteStringValue(Expiry); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs new file mode 100644 index 0000000000000..774b2e6bccc53 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasContent.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Parameters used to create an account Shared Access Signature (SAS) token. The REST API access control is provided by Azure Maps Role Based Access (RBAC) identity and access. + public partial class MapsAccountSasContent + { + /// Initializes a new instance of MapsAccountSasContent. + /// The Map account key to use for signing. + /// The principal Id also known as the object Id of a User Assigned Managed Identity currently assigned to the Map Account. To assign a Managed Identity of the account, use operation Create or Update an assign a User Assigned Identity resource Id. + /// Required parameter which represents the desired maximum request per second to allowed for the given SAS token. This does not guarantee perfect accuracy in measurements but provides application safe guards of abuse with eventual enforcement. + /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". + /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". + /// , or is null. + public MapsAccountSasContent(MapsSigningKey signingKey, string principalId, int maxRatePerSecond, string start, string expiry) + { + Argument.AssertNotNull(principalId, nameof(principalId)); + Argument.AssertNotNull(start, nameof(start)); + Argument.AssertNotNull(expiry, nameof(expiry)); + + SigningKey = signingKey; + PrincipalId = principalId; + Regions = new ChangeTrackingList(); + MaxRatePerSecond = maxRatePerSecond; + Start = start; + Expiry = expiry; + } + + /// The Map account key to use for signing. + public MapsSigningKey SigningKey { get; } + /// The principal Id also known as the object Id of a User Assigned Managed Identity currently assigned to the Map Account. To assign a Managed Identity of the account, use operation Create or Update an assign a User Assigned Identity resource Id. + public string PrincipalId { get; } + /// Optional, allows control of which region locations are permitted access to Azure Maps REST APIs with the SAS token. Example: "eastus", "westus2". Omitting this parameter will allow all region locations to be accessible. + public IList Regions { get; } + /// Required parameter which represents the desired maximum request per second to allowed for the given SAS token. This does not guarantee perfect accuracy in measurements but provides application safe guards of abuse with eventual enforcement. + public int MaxRatePerSecond { get; } + /// The date time offset of when the token validity begins. For example "2017-05-24T10:42:03.1567373Z". + public string Start { get; } + /// The date time offset of when the token validity expires. For example "2017-05-24T10:42:03.1567373Z". + public string Expiry { get; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.Serialization.cs new file mode 100644 index 0000000000000..3234aebdc1de8 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class MapsAccountSasToken + { + internal static MapsAccountSasToken DeserializeMapsAccountSasToken(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional accountSasToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountSasToken"u8)) + { + accountSasToken = property.Value.GetString(); + continue; + } + } + return new MapsAccountSasToken(accountSasToken.Value); + } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.cs new file mode 100644 index 0000000000000..837da9b2826d5 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsAccountSasToken.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Maps.Models +{ + /// A new Sas token which can be used to access the Maps REST APIs and is controlled by the specified Managed identity permissions on Azure (IAM) Role Based Access Control. + public partial class MapsAccountSasToken + { + /// Initializes a new instance of MapsAccountSasToken. + internal MapsAccountSasToken() + { + } + + /// Initializes a new instance of MapsAccountSasToken. + /// The shared access signature access token. + internal MapsAccountSasToken(string accountSasToken) + { + AccountSasToken = accountSasToken; + } + + /// The shared access signature access token. + public string AccountSasToken { get; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.Serialization.cs new file mode 100644 index 0000000000000..e47d54804d8ff --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class MapsCorsRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("allowedOrigins"u8); + writer.WriteStartArray(); + foreach (var item in AllowedOrigins) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static MapsCorsRule DeserializeMapsCorsRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedOrigins = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedOrigins"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedOrigins = array; + continue; + } + } + return new MapsCorsRule(allowedOrigins); + } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.cs new file mode 100644 index 0000000000000..b57379d5be29a --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsCorsRule.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Specifies a CORS rule for the Map Account. + public partial class MapsCorsRule + { + /// Initializes a new instance of MapsCorsRule. + /// Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains. + /// is null. + public MapsCorsRule(IEnumerable allowedOrigins) + { + Argument.AssertNotNull(allowedOrigins, nameof(allowedOrigins)); + + AllowedOrigins = allowedOrigins.ToList(); + } + + /// Initializes a new instance of MapsCorsRule. + /// Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains. + internal MapsCorsRule(IList allowedOrigins) + { + AllowedOrigins = allowedOrigins; + } + + /// Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains. + public IList AllowedOrigins { get; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.Serialization.cs new file mode 100644 index 0000000000000..cdabd3ce6bcf3 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + public partial class MapsLinkedResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("uniqueName"u8); + writer.WriteStringValue(UniqueName); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WriteEndObject(); + } + + internal static MapsLinkedResource DeserializeMapsLinkedResource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string uniqueName = default; + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uniqueName"u8)) + { + uniqueName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new MapsLinkedResource(uniqueName, id); + } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.cs new file mode 100644 index 0000000000000..8fa6e50e09a23 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsLinkedResource.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Maps.Models +{ + /// Linked resource is reference to a resource deployed in an Azure subscription, add the linked resource `uniqueName` value as an optional parameter for operations on Azure Maps Geospatial REST APIs. + public partial class MapsLinkedResource + { + /// Initializes a new instance of MapsLinkedResource. + /// A provided name which uniquely identifies the linked resource. + /// ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}'. + /// or is null. + public MapsLinkedResource(string uniqueName, string id) + { + Argument.AssertNotNull(uniqueName, nameof(uniqueName)); + Argument.AssertNotNull(id, nameof(id)); + + UniqueName = uniqueName; + Id = id; + } + + /// A provided name which uniquely identifies the linked resource. + public string UniqueName { get; set; } + /// ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}'. + public string Id { get; set; } + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs new file mode 100644 index 0000000000000..c78cf7244f435 --- /dev/null +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/Models/MapsSigningKey.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Maps.Models +{ + /// The Map account key to use for signing. + public readonly partial struct MapsSigningKey : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MapsSigningKey(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryKeyValue = "primaryKey"; + private const string SecondaryKeyValue = "secondaryKey"; + + /// primaryKey. + public static MapsSigningKey PrimaryKey { get; } = new MapsSigningKey(PrimaryKeyValue); + /// secondaryKey. + public static MapsSigningKey SecondaryKey { get; } = new MapsSigningKey(SecondaryKeyValue); + /// Determines if two values are the same. + public static bool operator ==(MapsSigningKey left, MapsSigningKey right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MapsSigningKey left, MapsSigningKey right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MapsSigningKey(string value) => new MapsSigningKey(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MapsSigningKey other && Equals(other); + /// + public bool Equals(MapsSigningKey other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs index db7708c0f71d7..bbee61c861048 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/AccountsRestOperations.cs @@ -33,7 +33,7 @@ public AccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2021-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -503,6 +503,105 @@ public Response ListBySubscription(string subscriptionId, Cancella } } + internal HttpMessage CreateListSasRequest(string subscriptionId, string resourceGroupName, string accountName, MapsAccountSasContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Maps/accounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/listSas", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// + /// Create and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. + /// + /// Prerequisites: + /// 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account. + /// 2. Create or update an Azure Map account with the same Azure region as the User Assigned Managed Identity is placed. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Maps Account. + /// The updated parameters for the Maps Account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSasAsync(string subscriptionId, string resourceGroupName, string accountName, MapsAccountSasContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateListSasRequest(subscriptionId, resourceGroupName, accountName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MapsAccountSasToken value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MapsAccountSasToken.DeserializeMapsAccountSasToken(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// Create and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token. + /// + /// Prerequisites: + /// 1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account. + /// 2. Create or update an Azure Map account with the same Azure region as the User Assigned Managed Identity is placed. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Maps Account. + /// The updated parameters for the Maps Account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSas(string subscriptionId, string resourceGroupName, string accountName, MapsAccountSasContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateListSasRequest(subscriptionId, resourceGroupName, accountName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MapsAccountSasToken value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MapsAccountSasToken.DeserializeMapsAccountSasToken(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs index 1fbcded595951..1dc7f8d199100 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/RestOperations/CreatorsRestOperations.cs @@ -33,7 +33,7 @@ public CreatorsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2021-12-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md b/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md index 1c3a26f4b5768..59d515a272f8f 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md +++ b/sdk/maps/Azure.ResourceManager.Maps/src/autorest.md @@ -9,7 +9,6 @@ csharp: true library-name: Maps namespace: Azure.ResourceManager.Maps require: https://github.com/Azure/azure-rest-api-specs/blob/6b08774c89877269e73e11ac3ecbd1bd4e14f5a0/specification/maps/resource-manager/readme.md -tag: package-2021-02 output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true @@ -29,6 +28,9 @@ prepend-rp-prefix: - Creator - CreatorProperties - KeyType + - LinkedResource + - SigningKey + - CorsRule format-by-name-rules: 'tenantId': 'uuid' @@ -59,6 +61,7 @@ rename-rules: SSO: Sso URI: Uri Etag: ETag|etag + AccountSasContent: MapsAccountSasContent directive: - remove-operation: 'Maps_ListOperations' diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTest.json index f3ba2ee9fe2f8..cd3a824a72784 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -222,7 +222,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -251,7 +251,7 @@ "ResponseBody": null }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1818/providers/Microsoft.Maps/accounts/maps9305?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTestAsync.json index 6a536c3fdbf46..ee11702c81b69 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountCreateTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -222,7 +222,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -251,7 +251,7 @@ "ResponseBody": null }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8122/providers/Microsoft.Maps/accounts/maps3035?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTest.json index 14f79ab9731fe..f0fcfeab402d8 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/missingaccount?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/missingaccount?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -124,7 +124,7 @@ "ResponseBody": null }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/maps1985?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/maps1985?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -192,7 +192,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/maps1985?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/maps1985?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -221,7 +221,7 @@ "ResponseBody": null }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/maps1985?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2453/providers/Microsoft.Maps/accounts/maps1985?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTestAsync.json index 97438d3e311fa..44007767620e5 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountDeleteTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/missingaccount?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/missingaccount?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -124,7 +124,7 @@ "ResponseBody": null }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/maps6863?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/maps6863?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -192,7 +192,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/maps6863?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/maps6863?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -221,7 +221,7 @@ "ResponseBody": null }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/maps6863?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2472/providers/Microsoft.Maps/accounts/maps6863?api-version=2021-12-01-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTest.json index 652eba3229206..5801b48d8999c 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -128,7 +128,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts/maps1285?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts/maps1285?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -196,7 +196,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts/maps9292?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts/maps9292?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -264,7 +264,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7644/providers/Microsoft.Maps/accounts?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTestAsync.json index bf7a464220d1c..ba5706539448a 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListByResourceGroupTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -128,7 +128,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts/maps5868?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts/maps5868?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -196,7 +196,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts/maps229?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts/maps229?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -264,7 +264,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG3424/providers/Microsoft.Maps/accounts?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTest.json index a825c569ba6a5..e3351b78f465b 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1547/providers/Microsoft.Maps/accounts/maps9152?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG1547/providers/Microsoft.Maps/accounts/maps9152?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -206,7 +206,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG500/providers/Microsoft.Maps/accounts/maps6543?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG500/providers/Microsoft.Maps/accounts/maps6543?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -274,7 +274,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Maps/accounts?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Maps/accounts?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTestAsync.json index 9240f324e28e7..b5a241708fb0e 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListBySubscriptionTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8038/providers/Microsoft.Maps/accounts/maps8137?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8038/providers/Microsoft.Maps/accounts/maps8137?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -206,7 +206,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG5306/providers/Microsoft.Maps/accounts/maps1814?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG5306/providers/Microsoft.Maps/accounts/maps1814?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -274,7 +274,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Maps/accounts?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Maps/accounts?api-version=2021-12-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTest.json index 2f433929d2fc6..a280770e27cae 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7475/providers/Microsoft.Maps/accounts/maps8187?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7475/providers/Microsoft.Maps/accounts/maps8187?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7475/providers/Microsoft.Maps/accounts/maps8187/listKeys?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7475/providers/Microsoft.Maps/accounts/maps8187/listKeys?api-version=2021-12-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTestAsync.json index 09def404fc910..eed336a9490a5 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountListKeysTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG4937/providers/Microsoft.Maps/accounts/maps9675?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG4937/providers/Microsoft.Maps/accounts/maps9675?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG4937/providers/Microsoft.Maps/accounts/maps9675/listKeys?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG4937/providers/Microsoft.Maps/accounts/maps9675/listKeys?api-version=2021-12-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTest.json index 4c14afecb21db..35808f84219d9 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7933/providers/Microsoft.Maps/accounts/maps2066?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7933/providers/Microsoft.Maps/accounts/maps2066?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7933/providers/Microsoft.Maps/accounts/maps2066/listKeys?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7933/providers/Microsoft.Maps/accounts/maps2066/listKeys?api-version=2021-12-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", @@ -201,7 +201,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7933/providers/Microsoft.Maps/accounts/maps2066/regenerateKey?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7933/providers/Microsoft.Maps/accounts/maps2066/regenerateKey?api-version=2021-12-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTestAsync.json index 60e8c21c5cf62..b6147d4a6df02 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountRegenerateKeyTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2394/providers/Microsoft.Maps/accounts/maps5377?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2394/providers/Microsoft.Maps/accounts/maps5377?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2394/providers/Microsoft.Maps/accounts/maps5377/listKeys?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2394/providers/Microsoft.Maps/accounts/maps5377/listKeys?api-version=2021-12-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", @@ -201,7 +201,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2394/providers/Microsoft.Maps/accounts/maps5377/regenerateKey?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG2394/providers/Microsoft.Maps/accounts/maps5377/regenerateKey?api-version=2021-12-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTest.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTest.json index 71363c4551673..e3c94a2689b66 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTest.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTest.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7901/providers/Microsoft.Maps/accounts/maps6553?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7901/providers/Microsoft.Maps/accounts/maps6553?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7901/providers/Microsoft.Maps/accounts/maps6553?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG7901/providers/Microsoft.Maps/accounts/maps6553?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", diff --git a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTestAsync.json b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTestAsync.json index 43a15d5c462f4..a7c844d52ab97 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTestAsync.json +++ b/sdk/maps/Azure.ResourceManager.Maps/tests/SessionRecords/MapsAccountTests/MapsAccountUpdateTestAsync.json @@ -97,7 +97,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8433/providers/Microsoft.Maps/accounts/maps9025?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8433/providers/Microsoft.Maps/accounts/maps9025?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -165,7 +165,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8433/providers/Microsoft.Maps/accounts/maps9025?api-version=2021-02-01", + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/MapsRG8433/providers/Microsoft.Maps/accounts/maps9025?api-version=2021-12-01-preview", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json",