匯報 地圖服務帳戶。 建立之後,只能更新參數的子集,例如Sku、標籤、屬性。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Maps/accounts/{accountName}?api-version=2023-06-01
URI 參數
名稱 |
位於 |
必要 |
類型 |
Description |
accountName
|
path |
True
|
string
|
地圖服務帳戶的名稱。
|
resourceGroupName
|
path |
True
|
string
|
資源群組的名稱。 名稱不區分大小寫。
|
subscriptionId
|
path |
True
|
string
|
目標訂用帳戶的標識碼。
|
api-version
|
query |
True
|
string
|
用於此作業的 API 版本。
|
要求本文
名稱 |
類型 |
Description |
identity
|
ManagedServiceIdentity
|
受控服務識別 (系統指派和/或使用者指派的身分識別)
|
kind
|
kind
|
取得或設定Kind屬性。
|
properties.cors
|
CorsRules
|
指定 Blob 服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,而且 Blob 服務將會停用 CORS。
|
properties.disableLocalAuth
|
boolean
|
允許 Azure 原則 上的切換功能停用本機驗證支援 Azure 地圖服務。 這會從任何使用方式停用共用密鑰和共用存取簽章令牌驗證。
|
properties.encryption
|
encryption
|
(選擇性) 不建議包含在資源定義中。 只有在能夠停用平臺 (AKA 基礎結構) 加密時才需要。 Azure SQL TDE 是其中一個範例。 值已啟用並停用。
|
properties.linkedResources
|
LinkedResource[]
|
對應帳戶相關聯資源的陣列。 陣列中的連結資源無法個別更新,您必須一起更新陣列中的所有鏈接資源。 這些資源可用於 Azure 地圖服務 REST API 上的作業。 存取權是由對應帳戶受控識別控制, (這些資源的) 許可權 () 。
|
sku
|
Sku
|
此帳戶的 SKU。
|
tags
|
object
|
取得或設定描述資源的索引鍵值組清單。 這些標記可用來在資源群組間檢視資源,以及對資源分組。 資源最多可提供15個標籤。 每個標記的金鑰都不得多於 128 個字元,值則不得多於 256 個字元。
|
回應
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 |
Description |
user_impersonation
|
模擬您的用戶帳戶
|
範例
Update Account Encryption
範例要求
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
範例回覆
{
"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
範例要求
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
範例回覆
{
"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"
}
]
}
}
範例要求
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
範例回覆
{
"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
範例要求
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
範例回覆
{
"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
範例要求
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
範例回覆
{
"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": []
}
}
定義
CorsRule
指定地圖帳戶的 CORS 規則。
名稱 |
類型 |
Description |
allowedOrigins
|
string[]
|
如果 CorsRule 元素存在,則為必要專案。 將透過 CORS 允許的原始網域清單,或 「*」 允許所有網域
|
CorsRules
設定 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。
名稱 |
類型 |
Description |
corsRules
|
CorsRule[]
|
CORS 規則的清單。 您可以在要求中包含最多五個 CorsRule 元素。
|
createdByType
建立資源的身分識別類型。
名稱 |
類型 |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
customerManagedKeyEncryption
資源的所有客戶自控金鑰加密屬性。
encryption
(選擇性) 不建議包含在資源定義中。 只有在可能停用平臺 (AKA 基礎結構) 加密時才需要。 Azure SQL TDE 是這種情況的範例。 值已啟用並停用。
ErrorAdditionalInfo
資源管理錯誤其他資訊。
名稱 |
類型 |
Description |
info
|
object
|
其他資訊。
|
type
|
string
|
其他信息類型。
|
ErrorDetail
錯誤詳細數據。
名稱 |
類型 |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
錯誤其他資訊。
|
code
|
string
|
錯誤碼。
|
details
|
ErrorDetail[]
|
錯誤詳細資料。
|
message
|
string
|
錯誤訊息。
|
target
|
string
|
錯誤目標。
|
ErrorResponse
錯誤回應
IdentityType
值可以是 systemAssignedIdentity 或 userAssignedIdentity
名稱 |
類型 |
Description |
delegatedResourceIdentity
|
string
|
|
systemAssignedIdentity
|
string
|
|
userAssignedIdentity
|
string
|
|
InfrastructureEncryption
值已啟用並停用。
名稱 |
類型 |
Description |
disabled
|
string
|
|
enabled
|
string
|
|
KeyEncryptionKeyIdentity
客戶管理的金鑰設定的所有身分識別設定,定義應該用來驗證哪些身分識別來 金鑰保存庫。
名稱 |
類型 |
Description |
delegatedIdentityClientId
|
string
|
用來存取金鑰加密金鑰 URL 的委派身分識別。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 與 identityType systemAssignedIdentity 和 userAssignedIdentity 互斥 - 僅限內部使用。
|
identityType
|
IdentityType
|
值可以是 systemAssignedIdentity 或 userAssignedIdentity
|
userAssignedIdentityResourceId
|
string
|
使用者指派的身分識別,用來存取金鑰加密金鑰 URL。 例如:/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/Microsoft.ManagedIdentity/userAssignedIdentities/myId。 與 identityType systemAssignedIdentity 和 delegatedResourceIdentity 互斥。
|
kind
Get 或 Set Kind 屬性。
名稱 |
類型 |
Description |
Gen1
|
string
|
|
Gen2
|
string
|
|
LinkedResource
鏈接的資源是 Azure 訂用帳戶中部署的資源參考,請將連結的資源uniqueName
值新增為 Azure 地圖服務 地理空間 REST API 作業的選擇性參數。
名稱 |
類型 |
Description |
id
|
string
|
格式為'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/accounts/{storageName}' 的 ARM 資源標識符。
|
uniqueName
|
string
|
提供的名稱,可唯一識別鏈接的資源。
|
ManagedServiceIdentity
受控服務識別 (系統指派和/或使用者指派的身分識別)
名稱 |
類型 |
Description |
principalId
|
string
|
系統指派之身分識別的服務主體標識符。 此屬性只會針對系統指派的身分識別提供。
|
tenantId
|
string
|
系統指派身分識別的租用戶標識碼。 此屬性只會針對系統指派的身分識別提供。
|
type
|
ManagedServiceIdentityType
|
(允許 SystemAssigned 和 UserAssigned 類型的受控服務識別類型) 。
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
User-Assigned 身分識別
與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中 ({}) 的空白物件。
|
ManagedServiceIdentityType
(允許 SystemAssigned 和 UserAssigned 類型的受控服務識別類型) 。
名稱 |
類型 |
Description |
None
|
string
|
|
SystemAssigned
|
string
|
|
SystemAssigned, UserAssigned
|
string
|
|
UserAssigned
|
string
|
|
MapsAccount
Azure 資源,代表對應 REST API 套件的存取權。
名稱 |
類型 |
預設值 |
Description |
id
|
string
|
|
資源的完整資源識別碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
identity
|
ManagedServiceIdentity
|
|
受控服務識別 (系統指派和/或使用者指派的身分識別)
|
kind
|
kind
|
Gen1
|
Get 或 Set Kind 屬性。
|
location
|
string
|
|
資源所在的地理位置
|
name
|
string
|
|
資源的名稱
|
properties
|
MapsAccountProperties
|
|
對應帳戶屬性。
|
sku
|
Sku
|
|
此帳戶的 SKU。
|
systemData
|
systemData
|
|
與建立和上次修改資源相關的元數據。
|
tags
|
object
|
|
資源標籤。
|
type
|
string
|
|
資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”
|
MapsAccountProperties
其他對應帳戶屬性
名稱 |
類型 |
預設值 |
Description |
cors
|
CorsRules
|
|
指定 Blob 服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,而且 Blob 服務將會停用 CORS。
|
disableLocalAuth
|
boolean
|
False
|
允許 Azure 原則 上的切換功能停用 Azure 地圖服務 本機驗證支援。 這會停用任何使用量的共用密鑰和共用存取簽章令牌驗證。
|
encryption
|
encryption
|
|
(選擇性) 不建議包含在資源定義中。 只有在能夠停用平臺 (AKA 基礎結構) 加密時才需要。 Azure SQL TDE 是其中一個範例。 值已啟用並停用。
|
linkedResources
|
LinkedResource[]
|
|
對應帳戶相關聯資源的陣列。 陣列中的連結資源無法個別更新,您必須一起更新陣列中的所有鏈接資源。 這些資源可用於 Azure 地圖服務 REST API 上的作業。 存取權是由對應帳戶受控識別所控制, (這些資源的) 許可權 () 。
|
provisioningState
|
string
|
|
對應帳戶資源的布建狀態,帳戶更新只能在終端機狀態上執行。 終端機狀態: Succeeded 和 Failed
|
uniqueId
|
string
|
|
地圖帳戶的唯一標識碼
|
MapsAccountUpdateParameters
用來更新現有地圖服務帳戶的參數。
名稱 |
類型 |
預設值 |
Description |
identity
|
ManagedServiceIdentity
|
|
受控服務識別 (系統指派和/或使用者指派的身分識別)
|
kind
|
kind
|
Gen1
|
Get 或 Set Kind 屬性。
|
properties.cors
|
CorsRules
|
|
指定 Blob 服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,而且會停用 Blob 服務的 CORS。
|
properties.disableLocalAuth
|
boolean
|
False
|
允許 Azure 原則 上的切換功能停用 Azure 地圖服務 本機驗證支援。 這會停用任何使用量的共用密鑰和共用存取簽章令牌驗證。
|
properties.encryption
|
encryption
|
|
(選擇性) 不建議包含在資源定義中。 只有在可能停用平臺 (AKA 基礎結構) 加密時才需要。 Azure SQL TDE 是這種情況的範例。 值已啟用並停用。
|
properties.linkedResources
|
LinkedResource[]
|
|
對應帳戶相關聯資源的陣列。 陣列中的連結資源無法個別更新,您必須一起更新陣列中的所有鏈接資源。 這些資源可用於 Azure 地圖服務 REST API 上的作業。 存取權是由對應帳戶受控識別所控制, (這些資源的) 許可權 () 。
|
properties.provisioningState
|
string
|
|
對應帳戶資源的布建狀態,帳戶更新只能在終端機狀態上執行。 終端機狀態: Succeeded 和 Failed
|
properties.uniqueId
|
string
|
|
地圖帳戶的唯一標識碼
|
sku
|
Sku
|
|
此帳戶的 SKU。
|
tags
|
object
|
|
取得或設定描述資源的索引鍵值組清單。 這些標記可用來在資源群組間檢視資源,以及對資源分組。 資源最多可提供15個標記。 每個標記的金鑰都不得多於 128 個字元,值則不得多於 256 個字元。
|
name
SKU 的名稱,以標準格式 (,例如 S0) 。
名稱 |
類型 |
Description |
G2
|
string
|
|
S0
|
string
|
|
S1
|
string
|
|
Sku
地圖服務帳戶的 SKU。
名稱 |
類型 |
Description |
name
|
name
|
SKU 的名稱,以標準格式 (,例如 S0) 。
|
tier
|
string
|
取得 SKU 層。 這是以 SKU 名稱為基礎。
|
systemData
與建立和上次修改資源相關的元數據。
名稱 |
類型 |
Description |
createdAt
|
string
|
資源建立的時間戳 (UTC) 。
|
createdBy
|
string
|
建立資源的身分識別。
|
createdByType
|
createdByType
|
建立資源的身分識別類型。
|
lastModifiedAt
|
string
|
上次修改的資源時間戳 (UTC)
|
lastModifiedBy
|
string
|
上次修改資源的身分識別。
|
lastModifiedByType
|
createdByType
|
上次修改資源的身分識別類型。
|
UserAssignedIdentity
使用者指派的身分識別屬性
名稱 |
類型 |
Description |
clientId
|
string
|
指派之身分識別的用戶端標識碼。
|
principalId
|
string
|
指派之身分識別的主體標識碼。
|