Aggiornamenti un account mappe. È possibile aggiornare solo un subset dei parametri dopo la creazione, ad esempio Sku, Tag, Proprietà.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}?api-version=2023-06-01
Parametri dell'URI
Nome |
In |
Necessario |
Tipo |
Descrizione |
accountName
|
path |
True
|
string
|
Nome dell'account mappe.
|
resourceGroupName
|
path |
True
|
string
|
Nome del gruppo di risorse. Per il nome non viene fatta distinzione tra maiuscole e minuscole.
|
subscriptionId
|
path |
True
|
string
|
ID della sottoscrizione di destinazione.
|
api-version
|
query |
True
|
string
|
Versione dell'API da usare per questa operazione.
|
Corpo della richiesta
Nome |
Tipo |
Descrizione |
identity
|
ManagedServiceIdentity
|
Identità del servizio gestita (identità assegnata dal sistema e/o assegnata dall'utente)
|
kind
|
kind
|
Ottenere o Impostare la proprietà Kind.
|
properties.cors
|
CorsRules
|
Specifica le regole CORS per il servizio BLOB. È possibile includere fino a cinque elementi CorsRule nella richiesta. Se non sono inclusi elementi CorsRule nel corpo della richiesta, tutte le regole CORS verranno eliminate e CORS verrà disabilitata per il servizio BLOB.
|
properties.disableLocalAuth
|
boolean
|
Consente di attivare la funzionalità su Criteri di Azure per disabilitare Mappe di Azure supporto di autenticazione locale. In questo modo verranno disabilitate le chiavi condivise e l'autenticazione del token di firma di accesso condiviso da qualsiasi utilizzo.
|
properties.encryption
|
encryption
|
(Facoltativo) Sconsigliato includere nella definizione della risorsa. È necessario solo se è possibile disabilitare la crittografia della piattaforma (infrastruttura AKA). Azure SQL TDE è un esempio di questo. I valori sono abilitati e disabilitati.
|
properties.linkedResources
|
LinkedResource[]
|
Matrice di risorse associate all'account Map. La risorsa collegata nella matrice non può essere aggiornata singolarmente, è necessario aggiornare tutte le risorse collegate nella matrice insieme. Queste risorse possono essere usate sulle operazioni sull'API REST Mappe di Azure. L'accesso è controllato dalle autorizzazioni Di identità gestite dall'account mappa a tali risorse.
|
sku
|
Sku
|
SKU di questo account.
|
tags
|
object
|
Ottiene o imposta un elenco di coppie di valori chiave che descrivono la risorsa. Questi tag possono essere utilizzati nella visualizzazione e nel raggruppamento di questa risorsa (tra gruppi di risorse). È possibile specificare un massimo di 15 tag per una risorsa. Ogni tag deve avere una chiave non superiore a 128 caratteri con un valore che non superi i 256 caratteri.
|
Risposte
Nome |
Tipo |
Descrizione |
200 OK
|
MapsAccount
|
L'account è stato aggiornato correttamente.
|
Other Status Codes
|
ErrorResponse
|
Si è verificato un errore durante la creazione o l'aggiornamento dell'account.
|
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
Nome |
Descrizione |
user_impersonation
|
rappresentare l'account utente
|
Esempio
Update Account Encryption
Esempio di richiesta
PATCH https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount?api-version=2023-06-01
{
"identity": {
"type": "SystemAssigned",
"userAssignedIdentities": {
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": null
}
},
"properties": {
"encryption": {
"customerManagedKeyEncryption": {
"keyEncryptionKeyIdentity": {
"identityType": "systemAssignedIdentity",
"userAssignedIdentityResourceId": null
},
"keyEncryptionKeyUrl": "https://contosovault.vault.azure.net/keys/contosokek"
}
}
}
}
import com.azure.resourcemanager.maps.models.CustomerManagedKeyEncryption;
import com.azure.resourcemanager.maps.models.CustomerManagedKeyEncryptionKeyIdentity;
import com.azure.resourcemanager.maps.models.Encryption;
import com.azure.resourcemanager.maps.models.IdentityType;
import com.azure.resourcemanager.maps.models.ManagedServiceIdentity;
import com.azure.resourcemanager.maps.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.maps.models.MapsAccount;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Accounts Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.json
*/
/**
* Sample code: Update Account Encryption.
*
* @param manager Entry point to AzureMapsManager.
*/
public static void updateAccountEncryption(com.azure.resourcemanager.maps.AzureMapsManager manager) {
MapsAccount resource = manager.accounts()
.getByResourceGroupWithResponse("myResourceGroup", "myMapsAccount", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName",
null)))
.withEncryption(new Encryption().withCustomerManagedKeyEncryption(new CustomerManagedKeyEncryption()
.withKeyEncryptionKeyIdentity(new CustomerManagedKeyEncryptionKeyIdentity()
.withIdentityType(IdentityType.SYSTEM_ASSIGNED_IDENTITY))
.withKeyEncryptionKeyUrl("fakeTokenPlaceholder")))
.apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.maps import AzureMapsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-maps
# USAGE
python update_account_encryption.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AzureMapsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="21a9967a-e8a9-4656-a70b-96ff1c4d05a0",
)
response = client.accounts.update(
resource_group_name="myResourceGroup",
account_name="myMapsAccount",
maps_account_update_parameters={
"identity": {
"type": "SystemAssigned",
"userAssignedIdentities": {
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": None
},
},
"properties": {
"encryption": {
"customerManagedKeyEncryption": {
"keyEncryptionKeyIdentity": {
"identityType": "systemAssignedIdentity",
"userAssignedIdentityResourceId": None,
},
"keyEncryptionKeyUrl": "https://contosovault.vault.azure.net/keys/contosokek",
}
}
},
},
)
print(response)
# x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmaps_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maps/armmaps"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9403296f0b0e112b0d8222ad05fd1d79ee10e03/specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.json
func ExampleAccountsClient_Update_updateAccountEncryption() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmaps.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().Update(ctx, "myResourceGroup", "myMapsAccount", armmaps.AccountUpdateParameters{
Identity: &armmaps.ManagedServiceIdentity{
Type: to.Ptr(armmaps.ManagedServiceIdentityTypeSystemAssigned),
UserAssignedIdentities: map[string]*armmaps.UserAssignedIdentity{
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": nil,
},
},
Properties: &armmaps.AccountProperties{
Encryption: &armmaps.Encryption{
CustomerManagedKeyEncryption: &armmaps.CustomerManagedKeyEncryption{
KeyEncryptionKeyIdentity: &armmaps.CustomerManagedKeyEncryptionKeyIdentity{
IdentityType: to.Ptr(armmaps.IdentityTypeSystemAssignedIdentity),
},
KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Account = armmaps.Account{
// Name: to.Ptr("myMapsAccount"),
// Type: to.Ptr("Microsoft.Maps/accounts"),
// ID: to.Ptr("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount"),
// Location: to.Ptr("eastus"),
// Identity: &armmaps.ManagedServiceIdentity{
// Type: to.Ptr(armmaps.ManagedServiceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("77f72dac-e0aa-484e-9acd-e5e7075310ef"),
// TenantID: to.Ptr("06006684-60c1-4954-a20c-ffd8fbea7276"),
// UserAssignedIdentities: map[string]*armmaps.UserAssignedIdentity{
// "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": &armmaps.UserAssignedIdentity{
// ClientID: to.Ptr("b602d315-01b5-4265-af23-859edc4f2431"),
// PrincipalID: to.Ptr("ac287332-364a-41d9-a567-9ad86b9fc299"),
// },
// },
// },
// Kind: to.Ptr(armmaps.KindGen2),
// Properties: &armmaps.AccountProperties{
// Encryption: &armmaps.Encryption{
// CustomerManagedKeyEncryption: &armmaps.CustomerManagedKeyEncryption{
// KeyEncryptionKeyIdentity: &armmaps.CustomerManagedKeyEncryptionKeyIdentity{
// IdentityType: to.Ptr(armmaps.IdentityTypeSystemAssignedIdentity),
// },
// KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
// },
// },
// ProvisioningState: to.Ptr("Succeeded"),
// UniqueID: to.Ptr("b2e763e6-d6f3-4858-9e2b-7cf8df85c593"),
// },
// SKU: &armmaps.SKU{
// Name: to.Ptr(armmaps.NameG2),
// Tier: to.Ptr("Standard"),
// },
// SystemData: &armmaps.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMapsManagementClient } = require("@azure/arm-maps");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
*
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.json
*/
async function updateAccountEncryption() {
const subscriptionId =
process.env["MAPS_SUBSCRIPTION_ID"] || "21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "myMapsAccount";
const mapsAccountUpdateParameters = {
encryption: {
customerManagedKeyEncryption: {
keyEncryptionKeyIdentity: {
identityType: "systemAssignedIdentity",
userAssignedIdentityResourceId: undefined,
},
keyEncryptionKeyUrl: "https://contosovault.vault.azure.net/keys/contosokek",
},
},
identity: {
type: "SystemAssigned",
userAssignedIdentities: {
"/subscriptions/21a9967aE8a94656A70b96ff1c4d05a0/resourceGroups/myResourceGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/identityName":
{},
},
},
};
const credential = new DefaultAzureCredential();
const client = new AzureMapsManagementClient(credential, subscriptionId);
const result = await client.accounts.update(
resourceGroupName,
accountName,
mapsAccountUpdateParameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Maps.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Maps;
// Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.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()
{
Identity = new ManagedServiceIdentity("SystemAssigned")
{
UserAssignedIdentities =
{
[new ResourceIdentifier("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName")] = null,
},
},
Encryption = new MapsEncryption()
{
CustomerManagedKeyEncryption = new CustomerManagedKeyEncryption()
{
KeyEncryptionKeyIdentity = new CustomerManagedKeyEncryptionKeyIdentity()
{
IdentityType = MapsIdentityType.SystemAssignedIdentity,
UserAssignedIdentityResourceId = null,
},
KeyEncryptionKeyUri = new Uri("https://contosovault.vault.azure.net/keys/contosokek"),
},
},
};
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}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Risposta di esempio
{
"id": "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount",
"name": "myMapsAccount",
"type": "Microsoft.Maps/accounts",
"location": "eastus",
"kind": "Gen2",
"sku": {
"name": "G2",
"tier": "Standard"
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-07-02T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-07-02T01:01:01.1075056Z"
},
"identity": {
"type": "SystemAssigned",
"principalId": "77f72dac-e0aa-484e-9acd-e5e7075310ef",
"tenantId": "06006684-60c1-4954-a20c-ffd8fbea7276",
"userAssignedIdentities": {
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": {
"clientId": "b602d315-01b5-4265-af23-859edc4f2431",
"principalId": "ac287332-364a-41d9-a567-9ad86b9fc299"
}
}
},
"properties": {
"uniqueId": "b2e763e6-d6f3-4858-9e2b-7cf8df85c593",
"provisioningState": "Updating",
"encryption": {
"customerManagedKeyEncryption": {
"keyEncryptionKeyIdentity": {
"identityType": "systemAssignedIdentity"
},
"keyEncryptionKeyUrl": "https://contosovault.vault.azure.net/keys/contosokek"
}
}
}
}
Update Account Managed Identities
Esempio di richiesta
PATCH https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount?api-version=2023-06-01
{
"kind": "Gen2",
"sku": {
"name": "G2"
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": {}
}
},
"properties": {
"linkedResources": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}",
"uniqueName": "myBatchStorageAccount"
}
]
}
}
import com.azure.resourcemanager.maps.models.Kind;
import com.azure.resourcemanager.maps.models.LinkedResource;
import com.azure.resourcemanager.maps.models.ManagedServiceIdentity;
import com.azure.resourcemanager.maps.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.maps.models.MapsAccount;
import com.azure.resourcemanager.maps.models.Name;
import com.azure.resourcemanager.maps.models.Sku;
import com.azure.resourcemanager.maps.models.UserAssignedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Accounts Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountManagedIdentity.json
*/
/**
* Sample code: Update Account Managed Identities.
*
* @param manager Entry point to AzureMapsManager.
*/
public static void updateAccountManagedIdentities(com.azure.resourcemanager.maps.AzureMapsManager manager) {
MapsAccount resource = manager.accounts()
.getByResourceGroupWithResponse("myResourceGroup", "myMapsAccount", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withKind(Kind.GEN2).withSku(new Sku().withName(Name.G2))
.withIdentity(new ManagedServiceIdentity()
.withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName",
new UserAssignedIdentity())))
.withLinkedResources(Arrays.asList(new LinkedResource().withUniqueName("myBatchStorageAccount").withId(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}")))
.apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.maps import AzureMapsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-maps
# USAGE
python update_account_managed_identity.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AzureMapsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="21a9967a-e8a9-4656-a70b-96ff1c4d05a0",
)
response = client.accounts.update(
resource_group_name="myResourceGroup",
account_name="myMapsAccount",
maps_account_update_parameters={
"identity": {
"type": "SystemAssigned, UserAssigned",
"userAssignedIdentities": {
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": {}
},
},
"kind": "Gen2",
"properties": {
"linkedResources": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}",
"uniqueName": "myBatchStorageAccount",
}
]
},
"sku": {"name": "G2"},
},
)
print(response)
# x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountManagedIdentity.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmaps_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maps/armmaps"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9403296f0b0e112b0d8222ad05fd1d79ee10e03/specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountManagedIdentity.json
func ExampleAccountsClient_Update_updateAccountManagedIdentities() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmaps.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().Update(ctx, "myResourceGroup", "myMapsAccount", armmaps.AccountUpdateParameters{
Identity: &armmaps.ManagedServiceIdentity{
Type: to.Ptr(armmaps.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
UserAssignedIdentities: map[string]*armmaps.UserAssignedIdentity{
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": {},
},
},
Kind: to.Ptr(armmaps.KindGen2),
Properties: &armmaps.AccountProperties{
LinkedResources: []*armmaps.LinkedResource{
{
ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}"),
UniqueName: to.Ptr("myBatchStorageAccount"),
}},
},
SKU: &armmaps.SKU{
Name: to.Ptr(armmaps.NameG2),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Account = armmaps.Account{
// Name: to.Ptr("myMapsAccount"),
// Type: to.Ptr("Microsoft.Maps/accounts"),
// ID: to.Ptr("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount"),
// Location: to.Ptr("eastus"),
// Identity: &armmaps.ManagedServiceIdentity{
// Type: to.Ptr(armmaps.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
// PrincipalID: to.Ptr("77f72dac-e0aa-484e-9acd-e5e7075310ef"),
// TenantID: to.Ptr("06006684-60c1-4954-a20c-ffd8fbea7276"),
// UserAssignedIdentities: map[string]*armmaps.UserAssignedIdentity{
// "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": &armmaps.UserAssignedIdentity{
// ClientID: to.Ptr("b602d315-01b5-4265-af23-859edc4f2431"),
// PrincipalID: to.Ptr("ac287332-364a-41d9-a567-9ad86b9fc299"),
// },
// },
// },
// Kind: to.Ptr(armmaps.KindGen2),
// Properties: &armmaps.AccountProperties{
// DisableLocalAuth: to.Ptr(false),
// LinkedResources: []*armmaps.LinkedResource{
// {
// ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}"),
// UniqueName: to.Ptr("myBatchStorageAccount"),
// }},
// ProvisioningState: to.Ptr("Succeeded"),
// UniqueID: to.Ptr("b2e763e6-d6f3-4858-9e2b-7cf8df85c593"),
// },
// SKU: &armmaps.SKU{
// Name: to.Ptr(armmaps.NameG2),
// Tier: to.Ptr("Standard"),
// },
// SystemData: &armmaps.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMapsManagementClient } = require("@azure/arm-maps");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
*
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountManagedIdentity.json
*/
async function updateAccountManagedIdentities() {
const subscriptionId =
process.env["MAPS_SUBSCRIPTION_ID"] || "21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "myMapsAccount";
const mapsAccountUpdateParameters = {
identity: {
type: "SystemAssigned, UserAssigned",
userAssignedIdentities: {
"/subscriptions/21a9967aE8a94656A70b96ff1c4d05a0/resourceGroups/myResourceGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/identityName":
{},
},
},
kind: "Gen2",
linkedResources: [
{
id: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}",
uniqueName: "myBatchStorageAccount",
},
],
sku: { name: "G2" },
};
const credential = new DefaultAzureCredential();
const client = new AzureMapsManagementClient(credential, subscriptionId);
const result = await client.accounts.update(
resourceGroupName,
accountName,
mapsAccountUpdateParameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Maps.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Maps;
// Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/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}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Risposta di esempio
{
"id": "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount",
"name": "myMapsAccount",
"type": "Microsoft.Maps/accounts",
"location": "eastus",
"kind": "Gen2",
"sku": {
"name": "G2",
"tier": "Standard"
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-07-02T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-07-02T01:01:01.1075056Z"
},
"identity": {
"type": "SystemAssigned, UserAssigned",
"principalId": "77f72dac-e0aa-484e-9acd-e5e7075310ef",
"tenantId": "06006684-60c1-4954-a20c-ffd8fbea7276",
"userAssignedIdentities": {
"/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName": {
"clientId": "b602d315-01b5-4265-af23-859edc4f2431",
"principalId": "ac287332-364a-41d9-a567-9ad86b9fc299"
}
}
},
"properties": {
"uniqueId": "b2e763e6-d6f3-4858-9e2b-7cf8df85c593",
"provisioningState": "Succeeded",
"disableLocalAuth": false,
"linkedResources": [
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}",
"uniqueName": "myBatchStorageAccount"
}
]
}
}
Esempio di richiesta
PATCH https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount?api-version=2023-06-01
{
"tags": {
"specialTag": "true"
}
}
import com.azure.resourcemanager.maps.models.MapsAccount;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Accounts Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccount.json
*/
/**
* Sample code: Update Account Tags.
*
* @param manager Entry point to AzureMapsManager.
*/
public static void updateAccountTags(com.azure.resourcemanager.maps.AzureMapsManager manager) {
MapsAccount resource = manager.accounts()
.getByResourceGroupWithResponse("myResourceGroup", "myMapsAccount", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("specialTag", "true")).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.maps import AzureMapsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-maps
# USAGE
python update_account.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AzureMapsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="21a9967a-e8a9-4656-a70b-96ff1c4d05a0",
)
response = client.accounts.update(
resource_group_name="myResourceGroup",
account_name="myMapsAccount",
maps_account_update_parameters={"tags": {"specialTag": "true"}},
)
print(response)
# x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccount.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmaps_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maps/armmaps"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9403296f0b0e112b0d8222ad05fd1d79ee10e03/specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccount.json
func ExampleAccountsClient_Update_updateAccountTags() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmaps.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().Update(ctx, "myResourceGroup", "myMapsAccount", armmaps.AccountUpdateParameters{
Tags: map[string]*string{
"specialTag": to.Ptr("true"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Account = armmaps.Account{
// Name: to.Ptr("myMapsAccount"),
// Type: to.Ptr("Microsoft.Maps/accounts"),
// ID: to.Ptr("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount"),
// Location: to.Ptr("eastus"),
// Tags: map[string]*string{
// "specialTag": to.Ptr("true"),
// },
// Kind: to.Ptr(armmaps.KindGen1),
// Properties: &armmaps.AccountProperties{
// DisableLocalAuth: to.Ptr(false),
// ProvisioningState: to.Ptr("Succeeded"),
// UniqueID: to.Ptr("b2e763e6-d6f3-4858-9e2b-7cf8df85c593"),
// },
// SKU: &armmaps.SKU{
// Name: to.Ptr(armmaps.NameS0),
// Tier: to.Ptr("Standard"),
// },
// SystemData: &armmaps.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMapsManagementClient } = require("@azure/arm-maps");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
*
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccount.json
*/
async function updateAccountTags() {
const subscriptionId =
process.env["MAPS_SUBSCRIPTION_ID"] || "21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "myMapsAccount";
const mapsAccountUpdateParameters = {
tags: { specialTag: "true" },
};
const credential = new DefaultAzureCredential();
const client = new AzureMapsManagementClient(credential, subscriptionId);
const result = await client.accounts.update(
resourceGroupName,
accountName,
mapsAccountUpdateParameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Maps.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Maps;
// Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/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
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()
{
Tags =
{
["specialTag"] = "true",
},
};
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}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Risposta di esempio
{
"id": "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount",
"name": "myMapsAccount",
"type": "Microsoft.Maps/accounts",
"location": "eastus",
"kind": "Gen1",
"tags": {
"specialTag": "true"
},
"sku": {
"name": "S0",
"tier": "Standard"
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-07-02T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-07-02T01:01:01.1075056Z"
},
"properties": {
"uniqueId": "b2e763e6-d6f3-4858-9e2b-7cf8df85c593",
"provisioningState": "Succeeded",
"disableLocalAuth": false
}
}
Update to Gen1 Account
Esempio di richiesta
PATCH https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount?api-version=2023-06-01
{
"kind": "Gen1",
"sku": {
"name": "S1"
}
}
import com.azure.resourcemanager.maps.models.Kind;
import com.azure.resourcemanager.maps.models.MapsAccount;
import com.azure.resourcemanager.maps.models.Name;
import com.azure.resourcemanager.maps.models.Sku;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Accounts Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen1.json
*/
/**
* Sample code: Update to Gen1 Account.
*
* @param manager Entry point to AzureMapsManager.
*/
public static void updateToGen1Account(com.azure.resourcemanager.maps.AzureMapsManager manager) {
MapsAccount resource = manager.accounts()
.getByResourceGroupWithResponse("myResourceGroup", "myMapsAccount", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withKind(Kind.GEN1).withSku(new Sku().withName(Name.S1)).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.maps import AzureMapsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-maps
# USAGE
python update_account_gen1.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AzureMapsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="21a9967a-e8a9-4656-a70b-96ff1c4d05a0",
)
response = client.accounts.update(
resource_group_name="myResourceGroup",
account_name="myMapsAccount",
maps_account_update_parameters={"kind": "Gen1", "sku": {"name": "S1"}},
)
print(response)
# x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen1.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmaps_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maps/armmaps"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9403296f0b0e112b0d8222ad05fd1d79ee10e03/specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen1.json
func ExampleAccountsClient_Update_updateToGen1Account() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmaps.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().Update(ctx, "myResourceGroup", "myMapsAccount", armmaps.AccountUpdateParameters{
Kind: to.Ptr(armmaps.KindGen1),
SKU: &armmaps.SKU{
Name: to.Ptr(armmaps.NameS1),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Account = armmaps.Account{
// Name: to.Ptr("myMapsAccount"),
// Type: to.Ptr("Microsoft.Maps/accounts"),
// ID: to.Ptr("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount"),
// Location: to.Ptr("eastus"),
// Kind: to.Ptr(armmaps.KindGen1),
// Properties: &armmaps.AccountProperties{
// DisableLocalAuth: to.Ptr(false),
// LinkedResources: []*armmaps.LinkedResource{
// },
// ProvisioningState: to.Ptr("Succeeded"),
// UniqueID: to.Ptr("b2e763e6-d6f3-4858-9e2b-7cf8df85c593"),
// },
// SKU: &armmaps.SKU{
// Name: to.Ptr(armmaps.NameS1),
// Tier: to.Ptr("Standard"),
// },
// SystemData: &armmaps.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMapsManagementClient } = require("@azure/arm-maps");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
*
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen1.json
*/
async function updateToGen1Account() {
const subscriptionId =
process.env["MAPS_SUBSCRIPTION_ID"] || "21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "myMapsAccount";
const mapsAccountUpdateParameters = {
kind: "Gen1",
sku: { name: "S1" },
};
const credential = new DefaultAzureCredential();
const client = new AzureMapsManagementClient(credential, subscriptionId);
const result = await client.accounts.update(
resourceGroupName,
accountName,
mapsAccountUpdateParameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Maps.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Maps;
// Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/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
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.Gen1,
Sku = new MapsSku(MapsSkuName.S1),
};
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}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Risposta di esempio
{
"id": "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount",
"name": "myMapsAccount",
"type": "Microsoft.Maps/accounts",
"location": "eastus",
"kind": "Gen1",
"sku": {
"name": "S1",
"tier": "Standard"
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-07-02T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-07-02T01:01:01.1075056Z"
},
"properties": {
"uniqueId": "b2e763e6-d6f3-4858-9e2b-7cf8df85c593",
"provisioningState": "Succeeded",
"disableLocalAuth": false,
"linkedResources": []
}
}
Update to Gen2 Account
Esempio di richiesta
PATCH https://management.azure.com/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount?api-version=2023-06-01
{
"kind": "Gen2",
"sku": {
"name": "G2"
}
}
import com.azure.resourcemanager.maps.models.Kind;
import com.azure.resourcemanager.maps.models.MapsAccount;
import com.azure.resourcemanager.maps.models.Name;
import com.azure.resourcemanager.maps.models.Sku;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Accounts Update.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen2.json
*/
/**
* Sample code: Update to Gen2 Account.
*
* @param manager Entry point to AzureMapsManager.
*/
public static void updateToGen2Account(com.azure.resourcemanager.maps.AzureMapsManager manager) {
MapsAccount resource = manager.accounts()
.getByResourceGroupWithResponse("myResourceGroup", "myMapsAccount", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withKind(Kind.GEN2).withSku(new Sku().withName(Name.G2)).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.maps import AzureMapsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-maps
# USAGE
python update_account_gen2.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = AzureMapsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="21a9967a-e8a9-4656-a70b-96ff1c4d05a0",
)
response = client.accounts.update(
resource_group_name="myResourceGroup",
account_name="myMapsAccount",
maps_account_update_parameters={"kind": "Gen2", "sku": {"name": "G2"}},
)
print(response)
# x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen2.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmaps_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/maps/armmaps"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/b9403296f0b0e112b0d8222ad05fd1d79ee10e03/specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen2.json
func ExampleAccountsClient_Update_updateToGen2Account() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmaps.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAccountsClient().Update(ctx, "myResourceGroup", "myMapsAccount", armmaps.AccountUpdateParameters{
Kind: to.Ptr(armmaps.KindGen2),
SKU: &armmaps.SKU{
Name: to.Ptr(armmaps.NameG2),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Account = armmaps.Account{
// Name: to.Ptr("myMapsAccount"),
// Type: to.Ptr("Microsoft.Maps/accounts"),
// ID: to.Ptr("/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount"),
// Location: to.Ptr("eastus"),
// Kind: to.Ptr(armmaps.KindGen2),
// Properties: &armmaps.AccountProperties{
// DisableLocalAuth: to.Ptr(false),
// LinkedResources: []*armmaps.LinkedResource{
// },
// ProvisioningState: to.Ptr("Succeeded"),
// UniqueID: to.Ptr("b2e763e6-d6f3-4858-9e2b-7cf8df85c593"),
// },
// SKU: &armmaps.SKU{
// Name: to.Ptr(armmaps.NameG2),
// Tier: to.Ptr("Standard"),
// },
// SystemData: &armmaps.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-02T01:01:01.107Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armmaps.CreatedByTypeApplication),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureMapsManagementClient } = require("@azure/arm-maps");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
*
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen2.json
*/
async function updateToGen2Account() {
const subscriptionId =
process.env["MAPS_SUBSCRIPTION_ID"] || "21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
const accountName = "myMapsAccount";
const mapsAccountUpdateParameters = {
kind: "Gen2",
sku: { name: "G2" },
};
const credential = new DefaultAzureCredential();
const client = new AzureMapsManagementClient(credential, subscriptionId);
const result = await client.accounts.update(
resourceGroupName,
accountName,
mapsAccountUpdateParameters
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Maps.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Maps;
// Generated from example definition: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/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
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),
};
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}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Risposta di esempio
{
"id": "/subscriptions/21a9967a-e8a9-4656-a70b-96ff1c4d05a0/resourceGroups/myResourceGroup/providers/Microsoft.Maps/accounts/myMapsAccount",
"name": "myMapsAccount",
"type": "Microsoft.Maps/accounts",
"location": "eastus",
"kind": "Gen2",
"sku": {
"name": "G2",
"tier": "Standard"
},
"systemData": {
"createdBy": "string",
"createdByType": "Application",
"createdAt": "2021-07-02T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "Application",
"lastModifiedAt": "2021-07-02T01:01:01.1075056Z"
},
"properties": {
"uniqueId": "b2e763e6-d6f3-4858-9e2b-7cf8df85c593",
"provisioningState": "Succeeded",
"disableLocalAuth": false,
"linkedResources": []
}
}
Definizioni
Nome |
Descrizione |
CorsRule
|
Specifica una regola CORS per l'account mappa.
|
CorsRules
|
Imposta le regole CORS. È possibile includere fino a cinque elementi CorsRule nella richiesta.
|
createdByType
|
Tipo di identità che ha creato la risorsa.
|
customerManagedKeyEncryption
|
Tutte le proprietà di crittografia delle chiavi gestite dal cliente per la risorsa.
|
encryption
|
(Facoltativo) Sconsigliato includere nella definizione della risorsa. È necessario solo se è possibile disabilitare la crittografia della piattaforma (infrastruttura AKA). Azure SQL TDE è un esempio di questo. I valori sono abilitati e disabilitati.
|
ErrorAdditionalInfo
|
Informazioni aggiuntive sulla gestione delle risorse.
|
ErrorDetail
|
Dettagli dell'errore.
|
ErrorResponse
|
Risposta di errore
|
IdentityType
|
I valori possono essere systemAssignedIdentity o userAssignedIdentity
|
InfrastructureEncryption
|
I valori sono abilitati e disabilitati.
|
KeyEncryptionKeyIdentity
|
Tutte le impostazioni della chiave gestita dal cliente che definiscono quale identità deve essere usata per l'autenticazione per Key Vault.
|
kind
|
Ottenere o Impostare la proprietà Kind.
|
LinkedResource
|
La risorsa collegata fa riferimento a una risorsa distribuita in una sottoscrizione di Azure, aggiungere il valore della risorsa uniqueName collegata come parametro facoltativo per le operazioni su Mappe di Azure API REST geospaziali.
|
ManagedServiceIdentity
|
Identità del servizio gestita (identità assegnata dal sistema e/o assegnata dall'utente)
|
ManagedServiceIdentityType
|
Tipo di identità del servizio gestito (in cui sono consentiti sia i tipi SystemAssigned che UserAssigned).
|
MapsAccount
|
Risorsa di Azure che rappresenta l'accesso a una suite di API REST di Mappe.
|
MapsAccountProperties
|
Proprietà aggiuntive dell'account map
|
MapsAccountUpdateParameters
|
Parametri usati per aggiornare un account mappe esistente.
|
name
|
Nome dello SKU, in formato standard (ad esempio S0).
|
Sku
|
SKU dell'account Mappe.
|
systemData
|
Metadati relativi alla creazione e all'ultima modifica della risorsa.
|
UserAssignedIdentity
|
Proprietà di identità assegnate dall'utente
|
CorsRule
Specifica una regola CORS per l'account mappa.
Nome |
Tipo |
Descrizione |
allowedOrigins
|
string[]
|
Obbligatorio se è presente l'elemento CorsRule. Elenco di domini di origine che saranno consentiti tramite CORS o "*" per consentire a tutti i domini
|
CorsRules
Imposta le regole CORS. È possibile includere fino a cinque elementi CorsRule nella richiesta.
Nome |
Tipo |
Descrizione |
corsRules
|
CorsRule[]
|
Elenco delle regole CORS. È possibile includere fino a cinque elementi CorsRule nella richiesta.
|
createdByType
Tipo di identità che ha creato la risorsa.
Nome |
Tipo |
Descrizione |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
customerManagedKeyEncryption
Tutte le proprietà di crittografia delle chiavi gestite dal cliente per la risorsa.
encryption
(Facoltativo) Sconsigliato includere nella definizione della risorsa. È necessario solo se è possibile disabilitare la crittografia della piattaforma (infrastruttura AKA). Azure SQL TDE è un esempio di questo. I valori sono abilitati e disabilitati.
ErrorAdditionalInfo
Informazioni aggiuntive sulla gestione delle risorse.
Nome |
Tipo |
Descrizione |
info
|
object
|
Informazioni aggiuntive.
|
type
|
string
|
Tipo di informazioni aggiuntive.
|
ErrorDetail
Dettagli dell'errore.
Nome |
Tipo |
Descrizione |
additionalInfo
|
ErrorAdditionalInfo[]
|
Informazioni aggiuntive sull'errore.
|
code
|
string
|
Codice di errore.
|
details
|
ErrorDetail[]
|
Dettagli dell'errore.
|
message
|
string
|
Messaggio di errore.
|
target
|
string
|
Destinazione dell'errore.
|
ErrorResponse
Risposta di errore
IdentityType
I valori possono essere systemAssignedIdentity o userAssignedIdentity
Nome |
Tipo |
Descrizione |
delegatedResourceIdentity
|
string
|
|
systemAssignedIdentity
|
string
|
|
userAssignedIdentity
|
string
|
|
InfrastructureEncryption
I valori sono abilitati e disabilitati.
Nome |
Tipo |
Descrizione |
disabled
|
string
|
|
enabled
|
string
|
|
KeyEncryptionKeyIdentity
Tutte le impostazioni della chiave gestita dal cliente che definiscono quale identità deve essere usata per l'autenticazione per Key Vault.
Nome |
Tipo |
Descrizione |
delegatedIdentityClientId
|
string
|
identità delegata da usare per accedere all'URL della chiave di crittografia delle chiavi. Ad esempio: /subscriptions/fa5fc2227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. A vicenda con identityType systemAssignedIdentity e userAssignedIdentity - solo uso interno.
|
identityType
|
IdentityType
|
I valori possono essere systemAssignedIdentity o userAssignedIdentity
|
userAssignedIdentityResourceId
|
string
|
identità assegnata dall'utente da usare per l'accesso all'URL della chiave di crittografia delle chiavi. Ad esempio: /subscriptions/fa5fc2227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. A vicenda con identityType systemAssignedIdentity e delegatedResourceIdentity.
|
kind
Ottenere o Impostare la proprietà Kind.
Nome |
Tipo |
Descrizione |
Gen1
|
string
|
|
Gen2
|
string
|
|
LinkedResource
La risorsa collegata fa riferimento a una risorsa distribuita in una sottoscrizione di Azure, aggiungere il valore della risorsa uniqueName
collegata come parametro facoltativo per le operazioni su Mappe di Azure API REST geospaziali.
Nome |
Tipo |
Descrizione |
id
|
string
|
ID risorsa ARM nel modulo: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}'.
|
uniqueName
|
string
|
Nome specificato che identifica in modo univoco la risorsa collegata.
|
ManagedServiceIdentity
Identità del servizio gestita (identità assegnata dal sistema e/o assegnata dall'utente)
Nome |
Tipo |
Descrizione |
principalId
|
string
|
ID dell'entità servizio dell'identità assegnata dal sistema. Questa proprietà verrà fornita solo per un'identità assegnata dal sistema.
|
tenantId
|
string
|
ID tenant dell'identità assegnata dal sistema. Questa proprietà verrà fornita solo per un'identità assegnata dal sistema.
|
type
|
ManagedServiceIdentityType
|
Tipo di identità del servizio gestito (in cui sono consentiti sia i tipi SystemAssigned che UserAssigned).
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
identità User-Assigned
Set di identità assegnate dall'utente associate alla risorsa. Le chiavi del dizionario userAssignedIdentities saranno id risorsa ARM nel formato : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. I valori del dizionario possono essere oggetti vuoti ({}) nelle richieste.
|
ManagedServiceIdentityType
Tipo di identità del servizio gestito (in cui sono consentiti sia i tipi SystemAssigned che UserAssigned).
Nome |
Tipo |
Descrizione |
None
|
string
|
|
SystemAssigned
|
string
|
|
SystemAssigned, UserAssigned
|
string
|
|
UserAssigned
|
string
|
|
MapsAccount
Risorsa di Azure che rappresenta l'accesso a una suite di API REST di Mappe.
Nome |
Tipo |
Valore predefinito |
Descrizione |
id
|
string
|
|
ID di risorsa completo per la risorsa. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
identity
|
ManagedServiceIdentity
|
|
Identità del servizio gestita (identità assegnata dal sistema e/o assegnata dall'utente)
|
kind
|
kind
|
Gen1
|
Ottenere o Impostare la proprietà Kind.
|
location
|
string
|
|
Posizione geografica in cui vive la risorsa
|
name
|
string
|
|
nome della risorsa.
|
properties
|
MapsAccountProperties
|
|
Proprietà dell'account mappa.
|
sku
|
Sku
|
|
SKU di questo account.
|
systemData
|
systemData
|
|
Metadati relativi alla creazione e all'ultima modifica della risorsa.
|
tags
|
object
|
|
Tag di risorse.
|
type
|
string
|
|
Tipo di risorsa. Ad esempio, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts"
|
MapsAccountProperties
Proprietà aggiuntive dell'account map
Nome |
Tipo |
Valore predefinito |
Descrizione |
cors
|
CorsRules
|
|
Specifica le regole CORS per il servizio BLOB. È possibile includere fino a cinque elementi CorsRule nella richiesta. Se non sono inclusi elementi CorsRule nel corpo della richiesta, tutte le regole CORS verranno eliminate e CORS verrà disabilitata per il servizio BLOB.
|
disableLocalAuth
|
boolean
|
False
|
Consente di attivare la funzionalità su Criteri di Azure per disabilitare Mappe di Azure supporto di autenticazione locale. In questo modo verranno disabilitate le chiavi condivise e l'autenticazione del token di firma di accesso condiviso da qualsiasi utilizzo.
|
encryption
|
encryption
|
|
(Facoltativo) Sconsigliato includere nella definizione della risorsa. È necessario solo se è possibile disabilitare la crittografia della piattaforma (infrastruttura AKA). Azure SQL TDE è un esempio di questo. I valori sono abilitati e disabilitati.
|
linkedResources
|
LinkedResource[]
|
|
Matrice di risorse associate all'account Map. La risorsa collegata nella matrice non può essere aggiornata singolarmente, è necessario aggiornare tutte le risorse collegate nella matrice insieme. Queste risorse possono essere usate sulle operazioni sull'API REST Mappe di Azure. L'accesso è controllato dalle autorizzazioni Di identità gestite dall'account mappa a tali risorse.
|
provisioningState
|
string
|
|
Lo stato di provisioning della risorsa account mappa, gli aggiornamenti dell'account possono essere eseguiti solo negli stati del terminale. Stati del terminale: Succeeded e Failed
|
uniqueId
|
string
|
|
Identificatore univoco per l'account mappe
|
MapsAccountUpdateParameters
Parametri usati per aggiornare un account mappe esistente.
Nome |
Tipo |
Valore predefinito |
Descrizione |
identity
|
ManagedServiceIdentity
|
|
Identità del servizio gestita (identità assegnata dal sistema e/o assegnata dall'utente)
|
kind
|
kind
|
Gen1
|
Ottenere o Impostare la proprietà Kind.
|
properties.cors
|
CorsRules
|
|
Specifica le regole CORS per il servizio BLOB. È possibile includere fino a cinque elementi CorsRule nella richiesta. Se non sono inclusi elementi CorsRule nel corpo della richiesta, tutte le regole CORS verranno eliminate e CORS verrà disabilitata per il servizio BLOB.
|
properties.disableLocalAuth
|
boolean
|
False
|
Consente di attivare la funzionalità su Criteri di Azure per disabilitare Mappe di Azure supporto di autenticazione locale. In questo modo verranno disabilitate le chiavi condivise e l'autenticazione del token di firma di accesso condiviso da qualsiasi utilizzo.
|
properties.encryption
|
encryption
|
|
(Facoltativo) Sconsigliato includere nella definizione della risorsa. È necessario solo se è possibile disabilitare la crittografia della piattaforma (infrastruttura AKA). Azure SQL TDE è un esempio di questo. I valori sono abilitati e disabilitati.
|
properties.linkedResources
|
LinkedResource[]
|
|
Matrice di risorse associate all'account Map. La risorsa collegata nella matrice non può essere aggiornata singolarmente, è necessario aggiornare tutte le risorse collegate nella matrice insieme. Queste risorse possono essere usate sulle operazioni sull'API REST Mappe di Azure. L'accesso è controllato dalle autorizzazioni Di identità gestite dall'account mappa a tali risorse.
|
properties.provisioningState
|
string
|
|
Lo stato di provisioning della risorsa account mappa, gli aggiornamenti dell'account possono essere eseguiti solo negli stati del terminale. Stati del terminale: Succeeded e Failed
|
properties.uniqueId
|
string
|
|
Identificatore univoco per l'account mappe
|
sku
|
Sku
|
|
SKU di questo account.
|
tags
|
object
|
|
Ottiene o imposta un elenco di coppie di valori chiave che descrivono la risorsa. Questi tag possono essere utilizzati nella visualizzazione e nel raggruppamento di questa risorsa (tra gruppi di risorse). È possibile specificare un massimo di 15 tag per una risorsa. Ogni tag deve avere una chiave non superiore a 128 caratteri con un valore che non superi i 256 caratteri.
|
name
Nome dello SKU, in formato standard (ad esempio S0).
Nome |
Tipo |
Descrizione |
G2
|
string
|
|
S0
|
string
|
|
S1
|
string
|
|
Sku
SKU dell'account Mappe.
Nome |
Tipo |
Descrizione |
name
|
name
|
Nome dello SKU, in formato standard (ad esempio S0).
|
tier
|
string
|
Ottiene il livello sku. In base al nome dello SKU.
|
systemData
Metadati relativi alla creazione e all'ultima modifica della risorsa.
Nome |
Tipo |
Descrizione |
createdAt
|
string
|
Timestamp della creazione di risorse (UTC).
|
createdBy
|
string
|
Identità che ha creato la risorsa.
|
createdByType
|
createdByType
|
Tipo di identità che ha creato la risorsa.
|
lastModifiedAt
|
string
|
Timestamp dell'ultima modifica della risorsa (UTC)
|
lastModifiedBy
|
string
|
Identità che ha modificato l'ultima risorsa.
|
lastModifiedByType
|
createdByType
|
Tipo di identità che ha modificato l'ultima risorsa.
|
UserAssignedIdentity
Proprietà di identità assegnate dall'utente
Nome |
Tipo |
Descrizione |
clientId
|
string
|
ID client dell'identità assegnata.
|
principalId
|
string
|
ID principale dell'identità assegnata.
|